com.oracle.truffle.polyglot.PolyglotValueFactory 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.interop.InteropLibrary;
import com.oracle.truffle.api.library.LibraryFactory;
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.BranchProfile;
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.PolyglotValue.InteropCodeCache;
import com.oracle.truffle.polyglot.PolyglotValue.InteropNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.AsDateNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.AsDurationNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.AsInstantNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.AsNativePointerNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.AsTimeNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.AsTimeZoneNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.CanExecuteNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.CanInstantiateNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.CanInvokeNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.GetArrayElementNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.GetArraySizeNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.GetMemberKeysNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.GetMemberNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.GetMetaQualifiedNameNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.GetMetaSimpleNameNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.HasArrayElementsNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.HasMemberNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.HasMembersNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.IsDateNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.IsDurationNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.IsExceptionNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.IsMetaInstanceNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.IsMetaObjectNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.IsNativePointerNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.IsNullNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.IsTimeNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.IsTimeZoneNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.NewInstanceNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.PutMemberNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.RemoveArrayElementNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.RemoveMemberNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.SetArrayElementNode;
import com.oracle.truffle.polyglot.PolyglotValue.InteropCodeCache.ThrowExceptionNode;
import java.util.concurrent.locks.Lock;
@GeneratedBy(PolyglotValue.class)
@SuppressWarnings("unused")
final class PolyglotValueFactory {
private static final LibraryFactory INTEROP_LIBRARY_ = LibraryFactory.resolve(InteropLibrary.class);
@GeneratedBy(InteropCodeCache.class)
static final class InteropCodeCacheFactory {
@GeneratedBy(IsDateNode.class)
static final class IsDateNodeGen extends IsDateNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private IsDateNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return IsDateNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsDateNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return IsDateNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return IsDateNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static IsDateNode create(InteropCodeCache interop) {
return new IsDateNodeGen(interop);
}
@GeneratedBy(IsDateNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(AsDateNode.class)
static final class AsDateNodeGen extends AsDateNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
private AsDateNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return AsDateNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsDateNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return AsDateNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return AsDateNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static AsDateNode create(InteropCodeCache interop) {
return new AsDateNodeGen(interop);
}
@GeneratedBy(AsDateNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(IsTimeNode.class)
static final class IsTimeNodeGen extends IsTimeNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private IsTimeNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return IsTimeNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsTimeNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return IsTimeNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return IsTimeNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static IsTimeNode create(InteropCodeCache interop) {
return new IsTimeNodeGen(interop);
}
@GeneratedBy(IsTimeNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(AsTimeNode.class)
static final class AsTimeNodeGen extends AsTimeNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
private AsTimeNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return AsTimeNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsTimeNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return AsTimeNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return AsTimeNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static AsTimeNode create(InteropCodeCache interop) {
return new AsTimeNodeGen(interop);
}
@GeneratedBy(AsTimeNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(IsTimeZoneNode.class)
static final class IsTimeZoneNodeGen extends IsTimeZoneNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private IsTimeZoneNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return IsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return IsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return IsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static IsTimeZoneNode create(InteropCodeCache interop) {
return new IsTimeZoneNodeGen(interop);
}
@GeneratedBy(IsTimeZoneNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(AsTimeZoneNode.class)
static final class AsTimeZoneNodeGen extends AsTimeZoneNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
private AsTimeZoneNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return AsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return AsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return AsTimeZoneNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static AsTimeZoneNode create(InteropCodeCache interop) {
return new AsTimeZoneNodeGen(interop);
}
@GeneratedBy(AsTimeZoneNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(IsDurationNode.class)
static final class IsDurationNodeGen extends IsDurationNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private IsDurationNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return IsDurationNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsDurationNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return IsDurationNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return IsDurationNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static IsDurationNode create(InteropCodeCache interop) {
return new IsDurationNodeGen(interop);
}
@GeneratedBy(IsDurationNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(AsDurationNode.class)
static final class AsDurationNodeGen extends AsDurationNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
private AsDurationNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return AsDurationNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsDurationNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return AsDurationNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return AsDurationNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static AsDurationNode create(InteropCodeCache interop) {
return new AsDurationNodeGen(interop);
}
@GeneratedBy(AsDurationNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(AsInstantNode.class)
static final class AsInstantNodeGen extends AsInstantNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
private AsInstantNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return AsInstantNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsInstantNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return AsInstantNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return AsInstantNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static AsInstantNode create(InteropCodeCache interop) {
return new AsInstantNodeGen(interop);
}
@GeneratedBy(AsInstantNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(IsNativePointerNode.class)
static final class IsNativePointerNodeGen extends IsNativePointerNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private IsNativePointerNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.natives_.accepts(arg1Value))) {
return IsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, s1_.natives_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_natives__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, cached1_natives__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.natives_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.natives_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.natives_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return IsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, s1_.natives_);
}
}
{
InteropLibrary cached1_natives__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_natives__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return IsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, cached1_natives__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static IsNativePointerNode create(InteropCodeCache interop) {
return new IsNativePointerNodeGen(interop);
}
@GeneratedBy(IsNativePointerNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary natives_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(AsNativePointerNode.class)
static final class AsNativePointerNodeGen extends AsNativePointerNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
private AsNativePointerNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.natives_.accepts(arg1Value))) {
return AsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, s1_.natives_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_natives__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return AsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, cached1_natives__, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.natives_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.natives_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.natives_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return AsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, s1_.natives_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_natives__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_natives__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return AsNativePointerNode.doCached(arg0Value, arg1Value, arg2Value, cached1_natives__, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static AsNativePointerNode create(InteropCodeCache interop) {
return new AsNativePointerNodeGen(interop);
}
@GeneratedBy(AsNativePointerNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary natives_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(HasArrayElementsNode.class)
static final class HasArrayElementsNodeGen extends HasArrayElementsNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private HasArrayElementsNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
return HasArrayElementsNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return HasArrayElementsNode.doCached(arg0Value, arg1Value, arg2Value, cached1_arrays__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.arrays_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.arrays_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return HasArrayElementsNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_);
}
}
{
InteropLibrary cached1_arrays__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return HasArrayElementsNode.doCached(arg0Value, arg1Value, arg2Value, cached1_arrays__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static HasArrayElementsNode create(InteropCodeCache interop) {
return new HasArrayElementsNodeGen(interop);
}
@GeneratedBy(HasArrayElementsNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary arrays_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(GetMemberKeysNode.class)
static final class GetMemberKeysNodeGen extends GetMemberKeysNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private ToHostValueNode cached1_toHost_;
@CompilationFinal private BranchProfile cached1_unsupported_;
private GetMemberKeysNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return GetMemberKeysNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toHost_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetMemberKeysNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_toHost_, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.toHost_ = (createToHost());
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return GetMemberKeysNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toHost_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_toHost_ = (createToHost());
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile) */;
lock.unlock();
hasLock = false;
return GetMemberKeysNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_toHost_, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static GetMemberKeysNode create(InteropCodeCache interop) {
return new GetMemberKeysNodeGen(interop);
}
@GeneratedBy(GetMemberKeysNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@CompilationFinal ToHostValueNode toHost_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(GetArrayElementNode.class)
static final class GetArrayElementNodeGen extends GetArrayElementNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@Child private Cached1Data cached1_cache;
private GetArrayElementNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
return GetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_, s1_.toHost_, s1_.unsupported_, s1_.unknown_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
Cached1Data s2_ = this.cached1_cache;
if (s2_ != null) {
return this.cached1Boundary(state, s2_, arg0Value, arg1Value, arg2Value);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, Cached1Data s2_, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, arrays__, s2_.toHost_, s2_.unsupported_, s2_.unknown_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.arrays_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.arrays_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.toHost_ = (createToHost());
s1_.unsupported_ = (BranchProfile.create());
s1_.unknown_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return GetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_, s1_.toHost_, s1_.unsupported_, s1_.unknown_);
}
}
{
InteropLibrary arrays__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
Cached1Data s2_ = super.insert(new Cached1Data());
arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
s2_.toHost_ = (createToHost());
s2_.unsupported_ = (BranchProfile.create());
s2_.unknown_ = (BranchProfile.create());
this.cached1_cache = s2_;
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */;
lock.unlock();
hasLock = false;
return GetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, arrays__, s2_.toHost_, s2_.unsupported_, s2_.unknown_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static GetArrayElementNode create(InteropCodeCache interop) {
return new GetArrayElementNodeGen(interop);
}
@GeneratedBy(GetArrayElementNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary arrays_;
@CompilationFinal ToHostValueNode toHost_;
@CompilationFinal BranchProfile unsupported_;
@CompilationFinal BranchProfile unknown_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
@GeneratedBy(GetArrayElementNode.class)
private static final class Cached1Data extends Node {
@CompilationFinal ToHostValueNode toHost_;
@CompilationFinal BranchProfile unsupported_;
@CompilationFinal BranchProfile unknown_;
Cached1Data() {
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
@GeneratedBy(SetArrayElementNode.class)
static final class SetArrayElementNodeGen extends SetArrayElementNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@Child private Cached1Data cached1_cache;
private SetArrayElementNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
return SetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_, s1_.toGuestValue_, s1_.unsupported_, s1_.invalidIndex_, s1_.invalidValue_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
Cached1Data s2_ = this.cached1_cache;
if (s2_ != null) {
return this.cached1Boundary(state, s2_, arg0Value, arg1Value, arg2Value);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, Cached1Data s2_, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return SetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, arrays__, s2_.toGuestValue_, s2_.unsupported_, s2_.invalidIndex_, s2_.invalidValue_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.arrays_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.arrays_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.toGuestValue_ = s1_.insertAccessor((ToGuestValueNodeGen.create()));
s1_.unsupported_ = (BranchProfile.create());
s1_.invalidIndex_ = (BranchProfile.create());
s1_.invalidValue_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return SetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_, s1_.toGuestValue_, s1_.unsupported_, s1_.invalidIndex_, s1_.invalidValue_);
}
}
{
InteropLibrary arrays__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
Cached1Data s2_ = super.insert(new Cached1Data());
arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
s2_.toGuestValue_ = s2_.insertAccessor((ToGuestValueNodeGen.create()));
s2_.unsupported_ = (BranchProfile.create());
s2_.invalidIndex_ = (BranchProfile.create());
s2_.invalidValue_ = (BranchProfile.create());
this.cached1_cache = s2_;
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */;
lock.unlock();
hasLock = false;
return SetArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, arrays__, s2_.toGuestValue_, s2_.unsupported_, s2_.invalidIndex_, s2_.invalidValue_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static SetArrayElementNode create(InteropCodeCache interop) {
return new SetArrayElementNodeGen(interop);
}
@GeneratedBy(SetArrayElementNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary arrays_;
@Child ToGuestValueNode toGuestValue_;
@CompilationFinal BranchProfile unsupported_;
@CompilationFinal BranchProfile invalidIndex_;
@CompilationFinal BranchProfile invalidValue_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
@GeneratedBy(SetArrayElementNode.class)
private static final class Cached1Data extends Node {
@Child ToGuestValueNode toGuestValue_;
@CompilationFinal BranchProfile unsupported_;
@CompilationFinal BranchProfile invalidIndex_;
@CompilationFinal BranchProfile invalidValue_;
Cached1Data() {
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(RemoveArrayElementNode.class)
static final class RemoveArrayElementNodeGen extends RemoveArrayElementNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
@CompilationFinal private BranchProfile cached1_invalidIndex_;
private RemoveArrayElementNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
return RemoveArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_, s1_.unsupported_, s1_.invalidIndex_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return RemoveArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, cached1_arrays__, this.cached1_unsupported_, this.cached1_invalidIndex_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.arrays_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.arrays_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
s1_.invalidIndex_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return RemoveArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_, s1_.unsupported_, s1_.invalidIndex_);
}
}
{
InteropLibrary cached1_arrays__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.cached1_invalidIndex_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */;
lock.unlock();
hasLock = false;
return RemoveArrayElementNode.doCached(arg0Value, arg1Value, arg2Value, cached1_arrays__, this.cached1_unsupported_, this.cached1_invalidIndex_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static RemoveArrayElementNode create(InteropCodeCache interop) {
return new RemoveArrayElementNodeGen(interop);
}
@GeneratedBy(RemoveArrayElementNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary arrays_;
@CompilationFinal BranchProfile unsupported_;
@CompilationFinal BranchProfile invalidIndex_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(GetArraySizeNode.class)
static final class GetArraySizeNodeGen extends GetArraySizeNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
private GetArraySizeNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
return GetArraySizeNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetArraySizeNode.doCached(arg0Value, arg1Value, arg2Value, cached1_arrays__, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.arrays_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.arrays_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.arrays_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return GetArraySizeNode.doCached(arg0Value, arg1Value, arg2Value, s1_.arrays_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_arrays__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_arrays__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return GetArraySizeNode.doCached(arg0Value, arg1Value, arg2Value, cached1_arrays__, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static GetArraySizeNode create(InteropCodeCache interop) {
return new GetArraySizeNodeGen(interop);
}
@GeneratedBy(GetArraySizeNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary arrays_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(GetMemberNode.class)
static final class GetMemberNodeGen extends GetMemberNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@Child private Cached1Data cached1_cache;
private GetMemberNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return GetMemberNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toHost_, s1_.unsupported_, s1_.unknown_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
Cached1Data s2_ = this.cached1_cache;
if (s2_ != null) {
return this.cached1Boundary(state, s2_, arg0Value, arg1Value, arg2Value);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, Cached1Data s2_, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetMemberNode.doCached(arg0Value, arg1Value, arg2Value, objects__, s2_.toHost_, s2_.unsupported_, s2_.unknown_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.toHost_ = (createToHost());
s1_.unsupported_ = (BranchProfile.create());
s1_.unknown_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return GetMemberNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toHost_, s1_.unsupported_, s1_.unknown_);
}
}
{
InteropLibrary objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
Cached1Data s2_ = super.insert(new Cached1Data());
objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
s2_.toHost_ = (createToHost());
s2_.unsupported_ = (BranchProfile.create());
s2_.unknown_ = (BranchProfile.create());
this.cached1_cache = s2_;
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToHostValueNode, BranchProfile, BranchProfile) */;
lock.unlock();
hasLock = false;
return GetMemberNode.doCached(arg0Value, arg1Value, arg2Value, objects__, s2_.toHost_, s2_.unsupported_, s2_.unknown_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static GetMemberNode create(InteropCodeCache interop) {
return new GetMemberNodeGen(interop);
}
@GeneratedBy(GetMemberNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@CompilationFinal ToHostValueNode toHost_;
@CompilationFinal BranchProfile unsupported_;
@CompilationFinal BranchProfile unknown_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
@GeneratedBy(GetMemberNode.class)
private static final class Cached1Data extends Node {
@CompilationFinal ToHostValueNode toHost_;
@CompilationFinal BranchProfile unsupported_;
@CompilationFinal BranchProfile unknown_;
Cached1Data() {
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
}
}
@GeneratedBy(PutMemberNode.class)
static final class PutMemberNodeGen extends PutMemberNode {
@CompilationFinal private volatile int state_;
@Child private CachedData cached_cache;
private PutMemberNodeGen(InteropCodeCache interop) {
super(interop);
}
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
CachedData s1_ = this.cached_cache;
if (s1_ != null) {
return PutMemberNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toGuestValue_, s1_.unsupported_, s1_.invalidValue_, s1_.unknown_);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
try {
CachedData s1_ = super.insert(new CachedData());
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.createDispatched(InteropNode.CACHE_LIMIT)));
s1_.toGuestValue_ = s1_.insertAccessor((ToGuestValueNodeGen.create()));
s1_.unsupported_ = (BranchProfile.create());
s1_.invalidValue_ = (BranchProfile.create());
s1_.unknown_ = (BranchProfile.create());
this.cached_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile, BranchProfile, BranchProfile) */;
lock.unlock();
hasLock = false;
return PutMemberNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toGuestValue_, s1_.unsupported_, s1_.invalidValue_, s1_.unknown_);
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
public static PutMemberNode create(InteropCodeCache interop) {
return new PutMemberNodeGen(interop);
}
@GeneratedBy(PutMemberNode.class)
private static final class CachedData extends Node {
@Child InteropLibrary objects_;
@Child ToGuestValueNode toGuestValue_;
@CompilationFinal BranchProfile unsupported_;
@CompilationFinal BranchProfile invalidValue_;
@CompilationFinal BranchProfile unknown_;
CachedData() {
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(RemoveMemberNode.class)
static final class RemoveMemberNodeGen extends RemoveMemberNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
@CompilationFinal private BranchProfile cached1_unknown_;
private RemoveMemberNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return RemoveMemberNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_, s1_.unknown_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return RemoveMemberNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_, this.cached1_unknown_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
s1_.unknown_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return RemoveMemberNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_, s1_.unknown_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.cached1_unknown_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile, BranchProfile) */;
lock.unlock();
hasLock = false;
return RemoveMemberNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_, this.cached1_unknown_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static RemoveMemberNode create(InteropCodeCache interop) {
return new RemoveMemberNodeGen(interop);
}
@GeneratedBy(RemoveMemberNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@CompilationFinal BranchProfile unsupported_;
@CompilationFinal BranchProfile unknown_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(IsNullNode.class)
static final class IsNullNodeGen extends IsNullNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private IsNullNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.values_.accepts(arg1Value))) {
return IsNullNode.doCached(arg0Value, arg1Value, arg2Value, s1_.values_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_values__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsNullNode.doCached(arg0Value, arg1Value, arg2Value, cached1_values__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.values_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.values_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.values_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return IsNullNode.doCached(arg0Value, arg1Value, arg2Value, s1_.values_);
}
}
{
InteropLibrary cached1_values__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_values__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return IsNullNode.doCached(arg0Value, arg1Value, arg2Value, cached1_values__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static IsNullNode create(InteropCodeCache interop) {
return new IsNullNodeGen(interop);
}
@GeneratedBy(IsNullNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary values_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(HasMembersNode.class)
static final class HasMembersNodeGen extends HasMembersNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private HasMembersNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return HasMembersNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return HasMembersNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return HasMembersNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return HasMembersNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static HasMembersNode create(InteropCodeCache interop) {
return new HasMembersNodeGen(interop);
}
@GeneratedBy(HasMembersNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(HasMemberNode.class)
static final class HasMemberNodeGen extends HasMemberNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private HasMemberNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return HasMemberNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return HasMemberNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return HasMemberNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return HasMemberNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static HasMemberNode create(InteropCodeCache interop) {
return new HasMemberNodeGen(interop);
}
@GeneratedBy(HasMemberNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(CanInvokeNode.class)
static final class CanInvokeNodeGen extends CanInvokeNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private CanInvokeNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return CanInvokeNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return CanInvokeNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return CanInvokeNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return CanInvokeNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static CanInvokeNode create(InteropCodeCache interop) {
return new CanInvokeNodeGen(interop);
}
@GeneratedBy(CanInvokeNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(CanExecuteNode.class)
static final class CanExecuteNodeGen extends CanExecuteNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private CanExecuteNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.executables_.accepts(arg1Value))) {
return CanExecuteNode.doCached(arg0Value, arg1Value, arg2Value, s1_.executables_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_executables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return CanExecuteNode.doCached(arg0Value, arg1Value, arg2Value, cached1_executables__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.executables_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.executables_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.executables_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return CanExecuteNode.doCached(arg0Value, arg1Value, arg2Value, s1_.executables_);
}
}
{
InteropLibrary cached1_executables__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_executables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return CanExecuteNode.doCached(arg0Value, arg1Value, arg2Value, cached1_executables__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static CanExecuteNode create(InteropCodeCache interop) {
return new CanExecuteNodeGen(interop);
}
@GeneratedBy(CanExecuteNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary executables_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(CanInstantiateNode.class)
static final class CanInstantiateNodeGen extends CanInstantiateNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private CanInstantiateNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.instantiables_.accepts(arg1Value))) {
return CanInstantiateNode.doCached(arg0Value, arg1Value, arg2Value, s1_.instantiables_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_instantiables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return CanInstantiateNode.doCached(arg0Value, arg1Value, arg2Value, cached1_instantiables__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.instantiables_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.instantiables_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.instantiables_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return CanInstantiateNode.doCached(arg0Value, arg1Value, arg2Value, s1_.instantiables_);
}
}
{
InteropLibrary cached1_instantiables__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_instantiables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return CanInstantiateNode.doCached(arg0Value, arg1Value, arg2Value, cached1_instantiables__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static CanInstantiateNode create(InteropCodeCache interop) {
return new CanInstantiateNodeGen(interop);
}
@GeneratedBy(CanInstantiateNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary instantiables_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(NewInstanceNode.class)
static final class NewInstanceNodeGen extends NewInstanceNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@Child private Cached1Data cached1_cache;
private NewInstanceNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.instantiables_.accepts(arg1Value))) {
return NewInstanceNode.doCached(arg0Value, arg1Value, arg2Value, s1_.instantiables_, s1_.toGuestValues_, s1_.toHostValue_, s1_.arity_, s1_.invalidArgument_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
Cached1Data s2_ = this.cached1_cache;
if (s2_ != null) {
return this.cached1Boundary(state, s2_, arg0Value, arg1Value, arg2Value);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, Cached1Data s2_, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary instantiables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return NewInstanceNode.doCached(arg0Value, arg1Value, arg2Value, instantiables__, s2_.toGuestValues_, s2_.toHostValue_, s2_.arity_, s2_.invalidArgument_, s2_.unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.instantiables_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.instantiables_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.instantiables_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.toGuestValues_ = s1_.insertAccessor((ToGuestValuesNode.create()));
s1_.toHostValue_ = (createToHost());
s1_.arity_ = (BranchProfile.create());
s1_.invalidArgument_ = (BranchProfile.create());
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return NewInstanceNode.doCached(arg0Value, arg1Value, arg2Value, s1_.instantiables_, s1_.toGuestValues_, s1_.toHostValue_, s1_.arity_, s1_.invalidArgument_, s1_.unsupported_);
}
}
{
InteropLibrary instantiables__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
Cached1Data s2_ = super.insert(new Cached1Data());
instantiables__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
s2_.toGuestValues_ = s2_.insertAccessor((ToGuestValuesNode.create()));
s2_.toHostValue_ = (createToHost());
s2_.arity_ = (BranchProfile.create());
s2_.invalidArgument_ = (BranchProfile.create());
s2_.unsupported_ = (BranchProfile.create());
this.cached1_cache = s2_;
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValuesNode, ToHostValueNode, BranchProfile, BranchProfile, BranchProfile) */;
lock.unlock();
hasLock = false;
return NewInstanceNode.doCached(arg0Value, arg1Value, arg2Value, instantiables__, s2_.toGuestValues_, s2_.toHostValue_, s2_.arity_, s2_.invalidArgument_, s2_.unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static NewInstanceNode create(InteropCodeCache interop) {
return new NewInstanceNodeGen(interop);
}
@GeneratedBy(NewInstanceNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary instantiables_;
@Child ToGuestValuesNode toGuestValues_;
@CompilationFinal ToHostValueNode toHostValue_;
@CompilationFinal BranchProfile arity_;
@CompilationFinal BranchProfile invalidArgument_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
@GeneratedBy(NewInstanceNode.class)
private static final class Cached1Data extends Node {
@Child ToGuestValuesNode toGuestValues_;
@CompilationFinal ToHostValueNode toHostValue_;
@CompilationFinal BranchProfile arity_;
@CompilationFinal BranchProfile invalidArgument_;
@CompilationFinal BranchProfile unsupported_;
Cached1Data() {
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(IsExceptionNode.class)
static final class IsExceptionNodeGen extends IsExceptionNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private IsExceptionNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return IsExceptionNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsExceptionNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return IsExceptionNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return IsExceptionNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static IsExceptionNode create(InteropCodeCache interop) {
return new IsExceptionNodeGen(interop);
}
@GeneratedBy(IsExceptionNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(ThrowExceptionNode.class)
static final class ThrowExceptionNodeGen extends ThrowExceptionNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@CompilationFinal private BranchProfile cached1_unsupported_;
private ThrowExceptionNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return ThrowExceptionNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return ThrowExceptionNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return ThrowExceptionNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return ThrowExceptionNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static ThrowExceptionNode create(InteropCodeCache interop) {
return new ThrowExceptionNodeGen(interop);
}
@GeneratedBy(ThrowExceptionNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(IsMetaObjectNode.class)
static final class IsMetaObjectNodeGen extends IsMetaObjectNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
private IsMetaObjectNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return IsMetaObjectNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsMetaObjectNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
}
} finally {
encapsulating_.set(prev_);
}
}
private boolean executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return IsMetaObjectNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary) */;
lock.unlock();
hasLock = false;
return IsMetaObjectNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static IsMetaObjectNode create(InteropCodeCache interop) {
return new IsMetaObjectNodeGen(interop);
}
@GeneratedBy(IsMetaObjectNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(GetMetaQualifiedNameNode.class)
static final class GetMetaQualifiedNameNodeGen extends GetMetaQualifiedNameNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@Child private InteropLibrary cached1_toString_;
@CompilationFinal private BranchProfile cached1_unsupported_;
private GetMetaQualifiedNameNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return GetMetaQualifiedNameNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toString_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetMetaQualifiedNameNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_toString_, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private String executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.toString_ = s1_.insertAccessor((INTEROP_LIBRARY_.createDispatched(1)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return GetMetaQualifiedNameNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toString_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_toString_ = super.insert((INTEROP_LIBRARY_.createDispatched(1)));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return GetMetaQualifiedNameNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_toString_, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static GetMetaQualifiedNameNode create(InteropCodeCache interop) {
return new GetMetaQualifiedNameNodeGen(interop);
}
@GeneratedBy(GetMetaQualifiedNameNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@Child InteropLibrary toString_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(GetMetaSimpleNameNode.class)
static final class GetMetaSimpleNameNodeGen extends GetMetaSimpleNameNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@Child private InteropLibrary cached1_toString_;
@CompilationFinal private BranchProfile cached1_unsupported_;
private GetMetaSimpleNameNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return GetMetaSimpleNameNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toString_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return GetMetaSimpleNameNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_toString_, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private String executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.toString_ = s1_.insertAccessor((INTEROP_LIBRARY_.createDispatched(1)));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return GetMetaSimpleNameNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toString_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_toString_ = super.insert((INTEROP_LIBRARY_.createDispatched(1)));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, InteropLibrary, BranchProfile) */;
lock.unlock();
hasLock = false;
return GetMetaSimpleNameNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_toString_, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static GetMetaSimpleNameNode create(InteropCodeCache interop) {
return new GetMetaSimpleNameNodeGen(interop);
}
@GeneratedBy(GetMetaSimpleNameNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@Child InteropLibrary toString_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
@GeneratedBy(IsMetaInstanceNode.class)
static final class IsMetaInstanceNodeGen extends IsMetaInstanceNode {
@CompilationFinal private volatile int state_;
@CompilationFinal private volatile int exclude_;
@Child private Cached0Data cached0_cache;
@Child private ToGuestValueNode cached1_toGuest_;
@CompilationFinal private BranchProfile cached1_unsupported_;
private IsMetaInstanceNodeGen(InteropCodeCache interop) {
super(interop);
}
@ExplodeLoop
@Override
protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
int state = state_;
if (state != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) || doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) */) {
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) */) {
Cached0Data s1_ = this.cached0_cache;
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
return IsMetaInstanceNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toGuest_, s1_.unsupported_);
}
s1_ = s1_.next_;
}
}
if ((state & 0b10) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) */) {
return this.cached1Boundary(state, arg0Value, arg1Value, arg2Value);
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(arg0Value, arg1Value, arg2Value);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object cached1Boundary(int state, PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
return IsMetaInstanceNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_toGuest_, this.cached1_unsupported_);
}
} finally {
encapsulating_.set(prev_);
}
}
private boolean executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) {
Lock lock = getLock();
boolean hasLock = true;
lock.lock();
int state = state_;
int exclude = exclude_;
try {
if ((exclude) == 0 /* is-not-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) */) {
int count1_ = 0;
Cached0Data s1_ = this.cached0_cache;
if ((state & 0b1) != 0 /* is-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) */) {
while (s1_ != null) {
if ((s1_.objects_.accepts(arg1Value))) {
break;
}
s1_ = s1_.next_;
count1_++;
}
}
if (s1_ == null) {
// assert (s1_.objects_.accepts(arg1Value));
if (count1_ < (InteropNode.CACHE_LIMIT)) {
s1_ = super.insert(new Cached0Data(cached0_cache));
s1_.objects_ = s1_.insertAccessor((INTEROP_LIBRARY_.create(arg1Value)));
s1_.toGuest_ = s1_.insertAccessor((ToGuestValueNodeGen.create()));
s1_.unsupported_ = (BranchProfile.create());
this.cached0_cache = s1_;
this.state_ = state = state | 0b1 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) */;
}
}
if (s1_ != null) {
lock.unlock();
hasLock = false;
return IsMetaInstanceNode.doCached(arg0Value, arg1Value, arg2Value, s1_.objects_, s1_.toGuest_, s1_.unsupported_);
}
}
{
InteropLibrary cached1_objects__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
cached1_objects__ = (INTEROP_LIBRARY_.getUncached(arg1Value));
this.cached1_toGuest_ = super.insert((ToGuestValueNodeGen.create()));
this.cached1_unsupported_ = (BranchProfile.create());
this.exclude_ = exclude = exclude | 0b1 /* add-excluded doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) */;
this.cached0_cache = null;
state = state & 0xfffffffe /* remove-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) */;
this.state_ = state = state | 0b10 /* add-active doCached(PolyglotLanguageContext, Object, Object[], InteropLibrary, ToGuestValueNode, BranchProfile) */;
lock.unlock();
hasLock = false;
return IsMetaInstanceNode.doCached(arg0Value, arg1Value, arg2Value, cached1_objects__, this.cached1_toGuest_, this.cached1_unsupported_);
} finally {
encapsulating_.set(prev_);
}
}
}
} finally {
if (hasLock) {
lock.unlock();
}
}
}
@Override
public NodeCost getCost() {
int state = state_;
if (state == 0b0) {
return NodeCost.UNINITIALIZED;
} else if ((state & (state - 1)) == 0 /* is-single-active */) {
Cached0Data s1_ = this.cached0_cache;
if ((s1_ == null || s1_.next_ == null)) {
return NodeCost.MONOMORPHIC;
}
}
return NodeCost.POLYMORPHIC;
}
public static IsMetaInstanceNode create(InteropCodeCache interop) {
return new IsMetaInstanceNodeGen(interop);
}
@GeneratedBy(IsMetaInstanceNode.class)
private static final class Cached0Data extends Node {
@Child Cached0Data next_;
@Child InteropLibrary objects_;
@Child ToGuestValueNode toGuest_;
@CompilationFinal BranchProfile unsupported_;
Cached0Data(Cached0Data next_) {
this.next_ = next_;
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
T insertAccessor(T node) {
return super.insert(node);
}
}
}
}
}