
com.oracle.truffle.polyglot.PolyglotValueDispatchFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truffle-api Show documentation
Show all versions of truffle-api Show documentation
Truffle is a multi-language framework for executing dynamic languages
that achieves high performance when combined with Graal.
// CheckStyle: start generated
package com.oracle.truffle.polyglot;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.InlineSupport;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.InlineTarget;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.RequiredField;
import com.oracle.truffle.api.dsl.InlineSupport.StateField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.interop.InteropLibrary;
import com.oracle.truffle.api.library.LibraryFactory;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.EncapsulatingNodeReference;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.profiles.InlinedBranchProfile;
import com.oracle.truffle.polyglot.PolyglotLanguageContext.ToGuestValueNode;
import com.oracle.truffle.polyglot.PolyglotLanguageContext.ToGuestValuesNode;
import com.oracle.truffle.polyglot.PolyglotLanguageContext.ToHostValueNode;
import com.oracle.truffle.polyglot.PolyglotLanguageContextFactory.ToGuestValueNodeGen;
import com.oracle.truffle.polyglot.PolyglotLanguageContextFactory.ToGuestValuesNodeGen;
import com.oracle.truffle.polyglot.PolyglotLanguageContextFactory.ToHostValueNodeGen;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.AsClassLiteralNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.AsDateNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.AsDurationNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.AsInstantNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.AsNativePointerNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.AsTimeNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.AsTimeZoneNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.AsTypeLiteralNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.CanExecuteNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.CanInstantiateNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.CanInvokeNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ExecuteNoArgsNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ExecuteNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ExecuteVoidNoArgsNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ExecuteVoidNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetArrayElementNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetArraySizeNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetBufferSizeNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetHashEntriesIteratorNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetHashKeysIteratorNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetHashSizeNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetHashValueNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetHashValueOrDefaultNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetHashValuesIteratorNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetIteratorNextElementNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetIteratorNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetMemberKeysNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetMemberNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetMetaParentsNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetMetaQualifiedNameNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.GetMetaSimpleNameNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.HasArrayElementsNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.HasBufferElementsNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.HasHashEntriesNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.HasHashEntryNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.HasIteratorNextElementNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.HasIteratorNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.HasMemberNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.HasMembersNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.HasMetaParentsNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.InvokeNoArgsNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.InvokeNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsBufferWritableNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsDateNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsDurationNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsExceptionNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsIteratorNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsMetaInstanceNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsMetaObjectNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsNativePointerNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsNullNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsTimeNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.IsTimeZoneNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.NewInstanceNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.PutHashEntryNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.PutMemberNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ReadBufferByteNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ReadBufferDoubleNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ReadBufferFloatNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ReadBufferIntNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ReadBufferLongNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ReadBufferShortNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.RemoveArrayElementNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.RemoveHashEntryNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.RemoveMemberNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.SetArrayElementNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.SharedExecuteNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.SharedInvokeNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.ThrowExceptionNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.WriteBufferByteNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.WriteBufferDoubleNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.WriteBufferFloatNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.WriteBufferIntNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.WriteBufferLongNode;
import com.oracle.truffle.polyglot.PolyglotValueDispatch.InteropValue.WriteBufferShortNode;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;
@GeneratedBy(PolyglotValueDispatch.class)
@SuppressWarnings({"javadoc", "unused"})
final class PolyglotValueDispatchFactory {
private static final LibraryFactory INTEROP_LIBRARY_ = LibraryFactory.resolve(InteropLibrary.class);
@GeneratedBy(InteropValue.class)
static final class InteropValueFactory {
/**
* Debug Info:
* Specialization {@link IsDateNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link IsDateNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(IsDateNode.class)
@SuppressWarnings("javadoc")
static final class IsDateNodeGen extends IsDateNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link IsDateNode#doCached}
* 1: SpecializationActive {@link IsDateNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private IsDateNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.IsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.IsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.IsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return IsDateNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.IsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsDateNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.IsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.IsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return IsDateNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.IsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.IsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return IsDateNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static IsDateNode create(InteropValue interop) {
return new IsDateNodeGen(interop);
}
@GeneratedBy(IsDateNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link IsDateNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link AsDateNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link AsDateNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(AsDateNode.class)
@SuppressWarnings("javadoc")
static final class AsDateNodeGen extends AsDateNode {
private static final StateField CACHED0__AS_DATE_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_AsDateNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link AsDateNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__AS_DATE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link AsDateNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_AsDateNode_UPDATER.subUpdater(2, 1)));
/**
* State Info:
* 0: SpecializationActive {@link AsDateNode#doCached}
* 1: SpecializationActive {@link AsDateNode#doCached}
* 2: InlinedCache
* Specialization: {@link AsDateNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private AsDateNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.AsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] || SpecializationActive[InteropValue.AsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.AsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return AsDateNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.AsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsDateNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.AsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.AsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return AsDateNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.AsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.AsDateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return AsDateNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static AsDateNode create(InteropValue interop) {
return new AsDateNodeGen(interop);
}
@GeneratedBy(AsDateNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link AsDateNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link AsDateNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link IsTimeNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link IsTimeNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(IsTimeNode.class)
@SuppressWarnings("javadoc")
static final class IsTimeNodeGen extends IsTimeNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link IsTimeNode#doCached}
* 1: SpecializationActive {@link IsTimeNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private IsTimeNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.IsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.IsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.IsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return IsTimeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.IsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsTimeNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.IsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.IsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return IsTimeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.IsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.IsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return IsTimeNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static IsTimeNode create(InteropValue interop) {
return new IsTimeNodeGen(interop);
}
@GeneratedBy(IsTimeNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link IsTimeNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link AsTimeNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link AsTimeNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(AsTimeNode.class)
@SuppressWarnings("javadoc")
static final class AsTimeNodeGen extends AsTimeNode {
private static final StateField CACHED0__AS_TIME_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_AsTimeNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link AsTimeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__AS_TIME_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link AsTimeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_AsTimeNode_UPDATER.subUpdater(2, 1)));
/**
* State Info:
* 0: SpecializationActive {@link AsTimeNode#doCached}
* 1: SpecializationActive {@link AsTimeNode#doCached}
* 2: InlinedCache
* Specialization: {@link AsTimeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private AsTimeNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.AsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] || SpecializationActive[InteropValue.AsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.AsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return AsTimeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.AsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsTimeNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.AsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.AsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return AsTimeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.AsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.AsTimeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return AsTimeNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static AsTimeNode create(InteropValue interop) {
return new AsTimeNodeGen(interop);
}
@GeneratedBy(AsTimeNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link AsTimeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link AsTimeNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link IsTimeZoneNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link IsTimeZoneNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(IsTimeZoneNode.class)
@SuppressWarnings("javadoc")
static final class IsTimeZoneNodeGen extends IsTimeZoneNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link IsTimeZoneNode#doCached}
* 1: SpecializationActive {@link IsTimeZoneNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private IsTimeZoneNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.IsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.IsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.IsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return IsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.IsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.IsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.IsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return IsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.IsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.IsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return IsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static IsTimeZoneNode create(InteropValue interop) {
return new IsTimeZoneNodeGen(interop);
}
@GeneratedBy(IsTimeZoneNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link IsTimeZoneNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link AsTimeZoneNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link AsTimeZoneNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(AsTimeZoneNode.class)
@SuppressWarnings("javadoc")
static final class AsTimeZoneNodeGen extends AsTimeZoneNode {
private static final StateField CACHED0__AS_TIME_ZONE_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_AsTimeZoneNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link AsTimeZoneNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__AS_TIME_ZONE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link AsTimeZoneNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_AsTimeZoneNode_UPDATER.subUpdater(2, 1)));
/**
* State Info:
* 0: SpecializationActive {@link AsTimeZoneNode#doCached}
* 1: SpecializationActive {@link AsTimeZoneNode#doCached}
* 2: InlinedCache
* Specialization: {@link AsTimeZoneNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private AsTimeZoneNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.AsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] || SpecializationActive[InteropValue.AsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.AsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return AsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.AsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.AsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.AsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return AsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.AsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.AsTimeZoneNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return AsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static AsTimeZoneNode create(InteropValue interop) {
return new AsTimeZoneNodeGen(interop);
}
@GeneratedBy(AsTimeZoneNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link AsTimeZoneNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link AsTimeZoneNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link IsDurationNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link IsDurationNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(IsDurationNode.class)
@SuppressWarnings("javadoc")
static final class IsDurationNodeGen extends IsDurationNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link IsDurationNode#doCached}
* 1: SpecializationActive {@link IsDurationNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private IsDurationNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.IsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.IsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.IsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return IsDurationNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.IsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsDurationNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.IsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.IsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return IsDurationNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.IsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.IsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return IsDurationNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static IsDurationNode create(InteropValue interop) {
return new IsDurationNodeGen(interop);
}
@GeneratedBy(IsDurationNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link IsDurationNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link AsDurationNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link AsDurationNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(AsDurationNode.class)
@SuppressWarnings("javadoc")
static final class AsDurationNodeGen extends AsDurationNode {
private static final StateField CACHED0__AS_DURATION_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_AsDurationNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link AsDurationNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__AS_DURATION_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link AsDurationNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_AsDurationNode_UPDATER.subUpdater(2, 1)));
/**
* State Info:
* 0: SpecializationActive {@link AsDurationNode#doCached}
* 1: SpecializationActive {@link AsDurationNode#doCached}
* 2: InlinedCache
* Specialization: {@link AsDurationNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private AsDurationNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.AsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] || SpecializationActive[InteropValue.AsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.AsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return AsDurationNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.AsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsDurationNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.AsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.AsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return AsDurationNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.AsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.AsDurationNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return AsDurationNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static AsDurationNode create(InteropValue interop) {
return new AsDurationNodeGen(interop);
}
@GeneratedBy(AsDurationNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link AsDurationNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link AsDurationNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link AsInstantNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link AsInstantNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(AsInstantNode.class)
@SuppressWarnings("javadoc")
static final class AsInstantNodeGen extends AsInstantNode {
private static final StateField CACHED0__AS_INSTANT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_AsInstantNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link AsInstantNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__AS_INSTANT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link AsInstantNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_AsInstantNode_UPDATER.subUpdater(2, 1)));
/**
* State Info:
* 0: SpecializationActive {@link AsInstantNode#doCached}
* 1: SpecializationActive {@link AsInstantNode#doCached}
* 2: InlinedCache
* Specialization: {@link AsInstantNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private AsInstantNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.AsInstantNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] || SpecializationActive[InteropValue.AsInstantNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.AsInstantNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return AsInstantNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.AsInstantNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsInstantNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.AsInstantNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.AsInstantNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return AsInstantNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.AsInstantNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.AsInstantNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return AsInstantNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static AsInstantNode create(InteropValue interop) {
return new AsInstantNodeGen(interop);
}
@GeneratedBy(AsInstantNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link AsInstantNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link AsInstantNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link AsClassLiteralNode#doCached}
* Activation probability: 1.00000
* With/without class size: 32/9 bytes
*
*/
@GeneratedBy(AsClassLiteralNode.class)
@SuppressWarnings("javadoc")
static final class AsClassLiteralNodeGen extends AsClassLiteralNode {
private static final StateField STATE_0_AsClassLiteralNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link AsClassLiteralNode#doCached}
* Parameter: {@link PolyglotToHostNode} toHost
* Inline method: {@link PolyglotToHostNodeGen#inline}
*/
private static final PolyglotToHostNode INLINED_TO_HOST_ = PolyglotToHostNodeGen.inline(InlineTarget.create(PolyglotToHostNode.class, STATE_0_AsClassLiteralNode_UPDATER.subUpdater(0, 4), ReferenceField.create(MethodHandles.lookup(), "toHost__field1_", Object.class), ReferenceField.create(MethodHandles.lookup(), "toHost__field2_", Node.class)));
/**
* State Info:
* 0-3: InlinedCache
* Specialization: {@link AsClassLiteralNode#doCached}
* Parameter: {@link PolyglotToHostNode} toHost
* Inline method: {@link PolyglotToHostNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link AsClassLiteralNode#doCached}
* Parameter: {@link PolyglotToHostNode} toHost
* Inline method: {@link PolyglotToHostNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object toHost__field1_;
/**
* Source Info:
* Specialization: {@link AsClassLiteralNode#doCached}
* Parameter: {@link PolyglotToHostNode} toHost
* Inline method: {@link PolyglotToHostNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toHost__field2_;
private AsClassLiteralNodeGen(InteropValue interop) {
super(interop);
}
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
return doCached(arg0Value, arg1Value, arg2Value, INLINED_TO_HOST_);
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@NeverDefault
public static AsClassLiteralNode create(InteropValue interop) {
return new AsClassLiteralNodeGen(interop);
}
}
/**
* Debug Info:
* Specialization {@link AsTypeLiteralNode#doCached}
* Activation probability: 1.00000
* With/without class size: 32/9 bytes
*
*/
@GeneratedBy(AsTypeLiteralNode.class)
@SuppressWarnings("javadoc")
static final class AsTypeLiteralNodeGen extends AsTypeLiteralNode {
private static final StateField STATE_0_AsTypeLiteralNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link AsTypeLiteralNode#doCached}
* Parameter: {@link PolyglotToHostNode} toHost
* Inline method: {@link PolyglotToHostNodeGen#inline}
*/
private static final PolyglotToHostNode INLINED_TO_HOST_ = PolyglotToHostNodeGen.inline(InlineTarget.create(PolyglotToHostNode.class, STATE_0_AsTypeLiteralNode_UPDATER.subUpdater(0, 4), ReferenceField.create(MethodHandles.lookup(), "toHost__field1_", Object.class), ReferenceField.create(MethodHandles.lookup(), "toHost__field2_", Node.class)));
/**
* State Info:
* 0-3: InlinedCache
* Specialization: {@link AsTypeLiteralNode#doCached}
* Parameter: {@link PolyglotToHostNode} toHost
* Inline method: {@link PolyglotToHostNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link AsTypeLiteralNode#doCached}
* Parameter: {@link PolyglotToHostNode} toHost
* Inline method: {@link PolyglotToHostNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object toHost__field1_;
/**
* Source Info:
* Specialization: {@link AsTypeLiteralNode#doCached}
* Parameter: {@link PolyglotToHostNode} toHost
* Inline method: {@link PolyglotToHostNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toHost__field2_;
private AsTypeLiteralNodeGen(InteropValue interop) {
super(interop);
}
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
return doCached(arg0Value, arg1Value, arg2Value, INLINED_TO_HOST_);
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@NeverDefault
public static AsTypeLiteralNode create(InteropValue interop) {
return new AsTypeLiteralNodeGen(interop);
}
}
/**
* Debug Info:
* Specialization {@link IsNativePointerNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link IsNativePointerNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(IsNativePointerNode.class)
@SuppressWarnings("javadoc")
static final class IsNativePointerNodeGen extends IsNativePointerNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link IsNativePointerNode#doCached}
* 1: SpecializationActive {@link IsNativePointerNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private IsNativePointerNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.IsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.IsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.IsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.natives_.accepts(arg1Value))) {
Node node__ = (s0_);
return IsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.natives_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.IsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary natives__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, node__, natives__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.IsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.natives_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.natives_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary natives__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(natives__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'natives' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.natives_ = natives__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.IsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return IsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.natives_);
}
break;
}
}
}
{
InteropLibrary natives__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
natives__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.IsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.IsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return IsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, node__, natives__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static IsNativePointerNode create(InteropValue interop) {
return new IsNativePointerNodeGen(interop);
}
@GeneratedBy(IsNativePointerNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link IsNativePointerNode#doCached}
* Parameter: {@link InteropLibrary} natives
*/
@Child InteropLibrary natives_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link AsNativePointerNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link AsNativePointerNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(AsNativePointerNode.class)
@SuppressWarnings("javadoc")
static final class AsNativePointerNodeGen extends AsNativePointerNode {
private static final StateField CACHED0__AS_NATIVE_POINTER_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_AsNativePointerNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link AsNativePointerNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__AS_NATIVE_POINTER_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link AsNativePointerNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_AsNativePointerNode_UPDATER.subUpdater(2, 1)));
/**
* State Info:
* 0: SpecializationActive {@link AsNativePointerNode#doCached}
* 1: SpecializationActive {@link AsNativePointerNode#doCached}
* 2: InlinedCache
* Specialization: {@link AsNativePointerNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private AsNativePointerNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.AsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] || SpecializationActive[InteropValue.AsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.AsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.natives_.accepts(arg1Value))) {
Node node__ = (s0_);
return AsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.natives_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.AsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary natives__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, node__, natives__, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.AsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.natives_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.natives_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary natives__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(natives__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)' cache 'natives' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.natives_ = natives__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.AsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return AsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.natives_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary natives__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
natives__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.AsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.AsNativePointerNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return AsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, node__, natives__, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static AsNativePointerNode create(InteropValue interop) {
return new AsNativePointerNodeGen(interop);
}
@GeneratedBy(AsNativePointerNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link AsNativePointerNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link AsNativePointerNode#doCached}
* Parameter: {@link InteropLibrary} natives
*/
@Child InteropLibrary natives_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link HasArrayElementsNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link HasArrayElementsNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(HasArrayElementsNode.class)
@SuppressWarnings("javadoc")
static final class HasArrayElementsNodeGen extends HasArrayElementsNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link HasArrayElementsNode#doCached}
* 1: SpecializationActive {@link HasArrayElementsNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private HasArrayElementsNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.HasArrayElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.HasArrayElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.HasArrayElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
Node node__ = (s0_);
return HasArrayElementsNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.HasArrayElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return HasArrayElementsNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.HasArrayElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.arrays_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary arrays__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(arrays__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'arrays' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.arrays_ = arrays__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.HasArrayElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return HasArrayElementsNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_);
}
break;
}
}
}
{
InteropLibrary arrays__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.HasArrayElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.HasArrayElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return HasArrayElementsNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static HasArrayElementsNode create(InteropValue interop) {
return new HasArrayElementsNodeGen(interop);
}
@GeneratedBy(HasArrayElementsNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link HasArrayElementsNode#doCached}
* Parameter: {@link InteropLibrary} arrays
*/
@Child InteropLibrary arrays_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link GetMemberKeysNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link GetMemberKeysNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(GetMemberKeysNode.class)
@SuppressWarnings("javadoc")
static final class GetMemberKeysNodeGen extends GetMemberKeysNode {
private static final StateField CACHED0__GET_MEMBER_KEYS_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_GetMemberKeysNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED0_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, CACHED0__GET_MEMBER_KEYS_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 2), ReferenceField.create(Cached0Data.lookup_(), "cached0_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__GET_MEMBER_KEYS_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED1_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, STATE_0_GetMemberKeysNode_UPDATER.subUpdater(2, 2), ReferenceField.create(MethodHandles.lookup(), "cached1_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_GetMemberKeysNode_UPDATER.subUpdater(4, 1)));
/**
* State Info:
* 0: SpecializationActive {@link GetMemberKeysNode#doCached}
* 1: SpecializationActive {@link GetMemberKeysNode#doCached}
* 2-3: InlinedCache
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toHost__field1_;
private GetMemberKeysNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.GetMemberKeysNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile)] || SpecializationActive[InteropValue.GetMemberKeysNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.GetMemberKeysNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return GetMemberKeysNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.GetMemberKeysNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetMemberKeysNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.GetMemberKeysNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.GetMemberKeysNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return GetMemberKeysNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.GetMemberKeysNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.GetMemberKeysNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return GetMemberKeysNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static GetMemberKeysNode create(InteropValue interop) {
return new GetMemberKeysNodeGen(interop);
}
@GeneratedBy(GetMemberKeysNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 2: InlinedCache
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
/**
* Source Info:
* Specialization: {@link GetMemberKeysNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toHost__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link GetArrayElementNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link GetArrayElementNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(GetArrayElementNode.class)
@SuppressWarnings("javadoc")
static final class GetArrayElementNodeGen extends GetArrayElementNode {
private static final StateField CACHED0__GET_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_GetArrayElementNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED0_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, CACHED0__GET_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 2), ReferenceField.create(Cached0Data.lookup_(), "cached0_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__GET_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__GET_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED1_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, STATE_0_GetArrayElementNode_UPDATER.subUpdater(2, 2), ReferenceField.create(MethodHandles.lookup(), "cached1_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_GetArrayElementNode_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_GetArrayElementNode_UPDATER.subUpdater(5, 1)));
/**
* State Info:
* 0: SpecializationActive {@link GetArrayElementNode#doCached}
* 1: SpecializationActive {@link GetArrayElementNode#doCached}
* 2-3: InlinedCache
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toHost__field1_;
private GetArrayElementNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.GetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.GetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.GetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
Node node__ = (s0_);
return GetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.GetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.GetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.arrays_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary arrays__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(arrays__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)' cache 'arrays' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.arrays_ = arrays__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.GetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return GetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
break;
}
}
}
{
InteropLibrary arrays__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.GetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.GetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return GetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static GetArrayElementNode create(InteropValue interop) {
return new GetArrayElementNodeGen(interop);
}
@GeneratedBy(GetArrayElementNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 2: InlinedCache
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link InteropLibrary} arrays
*/
@Child InteropLibrary arrays_;
/**
* Source Info:
* Specialization: {@link GetArrayElementNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toHost__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link SetArrayElementNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link SetArrayElementNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(SetArrayElementNode.class)
@SuppressWarnings("javadoc")
static final class SetArrayElementNodeGen extends SetArrayElementNode {
private static final StateField CACHED0__SET_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_SetArrayElementNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link ToGuestValueNode} toGuestValue
* Inline method: {@link ToGuestValueNodeGen#inline}
*/
private static final ToGuestValueNode INLINED_CACHED0_TO_GUEST_VALUE_ = ToGuestValueNodeGen.inline(InlineTarget.create(ToGuestValueNode.class, CACHED0__SET_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 3), ReferenceField.create(Cached0Data.lookup_(), "cached0_toGuestValue__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__SET_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__SET_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__SET_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(5, 1)));
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link ToGuestValueNode} toGuestValue
* Inline method: {@link ToGuestValueNodeGen#inline}
*/
private static final ToGuestValueNode INLINED_CACHED1_TO_GUEST_VALUE_ = ToGuestValueNodeGen.inline(InlineTarget.create(ToGuestValueNode.class, STATE_0_SetArrayElementNode_UPDATER.subUpdater(2, 3), ReferenceField.create(MethodHandles.lookup(), "cached1_toGuestValue__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_SetArrayElementNode_UPDATER.subUpdater(5, 1)));
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_SetArrayElementNode_UPDATER.subUpdater(6, 1)));
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_SetArrayElementNode_UPDATER.subUpdater(7, 1)));
/**
* State Info:
* 0: SpecializationActive {@link SetArrayElementNode#doCached}
* 1: SpecializationActive {@link SetArrayElementNode#doCached}
* 2-4: InlinedCache
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link ToGuestValueNode} toGuestValue
* Inline method: {@link ToGuestValueNodeGen#inline}
* 5: InlinedCache
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 6: InlinedCache
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 7: InlinedCache
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link ToGuestValueNode} toGuestValue
* Inline method: {@link ToGuestValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toGuestValue__field1_;
private SetArrayElementNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.SetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.SetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.SetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
Node node__ = (s0_);
return SetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_, INLINED_CACHED0_TO_GUEST_VALUE_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.SetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return SetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__, INLINED_CACHED1_TO_GUEST_VALUE_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.SetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.arrays_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary arrays__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(arrays__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)' cache 'arrays' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.arrays_ = arrays__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.SetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return SetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_, INLINED_CACHED0_TO_GUEST_VALUE_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
break;
}
}
}
{
InteropLibrary arrays__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.SetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.SetArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return SetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__, INLINED_CACHED1_TO_GUEST_VALUE_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static SetArrayElementNode create(InteropValue interop) {
return new SetArrayElementNodeGen(interop);
}
@GeneratedBy(SetArrayElementNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-2: InlinedCache
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link ToGuestValueNode} toGuestValue
* Inline method: {@link ToGuestValueNodeGen#inline}
* 3: InlinedCache
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 4: InlinedCache
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link InteropLibrary} arrays
*/
@Child InteropLibrary arrays_;
/**
* Source Info:
* Specialization: {@link SetArrayElementNode#doCached}
* Parameter: {@link ToGuestValueNode} toGuestValue
* Inline method: {@link ToGuestValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toGuestValue__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link RemoveArrayElementNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link RemoveArrayElementNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(RemoveArrayElementNode.class)
@SuppressWarnings("javadoc")
static final class RemoveArrayElementNodeGen extends RemoveArrayElementNode {
private static final StateField CACHED0__REMOVE_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_RemoveArrayElementNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link RemoveArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__REMOVE_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link RemoveArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__REMOVE_ARRAY_ELEMENT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(1, 1)));
/**
* Source Info:
* Specialization: {@link RemoveArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_RemoveArrayElementNode_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link RemoveArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_RemoveArrayElementNode_UPDATER.subUpdater(3, 1)));
/**
* State Info:
* 0: SpecializationActive {@link RemoveArrayElementNode#doCached}
* 1: SpecializationActive {@link RemoveArrayElementNode#doCached}
* 2: InlinedCache
* Specialization: {@link RemoveArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link RemoveArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private RemoveArrayElementNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.RemoveArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.RemoveArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.RemoveArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
Node node__ = (s0_);
return RemoveArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.RemoveArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return RemoveArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.RemoveArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.arrays_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary arrays__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(arrays__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)' cache 'arrays' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.arrays_ = arrays__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.RemoveArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return RemoveArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_);
}
break;
}
}
}
{
InteropLibrary arrays__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.RemoveArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.RemoveArrayElementNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return RemoveArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static RemoveArrayElementNode create(InteropValue interop) {
return new RemoveArrayElementNodeGen(interop);
}
@GeneratedBy(RemoveArrayElementNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link RemoveArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 1: InlinedCache
* Specialization: {@link RemoveArrayElementNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link RemoveArrayElementNode#doCached}
* Parameter: {@link InteropLibrary} arrays
*/
@Child InteropLibrary arrays_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link GetArraySizeNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link GetArraySizeNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(GetArraySizeNode.class)
@SuppressWarnings("javadoc")
static final class GetArraySizeNodeGen extends GetArraySizeNode {
private static final StateField CACHED0__GET_ARRAY_SIZE_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_GetArraySizeNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link GetArraySizeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__GET_ARRAY_SIZE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link GetArraySizeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_GetArraySizeNode_UPDATER.subUpdater(2, 1)));
/**
* State Info:
* 0: SpecializationActive {@link GetArraySizeNode#doCached}
* 1: SpecializationActive {@link GetArraySizeNode#doCached}
* 2: InlinedCache
* Specialization: {@link GetArraySizeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private GetArraySizeNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.GetArraySizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] || SpecializationActive[InteropValue.GetArraySizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.GetArraySizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
Node node__ = (s0_);
return GetArraySizeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.GetArraySizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetArraySizeNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.GetArraySizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.arrays_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.arrays_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary arrays__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(arrays__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)' cache 'arrays' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.arrays_ = arrays__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.GetArraySizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return GetArraySizeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.arrays_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary arrays__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.GetArraySizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.GetArraySizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return GetArraySizeNode.doCached(arg0Value, arg1Value, arg2Value, node__, arrays__, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static GetArraySizeNode create(InteropValue interop) {
return new GetArraySizeNodeGen(interop);
}
@GeneratedBy(GetArraySizeNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link GetArraySizeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link GetArraySizeNode#doCached}
* Parameter: {@link InteropLibrary} arrays
*/
@Child InteropLibrary arrays_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link HasBufferElementsNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link HasBufferElementsNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(HasBufferElementsNode.class)
@SuppressWarnings("javadoc")
static final class HasBufferElementsNodeGen extends HasBufferElementsNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link HasBufferElementsNode#doCached}
* 1: SpecializationActive {@link HasBufferElementsNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private HasBufferElementsNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.HasBufferElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.HasBufferElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.HasBufferElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return HasBufferElementsNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.HasBufferElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return HasBufferElementsNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.HasBufferElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.HasBufferElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return HasBufferElementsNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.HasBufferElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.HasBufferElementsNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return HasBufferElementsNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static HasBufferElementsNode create(InteropValue interop) {
return new HasBufferElementsNodeGen(interop);
}
@GeneratedBy(HasBufferElementsNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link HasBufferElementsNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link IsBufferWritableNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link IsBufferWritableNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(IsBufferWritableNode.class)
@SuppressWarnings("javadoc")
static final class IsBufferWritableNodeGen extends IsBufferWritableNode {
private static final StateField CACHED0__IS_BUFFER_WRITABLE_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_IsBufferWritableNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link IsBufferWritableNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__IS_BUFFER_WRITABLE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link IsBufferWritableNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_IsBufferWritableNode_UPDATER.subUpdater(2, 1)));
/**
* State Info:
* 0: SpecializationActive {@link IsBufferWritableNode#doCached}
* 1: SpecializationActive {@link IsBufferWritableNode#doCached}
* 2: InlinedCache
* Specialization: {@link IsBufferWritableNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private IsBufferWritableNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.IsBufferWritableNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] || SpecializationActive[InteropValue.IsBufferWritableNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.IsBufferWritableNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return IsBufferWritableNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.IsBufferWritableNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsBufferWritableNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.IsBufferWritableNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.IsBufferWritableNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return IsBufferWritableNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.IsBufferWritableNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.IsBufferWritableNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return IsBufferWritableNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static IsBufferWritableNode create(InteropValue interop) {
return new IsBufferWritableNodeGen(interop);
}
@GeneratedBy(IsBufferWritableNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link IsBufferWritableNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link IsBufferWritableNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link GetBufferSizeNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link GetBufferSizeNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(GetBufferSizeNode.class)
@SuppressWarnings("javadoc")
static final class GetBufferSizeNodeGen extends GetBufferSizeNode {
private static final StateField CACHED0__GET_BUFFER_SIZE_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_GetBufferSizeNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link GetBufferSizeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__GET_BUFFER_SIZE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link GetBufferSizeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_GetBufferSizeNode_UPDATER.subUpdater(2, 1)));
/**
* State Info:
* 0: SpecializationActive {@link GetBufferSizeNode#doCached}
* 1: SpecializationActive {@link GetBufferSizeNode#doCached}
* 2: InlinedCache
* Specialization: {@link GetBufferSizeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private GetBufferSizeNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.GetBufferSizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] || SpecializationActive[InteropValue.GetBufferSizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.GetBufferSizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return GetBufferSizeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.GetBufferSizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetBufferSizeNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.GetBufferSizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.GetBufferSizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return GetBufferSizeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.GetBufferSizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.GetBufferSizeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return GetBufferSizeNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static GetBufferSizeNode create(InteropValue interop) {
return new GetBufferSizeNodeGen(interop);
}
@GeneratedBy(GetBufferSizeNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link GetBufferSizeNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link GetBufferSizeNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link ReadBufferByteNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link ReadBufferByteNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(ReadBufferByteNode.class)
@SuppressWarnings("javadoc")
static final class ReadBufferByteNodeGen extends ReadBufferByteNode {
private static final StateField CACHED0__READ_BUFFER_BYTE_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_ReadBufferByteNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED0_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, CACHED0__READ_BUFFER_BYTE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 2), ReferenceField.create(Cached0Data.lookup_(), "cached0_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_BYTE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_BYTE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED1_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, STATE_0_ReadBufferByteNode_UPDATER.subUpdater(2, 2), ReferenceField.create(MethodHandles.lookup(), "cached1_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferByteNode_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferByteNode_UPDATER.subUpdater(5, 1)));
/**
* State Info:
* 0: SpecializationActive {@link ReadBufferByteNode#doCached}
* 1: SpecializationActive {@link ReadBufferByteNode#doCached}
* 2-3: InlinedCache
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toHost__field1_;
private ReadBufferByteNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.ReadBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.ReadBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.ReadBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return ReadBufferByteNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.ReadBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return ReadBufferByteNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.ReadBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.ReadBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return ReadBufferByteNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.ReadBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.ReadBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return ReadBufferByteNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static ReadBufferByteNode create(InteropValue interop) {
return new ReadBufferByteNodeGen(interop);
}
@GeneratedBy(ReadBufferByteNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 2: InlinedCache
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
/**
* Source Info:
* Specialization: {@link ReadBufferByteNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toHost__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link WriteBufferByteNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link WriteBufferByteNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(WriteBufferByteNode.class)
@SuppressWarnings("javadoc")
static final class WriteBufferByteNodeGen extends WriteBufferByteNode {
private static final StateField CACHED0__WRITE_BUFFER_BYTE_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_WriteBufferByteNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_BYTE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_BYTE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(1, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_BYTE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferByteNode_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferByteNode_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferByteNode_UPDATER.subUpdater(4, 1)));
/**
* State Info:
* 0: SpecializationActive {@link WriteBufferByteNode#doCached}
* 1: SpecializationActive {@link WriteBufferByteNode#doCached}
* 2: InlinedCache
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 4: InlinedCache
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private WriteBufferByteNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.WriteBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.WriteBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.WriteBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return WriteBufferByteNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.WriteBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return WriteBufferByteNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.WriteBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.WriteBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return WriteBufferByteNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.WriteBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.WriteBufferByteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return WriteBufferByteNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static WriteBufferByteNode create(InteropValue interop) {
return new WriteBufferByteNodeGen(interop);
}
@GeneratedBy(WriteBufferByteNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 1: InlinedCache
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 2: InlinedCache
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link WriteBufferByteNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link ReadBufferShortNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link ReadBufferShortNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(ReadBufferShortNode.class)
@SuppressWarnings("javadoc")
static final class ReadBufferShortNodeGen extends ReadBufferShortNode {
private static final StateField CACHED0__READ_BUFFER_SHORT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_ReadBufferShortNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED0_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, CACHED0__READ_BUFFER_SHORT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 2), ReferenceField.create(Cached0Data.lookup_(), "cached0_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_SHORT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_SHORT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED1_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, STATE_0_ReadBufferShortNode_UPDATER.subUpdater(2, 2), ReferenceField.create(MethodHandles.lookup(), "cached1_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferShortNode_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferShortNode_UPDATER.subUpdater(5, 1)));
/**
* State Info:
* 0: SpecializationActive {@link ReadBufferShortNode#doCached}
* 1: SpecializationActive {@link ReadBufferShortNode#doCached}
* 2-3: InlinedCache
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toHost__field1_;
private ReadBufferShortNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.ReadBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.ReadBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.ReadBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return ReadBufferShortNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.ReadBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return ReadBufferShortNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.ReadBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.ReadBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return ReadBufferShortNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.ReadBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.ReadBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return ReadBufferShortNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static ReadBufferShortNode create(InteropValue interop) {
return new ReadBufferShortNodeGen(interop);
}
@GeneratedBy(ReadBufferShortNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 2: InlinedCache
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
/**
* Source Info:
* Specialization: {@link ReadBufferShortNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toHost__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link WriteBufferShortNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link WriteBufferShortNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(WriteBufferShortNode.class)
@SuppressWarnings("javadoc")
static final class WriteBufferShortNodeGen extends WriteBufferShortNode {
private static final StateField CACHED0__WRITE_BUFFER_SHORT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_WriteBufferShortNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_SHORT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_SHORT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(1, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_SHORT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferShortNode_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferShortNode_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferShortNode_UPDATER.subUpdater(4, 1)));
/**
* State Info:
* 0: SpecializationActive {@link WriteBufferShortNode#doCached}
* 1: SpecializationActive {@link WriteBufferShortNode#doCached}
* 2: InlinedCache
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 4: InlinedCache
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private WriteBufferShortNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.WriteBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.WriteBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.WriteBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return WriteBufferShortNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.WriteBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return WriteBufferShortNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.WriteBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.WriteBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return WriteBufferShortNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.WriteBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.WriteBufferShortNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return WriteBufferShortNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static WriteBufferShortNode create(InteropValue interop) {
return new WriteBufferShortNodeGen(interop);
}
@GeneratedBy(WriteBufferShortNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 1: InlinedCache
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 2: InlinedCache
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link WriteBufferShortNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link ReadBufferIntNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link ReadBufferIntNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(ReadBufferIntNode.class)
@SuppressWarnings("javadoc")
static final class ReadBufferIntNodeGen extends ReadBufferIntNode {
private static final StateField CACHED0__READ_BUFFER_INT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_ReadBufferIntNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED0_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, CACHED0__READ_BUFFER_INT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 2), ReferenceField.create(Cached0Data.lookup_(), "cached0_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_INT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_INT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED1_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, STATE_0_ReadBufferIntNode_UPDATER.subUpdater(2, 2), ReferenceField.create(MethodHandles.lookup(), "cached1_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferIntNode_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferIntNode_UPDATER.subUpdater(5, 1)));
/**
* State Info:
* 0: SpecializationActive {@link ReadBufferIntNode#doCached}
* 1: SpecializationActive {@link ReadBufferIntNode#doCached}
* 2-3: InlinedCache
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toHost__field1_;
private ReadBufferIntNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.ReadBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.ReadBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.ReadBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return ReadBufferIntNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.ReadBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return ReadBufferIntNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.ReadBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.ReadBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return ReadBufferIntNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.ReadBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.ReadBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return ReadBufferIntNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static ReadBufferIntNode create(InteropValue interop) {
return new ReadBufferIntNodeGen(interop);
}
@GeneratedBy(ReadBufferIntNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 2: InlinedCache
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
/**
* Source Info:
* Specialization: {@link ReadBufferIntNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toHost__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link WriteBufferIntNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link WriteBufferIntNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(WriteBufferIntNode.class)
@SuppressWarnings("javadoc")
static final class WriteBufferIntNodeGen extends WriteBufferIntNode {
private static final StateField CACHED0__WRITE_BUFFER_INT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_WriteBufferIntNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_INT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_INT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(1, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_INT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferIntNode_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferIntNode_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferIntNode_UPDATER.subUpdater(4, 1)));
/**
* State Info:
* 0: SpecializationActive {@link WriteBufferIntNode#doCached}
* 1: SpecializationActive {@link WriteBufferIntNode#doCached}
* 2: InlinedCache
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 4: InlinedCache
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private WriteBufferIntNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.WriteBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.WriteBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.WriteBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return WriteBufferIntNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.WriteBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return WriteBufferIntNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.WriteBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.WriteBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return WriteBufferIntNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.WriteBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.WriteBufferIntNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return WriteBufferIntNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static WriteBufferIntNode create(InteropValue interop) {
return new WriteBufferIntNodeGen(interop);
}
@GeneratedBy(WriteBufferIntNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 1: InlinedCache
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 2: InlinedCache
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link WriteBufferIntNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link ReadBufferLongNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link ReadBufferLongNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(ReadBufferLongNode.class)
@SuppressWarnings("javadoc")
static final class ReadBufferLongNodeGen extends ReadBufferLongNode {
private static final StateField CACHED0__READ_BUFFER_LONG_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_ReadBufferLongNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED0_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, CACHED0__READ_BUFFER_LONG_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 2), ReferenceField.create(Cached0Data.lookup_(), "cached0_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_LONG_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_LONG_NODE_CACHED0_STATE_0_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED1_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, STATE_0_ReadBufferLongNode_UPDATER.subUpdater(2, 2), ReferenceField.create(MethodHandles.lookup(), "cached1_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferLongNode_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferLongNode_UPDATER.subUpdater(5, 1)));
/**
* State Info:
* 0: SpecializationActive {@link ReadBufferLongNode#doCached}
* 1: SpecializationActive {@link ReadBufferLongNode#doCached}
* 2-3: InlinedCache
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toHost__field1_;
private ReadBufferLongNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.ReadBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.ReadBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.ReadBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return ReadBufferLongNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.ReadBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return ReadBufferLongNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.ReadBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.ReadBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return ReadBufferLongNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.ReadBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.ReadBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return ReadBufferLongNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static ReadBufferLongNode create(InteropValue interop) {
return new ReadBufferLongNodeGen(interop);
}
@GeneratedBy(ReadBufferLongNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 2: InlinedCache
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
/**
* Source Info:
* Specialization: {@link ReadBufferLongNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toHost__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link WriteBufferLongNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link WriteBufferLongNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(WriteBufferLongNode.class)
@SuppressWarnings("javadoc")
static final class WriteBufferLongNodeGen extends WriteBufferLongNode {
private static final StateField CACHED0__WRITE_BUFFER_LONG_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_WriteBufferLongNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_LONG_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_LONG_NODE_CACHED0_STATE_0_UPDATER.subUpdater(1, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_LONG_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferLongNode_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferLongNode_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferLongNode_UPDATER.subUpdater(4, 1)));
/**
* State Info:
* 0: SpecializationActive {@link WriteBufferLongNode#doCached}
* 1: SpecializationActive {@link WriteBufferLongNode#doCached}
* 2: InlinedCache
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 4: InlinedCache
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private WriteBufferLongNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.WriteBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.WriteBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.WriteBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return WriteBufferLongNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.WriteBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return WriteBufferLongNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.WriteBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.WriteBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return WriteBufferLongNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.WriteBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.WriteBufferLongNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return WriteBufferLongNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static WriteBufferLongNode create(InteropValue interop) {
return new WriteBufferLongNodeGen(interop);
}
@GeneratedBy(WriteBufferLongNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 1: InlinedCache
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 2: InlinedCache
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link WriteBufferLongNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link ReadBufferFloatNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link ReadBufferFloatNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(ReadBufferFloatNode.class)
@SuppressWarnings("javadoc")
static final class ReadBufferFloatNodeGen extends ReadBufferFloatNode {
private static final StateField CACHED0__READ_BUFFER_FLOAT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_ReadBufferFloatNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED0_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, CACHED0__READ_BUFFER_FLOAT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 2), ReferenceField.create(Cached0Data.lookup_(), "cached0_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_FLOAT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_FLOAT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED1_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, STATE_0_ReadBufferFloatNode_UPDATER.subUpdater(2, 2), ReferenceField.create(MethodHandles.lookup(), "cached1_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferFloatNode_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferFloatNode_UPDATER.subUpdater(5, 1)));
/**
* State Info:
* 0: SpecializationActive {@link ReadBufferFloatNode#doCached}
* 1: SpecializationActive {@link ReadBufferFloatNode#doCached}
* 2-3: InlinedCache
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toHost__field1_;
private ReadBufferFloatNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.ReadBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.ReadBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.ReadBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return ReadBufferFloatNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.ReadBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return ReadBufferFloatNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.ReadBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.ReadBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return ReadBufferFloatNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.ReadBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.ReadBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return ReadBufferFloatNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static ReadBufferFloatNode create(InteropValue interop) {
return new ReadBufferFloatNodeGen(interop);
}
@GeneratedBy(ReadBufferFloatNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 2: InlinedCache
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
/**
* Source Info:
* Specialization: {@link ReadBufferFloatNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toHost__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link WriteBufferFloatNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link WriteBufferFloatNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(WriteBufferFloatNode.class)
@SuppressWarnings("javadoc")
static final class WriteBufferFloatNodeGen extends WriteBufferFloatNode {
private static final StateField CACHED0__WRITE_BUFFER_FLOAT_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_WriteBufferFloatNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link WriteBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_FLOAT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_FLOAT_NODE_CACHED0_STATE_0_UPDATER.subUpdater(1, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferFloatNode_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferFloatNode_UPDATER.subUpdater(3, 1)));
/**
* State Info:
* 0: SpecializationActive {@link WriteBufferFloatNode#doCached}
* 1: SpecializationActive {@link WriteBufferFloatNode#doCached}
* 2: InlinedCache
* Specialization: {@link WriteBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link WriteBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private WriteBufferFloatNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.WriteBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.WriteBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.WriteBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return WriteBufferFloatNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.WriteBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return WriteBufferFloatNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.WriteBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.WriteBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return WriteBufferFloatNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.WriteBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.WriteBufferFloatNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return WriteBufferFloatNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static WriteBufferFloatNode create(InteropValue interop) {
return new WriteBufferFloatNodeGen(interop);
}
@GeneratedBy(WriteBufferFloatNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link WriteBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 1: InlinedCache
* Specialization: {@link WriteBufferFloatNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link WriteBufferFloatNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link ReadBufferDoubleNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link ReadBufferDoubleNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(ReadBufferDoubleNode.class)
@SuppressWarnings("javadoc")
static final class ReadBufferDoubleNodeGen extends ReadBufferDoubleNode {
private static final StateField CACHED0__READ_BUFFER_DOUBLE_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_ReadBufferDoubleNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED0_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, CACHED0__READ_BUFFER_DOUBLE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 2), ReferenceField.create(Cached0Data.lookup_(), "cached0_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_DOUBLE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__READ_BUFFER_DOUBLE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED1_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, STATE_0_ReadBufferDoubleNode_UPDATER.subUpdater(2, 2), ReferenceField.create(MethodHandles.lookup(), "cached1_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferDoubleNode_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_ReadBufferDoubleNode_UPDATER.subUpdater(5, 1)));
/**
* State Info:
* 0: SpecializationActive {@link ReadBufferDoubleNode#doCached}
* 1: SpecializationActive {@link ReadBufferDoubleNode#doCached}
* 2-3: InlinedCache
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toHost__field1_;
private ReadBufferDoubleNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.ReadBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.ReadBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.ReadBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return ReadBufferDoubleNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.ReadBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return ReadBufferDoubleNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.ReadBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.ReadBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return ReadBufferDoubleNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.ReadBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.ReadBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return ReadBufferDoubleNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static ReadBufferDoubleNode create(InteropValue interop) {
return new ReadBufferDoubleNodeGen(interop);
}
@GeneratedBy(ReadBufferDoubleNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 2: InlinedCache
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
/**
* Source Info:
* Specialization: {@link ReadBufferDoubleNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toHost__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link WriteBufferDoubleNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link WriteBufferDoubleNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(WriteBufferDoubleNode.class)
@SuppressWarnings("javadoc")
static final class WriteBufferDoubleNodeGen extends WriteBufferDoubleNode {
private static final StateField CACHED0__WRITE_BUFFER_DOUBLE_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_WriteBufferDoubleNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_DOUBLE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_DOUBLE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(1, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__WRITE_BUFFER_DOUBLE_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferDoubleNode_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_INDEX_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferDoubleNode_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_WriteBufferDoubleNode_UPDATER.subUpdater(4, 1)));
/**
* State Info:
* 0: SpecializationActive {@link WriteBufferDoubleNode#doCached}
* 1: SpecializationActive {@link WriteBufferDoubleNode#doCached}
* 2: InlinedCache
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 4: InlinedCache
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private WriteBufferDoubleNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.WriteBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.WriteBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.WriteBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
Node node__ = (s0_);
return WriteBufferDoubleNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.WriteBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return WriteBufferDoubleNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.WriteBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.buffers_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.buffers_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary buffers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(buffers__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)' cache 'buffers' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.buffers_ = buffers__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.WriteBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return WriteBufferDoubleNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.buffers_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_INVALID_INDEX_, INLINED_CACHED0_INVALID_VALUE_);
}
break;
}
}
}
{
InteropLibrary buffers__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
buffers__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.WriteBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.WriteBufferDoubleNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return WriteBufferDoubleNode.doCached(arg0Value, arg1Value, arg2Value, node__, buffers__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_INVALID_INDEX_, INLINED_CACHED1_INVALID_VALUE_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static WriteBufferDoubleNode create(InteropValue interop) {
return new WriteBufferDoubleNodeGen(interop);
}
@GeneratedBy(WriteBufferDoubleNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 1: InlinedCache
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidIndex
* Inline method: {@link InlinedBranchProfile#inline}
* 2: InlinedCache
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link WriteBufferDoubleNode#doCached}
* Parameter: {@link InteropLibrary} buffers
*/
@Child InteropLibrary buffers_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link GetMemberNode#doCached}
* Activation probability: 0.65000
* With/without class size: 24/9 bytes
* Specialization {@link GetMemberNode#doCached}
* Activation probability: 0.35000
* With/without class size: 12/5 bytes
*
*/
@GeneratedBy(GetMemberNode.class)
@SuppressWarnings("javadoc")
static final class GetMemberNodeGen extends GetMemberNode {
private static final StateField CACHED0__GET_MEMBER_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_GetMemberNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED0_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, CACHED0__GET_MEMBER_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 2), ReferenceField.create(Cached0Data.lookup_(), "cached0_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__GET_MEMBER_NODE_CACHED0_STATE_0_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__GET_MEMBER_NODE_CACHED0_STATE_0_UPDATER.subUpdater(3, 1)));
/**
* Source Info:
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
*/
private static final ToHostValueNode INLINED_CACHED1_TO_HOST_ = ToHostValueNodeGen.inline(InlineTarget.create(ToHostValueNode.class, STATE_0_GetMemberNode_UPDATER.subUpdater(2, 2), ReferenceField.create(MethodHandles.lookup(), "cached1_toHost__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_GetMemberNode_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_GetMemberNode_UPDATER.subUpdater(5, 1)));
/**
* State Info:
* 0: SpecializationActive {@link GetMemberNode#doCached}
* 1: SpecializationActive {@link GetMemberNode#doCached}
* 2-3: InlinedCache
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
/**
* Source Info:
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached1_toHost__field1_;
private GetMemberNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.GetMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.GetMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.GetMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return GetMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.GetMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.GetMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.GetMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return GetMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_TO_HOST_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.GetMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.GetMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToHostValueNode, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return GetMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_TO_HOST_, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static GetMemberNode create(InteropValue interop) {
return new GetMemberNodeGen(interop);
}
@GeneratedBy(GetMemberNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* 2: InlinedCache
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
/**
* Source Info:
* Specialization: {@link GetMemberNode#doCached}
* Parameter: {@link ToHostValueNode} toHost
* Inline method: {@link ToHostValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cached0_toHost__field1_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link PutMemberNode#doCached}
* Activation probability: 1.00000
* With/without class size: 32/9 bytes
*
*/
@GeneratedBy(PutMemberNode.class)
@SuppressWarnings("javadoc")
static final class PutMemberNodeGen extends PutMemberNode {
private static final StateField STATE_0_PutMemberNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link ToGuestValueNode} toGuestValue
* Inline method: {@link ToGuestValueNodeGen#inline}
*/
private static final ToGuestValueNode INLINED_TO_GUEST_VALUE_ = ToGuestValueNodeGen.inline(InlineTarget.create(ToGuestValueNode.class, STATE_0_PutMemberNode_UPDATER.subUpdater(1, 3), ReferenceField.create(MethodHandles.lookup(), "toGuestValue__field1_", Object.class)));
/**
* Source Info:
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_PutMemberNode_UPDATER.subUpdater(4, 1)));
/**
* Source Info:
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_INVALID_VALUE_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_PutMemberNode_UPDATER.subUpdater(5, 1)));
/**
* Source Info:
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_PutMemberNode_UPDATER.subUpdater(6, 1)));
/**
* State Info:
* 0: SpecializationActive {@link PutMemberNode#doCached}
* 1-3: InlinedCache
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link ToGuestValueNode} toGuestValue
* Inline method: {@link ToGuestValueNodeGen#inline}
* 4: InlinedCache
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 5: InlinedCache
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} invalidValue
* Inline method: {@link InlinedBranchProfile#inline}
* 6: InlinedCache
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child private InteropLibrary objects_;
/**
* Source Info:
* Specialization: {@link PutMemberNode#doCached}
* Parameter: {@link ToGuestValueNode} toGuestValue
* Inline method: {@link ToGuestValueNodeGen#inline}
* Inline field: {@link Object} field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object toGuestValue__field1_;
private PutMemberNodeGen(InteropValue interop) {
super(interop);
}
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.PutMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */) {
{
InteropLibrary objects__ = this.objects_;
if (objects__ != null) {
Node node__ = (this);
return PutMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_TO_GUEST_VALUE_, INLINED_UNSUPPORTED_, INLINED_INVALID_VALUE_, INLINED_UNKNOWN_);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
node__ = (this);
InteropLibrary objects__ = this.insert((INTEROP_LIBRARY_.createDispatched(InteropNode.CACHE_LIMIT)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
VarHandle.storeStoreFence();
this.objects_ = objects__;
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.PutMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, ToGuestValueNode, InlinedBranchProfile, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return PutMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_TO_GUEST_VALUE_, INLINED_UNSUPPORTED_, INLINED_INVALID_VALUE_, INLINED_UNKNOWN_);
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b1) == 0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
@NeverDefault
public static PutMemberNode create(InteropValue interop) {
return new PutMemberNodeGen(interop);
}
}
/**
* Debug Info:
* Specialization {@link RemoveMemberNode#doCached}
* Activation probability: 0.65000
* With/without class size: 22/5 bytes
* Specialization {@link RemoveMemberNode#doCached}
* Activation probability: 0.35000
* With/without class size: 11/1 bytes
*
*/
@GeneratedBy(RemoveMemberNode.class)
@SuppressWarnings("javadoc")
static final class RemoveMemberNodeGen extends RemoveMemberNode {
private static final StateField CACHED0__REMOVE_MEMBER_NODE_CACHED0_STATE_0_UPDATER = StateField.create(Cached0Data.lookup_(), "cached0_state_0_");
private static final StateField STATE_0_RemoveMemberNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* Source Info:
* Specialization: {@link RemoveMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__REMOVE_MEMBER_NODE_CACHED0_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* Source Info:
* Specialization: {@link RemoveMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED0_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED0__REMOVE_MEMBER_NODE_CACHED0_STATE_0_UPDATER.subUpdater(1, 1)));
/**
* Source Info:
* Specialization: {@link RemoveMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNSUPPORTED_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_RemoveMemberNode_UPDATER.subUpdater(2, 1)));
/**
* Source Info:
* Specialization: {@link RemoveMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_CACHED1_UNKNOWN_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_RemoveMemberNode_UPDATER.subUpdater(3, 1)));
/**
* State Info:
* 0: SpecializationActive {@link RemoveMemberNode#doCached}
* 1: SpecializationActive {@link RemoveMemberNode#doCached}
* 2: InlinedCache
* Specialization: {@link RemoveMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 3: InlinedCache
* Specialization: {@link RemoveMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private RemoveMemberNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if ((state_0 & 0b11) != 0 /* is SpecializationActive[InteropValue.RemoveMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[InteropValue.RemoveMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.RemoveMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return RemoveMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.RemoveMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return RemoveMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.RemoveMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.RemoveMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return RemoveMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_, INLINED_CACHED0_UNSUPPORTED_, INLINED_CACHED0_UNKNOWN_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.RemoveMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.RemoveMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return RemoveMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__, INLINED_CACHED1_UNSUPPORTED_, INLINED_CACHED1_UNKNOWN_);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b11) == 0) {
return NodeCost.UNINITIALIZED;
} else {
if (((state_0 & 0b11) & ((state_0 & 0b11) - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static RemoveMemberNode create(InteropValue interop) {
return new RemoveMemberNodeGen(interop);
}
@GeneratedBy(RemoveMemberNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link RemoveMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
* 1: InlinedCache
* Specialization: {@link RemoveMemberNode#doCached}
* Parameter: {@link InlinedBranchProfile} unknown
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int cached0_state_0_;
/**
* Source Info:
* Specialization: {@link RemoveMemberNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
/**
* Debug Info:
* Specialization {@link IsNullNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link IsNullNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(IsNullNode.class)
@SuppressWarnings("javadoc")
static final class IsNullNodeGen extends IsNullNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link IsNullNode#doCached}
* 1: SpecializationActive {@link IsNullNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private IsNullNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.IsNullNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.IsNullNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.IsNullNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.values_.accepts(arg1Value))) {
Node node__ = (s0_);
return IsNullNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.values_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.IsNullNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary values__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsNullNode.doCached(arg0Value, arg1Value, arg2Value, node__, values__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.IsNullNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.values_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.values_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary values__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(values__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'values' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.values_ = values__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.IsNullNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return IsNullNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.values_);
}
break;
}
}
}
{
InteropLibrary values__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
values__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.IsNullNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.IsNullNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return IsNullNode.doCached(arg0Value, arg1Value, arg2Value, node__, values__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static IsNullNode create(InteropValue interop) {
return new IsNullNodeGen(interop);
}
@GeneratedBy(IsNullNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link IsNullNode#doCached}
* Parameter: {@link InteropLibrary} values
*/
@Child InteropLibrary values_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link HasMembersNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link HasMembersNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(HasMembersNode.class)
@SuppressWarnings("javadoc")
static final class HasMembersNodeGen extends HasMembersNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link HasMembersNode#doCached}
* 1: SpecializationActive {@link HasMembersNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private HasMembersNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.HasMembersNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.HasMembersNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.HasMembersNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return HasMembersNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.HasMembersNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return HasMembersNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.HasMembersNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.HasMembersNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return HasMembersNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.HasMembersNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.HasMembersNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return HasMembersNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static HasMembersNode create(InteropValue interop) {
return new HasMembersNodeGen(interop);
}
@GeneratedBy(HasMembersNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link HasMembersNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link HasMemberNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link HasMemberNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(HasMemberNode.class)
@SuppressWarnings("javadoc")
static final class HasMemberNodeGen extends HasMemberNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link HasMemberNode#doCached}
* 1: SpecializationActive {@link HasMemberNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private HasMemberNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.HasMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.HasMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.HasMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return HasMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.HasMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return HasMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.HasMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.HasMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return HasMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.HasMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.HasMemberNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return HasMemberNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static HasMemberNode create(InteropValue interop) {
return new HasMemberNodeGen(interop);
}
@GeneratedBy(HasMemberNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link HasMemberNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link CanInvokeNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link CanInvokeNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(CanInvokeNode.class)
@SuppressWarnings("javadoc")
static final class CanInvokeNodeGen extends CanInvokeNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link CanInvokeNode#doCached}
* 1: SpecializationActive {@link CanInvokeNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private CanInvokeNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.CanInvokeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.CanInvokeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.CanInvokeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
Node node__ = (s0_);
return CanInvokeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.CanInvokeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return CanInvokeNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.CanInvokeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.objects_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.objects_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary objects__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(objects__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'objects' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.objects_ = objects__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.CanInvokeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return CanInvokeNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.objects_);
}
break;
}
}
}
{
InteropLibrary objects__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.CanInvokeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.CanInvokeNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return CanInvokeNode.doCached(arg0Value, arg1Value, arg2Value, node__, objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static CanInvokeNode create(InteropValue interop) {
return new CanInvokeNodeGen(interop);
}
@GeneratedBy(CanInvokeNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link CanInvokeNode#doCached}
* Parameter: {@link InteropLibrary} objects
*/
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link CanExecuteNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link CanExecuteNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(CanExecuteNode.class)
@SuppressWarnings("javadoc")
static final class CanExecuteNodeGen extends CanExecuteNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link CanExecuteNode#doCached}
* 1: SpecializationActive {@link CanExecuteNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private CanExecuteNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.CanExecuteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.CanExecuteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.CanExecuteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.executables_.accepts(arg1Value))) {
Node node__ = (s0_);
return CanExecuteNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.executables_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.CanExecuteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary executables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return CanExecuteNode.doCached(arg0Value, arg1Value, arg2Value, node__, executables__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.CanExecuteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.executables_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.executables_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary executables__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(executables__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'executables' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.executables_ = executables__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.CanExecuteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return CanExecuteNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.executables_);
}
break;
}
}
}
{
InteropLibrary executables__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
executables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.CanExecuteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.CanExecuteNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return CanExecuteNode.doCached(arg0Value, arg1Value, arg2Value, node__, executables__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static CanExecuteNode create(InteropValue interop) {
return new CanExecuteNodeGen(interop);
}
@GeneratedBy(CanExecuteNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link CanExecuteNode#doCached}
* Parameter: {@link InteropLibrary} executables
*/
@Child InteropLibrary executables_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link CanInstantiateNode#doCached}
* Activation probability: 0.65000
* With/without class size: 19/4 bytes
* Specialization {@link CanInstantiateNode#doCached}
* Activation probability: 0.35000
* With/without class size: 8/0 bytes
*
*/
@GeneratedBy(CanInstantiateNode.class)
@SuppressWarnings("javadoc")
static final class CanInstantiateNodeGen extends CanInstantiateNode {
static final ReferenceField CACHED0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached0_cache", Cached0Data.class);
/**
* State Info:
* 0: SpecializationActive {@link CanInstantiateNode#doCached}
* 1: SpecializationActive {@link CanInstantiateNode#doCached}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @Child private Cached0Data cached0_cache;
private CanInstantiateNodeGen(InteropValue interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[InteropValue.CanInstantiateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] || SpecializationActive[InteropValue.CanInstantiateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[InteropValue.CanInstantiateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
Cached0Data s0_ = this.cached0_cache;
while (s0_ != null) {
if ((s0_.instantiables_.accepts(arg1Value))) {
Node node__ = (s0_);
return CanInstantiateNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.instantiables_);
}
s0_ = s0_.next_;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[InteropValue.CanInstantiateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
return this.cached1Boundary(state_0, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state_0, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
Node node__ = (this);
InteropLibrary instantiables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return CanInstantiateNode.doCached(arg0Value, arg1Value, arg2Value, node__, instantiables__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state_0 = this.state_0_;
{
Node node__ = null;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[InteropValue.CanInstantiateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */) {
while (true) {
int count0_ = 0;
Cached0Data s0_ = CACHED0_CACHE_UPDATER.getVolatile(this);
Cached0Data s0_original = s0_;
while (s0_ != null) {
if ((s0_.instantiables_.accepts(arg1Value))) {
node__ = (s0_);
break;
}
count0_++;
s0_ = s0_.next_;
}
if (s0_ == null) {
// assert (s0_.instantiables_.accepts(arg1Value));
if (count0_ < (InteropNode.CACHE_LIMIT)) {
s0_ = this.insert(new Cached0Data(s0_original));
node__ = (s0_);
InteropLibrary instantiables__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value)));
Objects.requireNonNull(instantiables__, "Specialization 'doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)' cache 'instantiables' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'.");
s0_.instantiables_ = instantiables__;
if (!CACHED0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) {
continue;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[InteropValue.CanInstantiateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s0_ != null) {
return CanInstantiateNode.doCached(arg0Value, arg1Value, arg2Value, node__, s0_.instantiables_);
}
break;
}
}
}
{
InteropLibrary instantiables__ = null;
Node node__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
node__ = (this);
instantiables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached0_cache = null;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[InteropValue.CanInstantiateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
state_0 = state_0 | 0b10 /* add SpecializationActive[InteropValue.CanInstantiateNode.doCached(PolyglotLanguageContext, Object, Object[], Node, InteropLibrary)] */;
this.state_0_ = state_0;
return CanInstantiateNode.doCached(arg0Value, arg1Value, arg2Value, node__, instantiables__);
} finally {
encapsulating_.set(prev_);
}
}
}
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if (state_0 == 0) {
return NodeCost.UNINITIALIZED;
} else {
if ((state_0 & (state_0 - 1)) == 0 /* is-single */) {
Cached0Data s0_ = this.cached0_cache;
if ((s0_ == null || s0_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
}
return NodeCost.POLYMORPHIC;
}
@NeverDefault
public static CanInstantiateNode create(InteropValue interop) {
return new CanInstantiateNodeGen(interop);
}
@GeneratedBy(CanInstantiateNode.class)
@DenyReplace
private static final class Cached0Data extends Node implements SpecializationDataNode {
@Child Cached0Data next_;
/**
* Source Info:
* Specialization: {@link CanInstantiateNode#doCached}
* Parameter: {@link InteropLibrary} instantiables
*/
@Child InteropLibrary instantiables_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
/**
* Debug Info:
* Specialization {@link SharedExecuteNode#doDefault}
* Activation probability: 0.65000
* With/without class size: 30/18 bytes
* Specialization {@link SharedExecuteNode#doDefault}
* Activation probability: 0.35000
* With/without class size: 15/14 bytes
*
*/
@GeneratedBy(SharedExecuteNode.class)
@SuppressWarnings("javadoc")
static final class SharedExecuteNodeGen {
private static final StateField DEFAULT0__SHARED_EXECUTE_NODE_DEFAULT0_STATE_0_UPDATER = StateField.create(Default0Data.lookup_(), "default0_state_0_");
/**
* Required Fields:
* - {@link Inlined#state_0_}
*
- {@link Inlined#default0_cache}
*
- {@link Inlined#default1_toGuestValues__field1_}
*
- {@link Inlined#default1_toGuestValues__field2_}
*
- {@link Inlined#default1_toHostValue__field1_}
*
*/
@NeverDefault
public static SharedExecuteNode inline(@RequiredField(bits = 14, value = StateField.class)@RequiredField(type = Node.class, value = ReferenceField.class)@RequiredField(type = Node.class, value = ReferenceField.class)@RequiredField(type = Object.class, value = ReferenceField.class)@RequiredField(type = Object.class, value = ReferenceField.class) InlineTarget target) {
return new SharedExecuteNodeGen.Inlined(target);
}
@GeneratedBy(SharedExecuteNode.class)
@DenyReplace
private static final class Inlined extends SharedExecuteNode {
/**
* State Info:
* 0: SpecializationActive {@link SharedExecuteNode#doDefault}
* 1: SpecializationActive {@link SharedExecuteNode#doDefault}
* 2-8: InlinedCache
* Specialization: {@link SharedExecuteNode#doDefault}
* Parameter: {@link ToGuestValuesNode} toGuestValues
* Inline method: {@link ToGuestValuesNodeGen#inline}
* 9-10: InlinedCache
* Specialization: {@link SharedExecuteNode#doDefault}
* Parameter: {@link ToHostValueNode} toHostValue
* Inline method: {@link ToHostValueNodeGen#inline}
* 11: InlinedCache
* Specialization: {@link SharedExecuteNode#doDefault}
* Parameter: {@link InlinedBranchProfile} invalidArgument
* Inline method: {@link InlinedBranchProfile#inline}
* 12: InlinedCache
* Specialization: {@link SharedExecuteNode#doDefault}
* Parameter: {@link InlinedBranchProfile} arity
* Inline method: {@link InlinedBranchProfile#inline}
* 13: InlinedCache
* Specialization: {@link SharedExecuteNode#doDefault}
* Parameter: {@link InlinedBranchProfile} unsupported
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
private final StateField state_0_;
private final ReferenceField default0_cache;
private final ReferenceField default1_toGuestValues__field1_;
private final ReferenceField
© 2015 - 2025 Weber Informatics LLC | Privacy Policy