com.oracle.truffle.js.nodes.unary.JSIsNullOrUndefinedNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.truffle.js.nodes.unary;
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.DSLSupport;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.dsl.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.interop.InteropLibrary;
import com.oracle.truffle.api.library.LibraryFactory;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.EncapsulatingNodeReference;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.strings.TruffleString;
import com.oracle.truffle.js.nodes.JSGuards;
import com.oracle.truffle.js.nodes.JavaScriptNode;
import com.oracle.truffle.js.runtime.BigInt;
import com.oracle.truffle.js.runtime.JSConfig;
import com.oracle.truffle.js.runtime.SafeInteger;
import com.oracle.truffle.js.runtime.Symbol;
import java.lang.invoke.MethodHandles;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link JSIsNullOrUndefinedNode#doNull}
* Activation probability: 0.17364
* With/without class size: 6/0 bytes
* Specialization {@link JSIsNullOrUndefinedNode#doUndefined}
* Activation probability: 0.15727
* With/without class size: 5/0 bytes
* Specialization {@link JSIsNullOrUndefinedNode#doSymbol}
* Activation probability: 0.14091
* With/without class size: 5/0 bytes
* Specialization {@link JSIsNullOrUndefinedNode#doTString}
* Activation probability: 0.12455
* With/without class size: 5/0 bytes
* Specialization {@link JSIsNullOrUndefinedNode#doSafeInteger}
* Activation probability: 0.10818
* With/without class size: 5/0 bytes
* Specialization {@link JSIsNullOrUndefinedNode#doBigInt}
* Activation probability: 0.09182
* With/without class size: 5/0 bytes
* Specialization {@link JSIsNullOrUndefinedNode#doJSObjectCached}
* Activation probability: 0.07545
* With/without class size: 5/4 bytes
* Specialization {@link JSIsNullOrUndefinedNode#doJSObject}
* Activation probability: 0.05909
* With/without class size: 4/0 bytes
* Specialization {@link JSIsNullOrUndefinedNode#doJSValueOrForeign}
* Activation probability: 0.04273
* With/without class size: 5/4 bytes
* Specialization {@link JSIsNullOrUndefinedNode#doJSValueOrForeign}
* Activation probability: 0.02636
* With/without class size: 4/0 bytes
*
*/
@GeneratedBy(JSIsNullOrUndefinedNode.class)
@SuppressWarnings({"javadoc", "unused"})
public final class JSIsNullOrUndefinedNodeGen extends JSIsNullOrUndefinedNode {
static final ReferenceField J_S_OBJECT_CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "jSObjectCached_cache", JSObjectCachedData.class);
static final ReferenceField J_S_VALUE_OR_FOREIGN0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "jSValueOrForeign0_cache", JSValueOrForeign0Data.class);
private static final LibraryFactory INTEROP_LIBRARY_ = LibraryFactory.resolve(InteropLibrary.class);
/**
* State Info:
* 0: SpecializationActive {@link JSIsNullOrUndefinedNode#doNull}
* 1: SpecializationActive {@link JSIsNullOrUndefinedNode#doUndefined}
* 2: SpecializationActive {@link JSIsNullOrUndefinedNode#doSymbol}
* 3: SpecializationActive {@link JSIsNullOrUndefinedNode#doTString}
* 4: SpecializationActive {@link JSIsNullOrUndefinedNode#doSafeInteger}
* 5: SpecializationActive {@link JSIsNullOrUndefinedNode#doBigInt}
* 6: SpecializationActive {@link JSIsNullOrUndefinedNode#doJSObjectCached}
* 7: SpecializationActive {@link JSIsNullOrUndefinedNode#doJSObject}
* 8: SpecializationActive {@link JSIsNullOrUndefinedNode#doJSValueOrForeign}
* 9: SpecializationActive {@link JSIsNullOrUndefinedNode#doJSValueOrForeign}
*
*/
@CompilationFinal private int state_0_;
@UnsafeAccessedField @CompilationFinal private JSObjectCachedData jSObjectCached_cache;
@UnsafeAccessedField @Child private JSValueOrForeign0Data jSValueOrForeign0_cache;
private JSIsNullOrUndefinedNodeGen(JavaScriptNode operand, boolean isUndefined, boolean isLeft) {
super(operand, isUndefined, isLeft);
}
@ExplodeLoop
@Override
public boolean executeBoolean(Object operandNodeValue) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doSymbol(Symbol)] || SpecializationActive[JSIsNullOrUndefinedNode.doTString(TruffleString)] || SpecializationActive[JSIsNullOrUndefinedNode.doSafeInteger(SafeInteger)] || SpecializationActive[JSIsNullOrUndefinedNode.doBigInt(BigInt)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
if ((state_0 & 0b11) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] */) {
if ((JSGuards.isJSNull(operandNodeValue))) {
return JSIsNullOrUndefinedNode.doNull(operandNodeValue);
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] */) {
if ((JSGuards.isUndefined(operandNodeValue))) {
return JSIsNullOrUndefinedNode.doUndefined(operandNodeValue);
}
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doSymbol(Symbol)] */ && operandNodeValue instanceof Symbol) {
Symbol operandNodeValue_ = (Symbol) operandNodeValue;
return JSIsNullOrUndefinedNode.doSymbol(operandNodeValue_);
}
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doTString(TruffleString)] */ && operandNodeValue instanceof TruffleString) {
TruffleString operandNodeValue_ = (TruffleString) operandNodeValue;
return JSIsNullOrUndefinedNode.doTString(operandNodeValue_);
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doSafeInteger(SafeInteger)] */ && operandNodeValue instanceof SafeInteger) {
SafeInteger operandNodeValue_ = (SafeInteger) operandNodeValue;
return JSIsNullOrUndefinedNode.doSafeInteger(operandNodeValue_);
}
if ((state_0 & 0b100000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doBigInt(BigInt)] */ && operandNodeValue instanceof BigInt) {
BigInt operandNodeValue_ = (BigInt) operandNodeValue;
return JSIsNullOrUndefinedNode.doBigInt(operandNodeValue_);
}
if ((state_0 & 0b1111000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] */) {
JSObjectCachedData s6_ = this.jSObjectCached_cache;
if (s6_ != null) {
assert DSLSupport.assertIdempotence((s6_.cachedClass_ != null));
if ((CompilerDirectives.isExact(operandNodeValue, s6_.cachedClass_))) {
return JSIsNullOrUndefinedNode.doJSObjectCached(operandNodeValue, s6_.cachedClass_);
}
}
}
if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] */) {
if ((JSGuards.isJSObject(operandNodeValue))) {
return JSIsNullOrUndefinedNode.doJSObject(operandNodeValue);
}
}
if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
JSValueOrForeign0Data s8_ = this.jSValueOrForeign0_cache;
while (s8_ != null) {
if ((s8_.interop_.accepts(operandNodeValue)) && (!(JSGuards.isJSDynamicObject(operandNodeValue)))) {
return doJSValueOrForeign(operandNodeValue, s8_.interop_);
}
s8_ = s8_.next_;
}
}
if ((state_0 & 0b1000000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
if ((!(JSGuards.isJSDynamicObject(operandNodeValue)))) {
return this.jSValueOrForeign1Boundary(state_0, operandNodeValue);
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(operandNodeValue);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private boolean jSValueOrForeign1Boundary(int state_0, Object operandNodeValue) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary interop__ = (INTEROP_LIBRARY_.getUncached(operandNodeValue));
return doJSValueOrForeign(operandNodeValue, interop__);
}
} finally {
encapsulating_.set(prev_);
}
}
@ExplodeLoop
@Override
public Object execute(VirtualFrame frameValue) {
int state_0 = this.state_0_;
Object operandNodeValue_ = super.operandNode.execute(frameValue);
if (state_0 != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doSymbol(Symbol)] || SpecializationActive[JSIsNullOrUndefinedNode.doTString(TruffleString)] || SpecializationActive[JSIsNullOrUndefinedNode.doSafeInteger(SafeInteger)] || SpecializationActive[JSIsNullOrUndefinedNode.doBigInt(BigInt)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
if ((state_0 & 0b11) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] */) {
if ((JSGuards.isJSNull(operandNodeValue_))) {
return JSIsNullOrUndefinedNode.doNull(operandNodeValue_);
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] */) {
if ((JSGuards.isUndefined(operandNodeValue_))) {
return JSIsNullOrUndefinedNode.doUndefined(operandNodeValue_);
}
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doSymbol(Symbol)] */ && operandNodeValue_ instanceof Symbol) {
Symbol operandNodeValue__ = (Symbol) operandNodeValue_;
return JSIsNullOrUndefinedNode.doSymbol(operandNodeValue__);
}
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doTString(TruffleString)] */ && operandNodeValue_ instanceof TruffleString) {
TruffleString operandNodeValue__ = (TruffleString) operandNodeValue_;
return JSIsNullOrUndefinedNode.doTString(operandNodeValue__);
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doSafeInteger(SafeInteger)] */ && operandNodeValue_ instanceof SafeInteger) {
SafeInteger operandNodeValue__ = (SafeInteger) operandNodeValue_;
return JSIsNullOrUndefinedNode.doSafeInteger(operandNodeValue__);
}
if ((state_0 & 0b100000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doBigInt(BigInt)] */ && operandNodeValue_ instanceof BigInt) {
BigInt operandNodeValue__ = (BigInt) operandNodeValue_;
return JSIsNullOrUndefinedNode.doBigInt(operandNodeValue__);
}
if ((state_0 & 0b1111000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] */) {
JSObjectCachedData s6_ = this.jSObjectCached_cache;
if (s6_ != null) {
assert DSLSupport.assertIdempotence((s6_.cachedClass_ != null));
if ((CompilerDirectives.isExact(operandNodeValue_, s6_.cachedClass_))) {
return JSIsNullOrUndefinedNode.doJSObjectCached(operandNodeValue_, s6_.cachedClass_);
}
}
}
if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] */) {
if ((JSGuards.isJSObject(operandNodeValue_))) {
return JSIsNullOrUndefinedNode.doJSObject(operandNodeValue_);
}
}
if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
JSValueOrForeign0Data s8_ = this.jSValueOrForeign0_cache;
while (s8_ != null) {
if ((s8_.interop_.accepts(operandNodeValue_)) && (!(JSGuards.isJSDynamicObject(operandNodeValue_)))) {
return doJSValueOrForeign(operandNodeValue_, s8_.interop_);
}
s8_ = s8_.next_;
}
}
if ((state_0 & 0b1000000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
if ((!(JSGuards.isJSDynamicObject(operandNodeValue_)))) {
return this.jSValueOrForeign1Boundary0(state_0, operandNodeValue_);
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(operandNodeValue_);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private Object jSValueOrForeign1Boundary0(int state_0, Object operandNodeValue_) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary interop__ = (INTEROP_LIBRARY_.getUncached(operandNodeValue_));
return doJSValueOrForeign(operandNodeValue_, interop__);
}
} finally {
encapsulating_.set(prev_);
}
}
@ExplodeLoop
@Override
public boolean executeBoolean(VirtualFrame frameValue) {
int state_0 = this.state_0_;
Object operandNodeValue_ = super.operandNode.execute(frameValue);
if (state_0 != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doSymbol(Symbol)] || SpecializationActive[JSIsNullOrUndefinedNode.doTString(TruffleString)] || SpecializationActive[JSIsNullOrUndefinedNode.doSafeInteger(SafeInteger)] || SpecializationActive[JSIsNullOrUndefinedNode.doBigInt(BigInt)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
if ((state_0 & 0b11) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] */) {
if ((JSGuards.isJSNull(operandNodeValue_))) {
return JSIsNullOrUndefinedNode.doNull(operandNodeValue_);
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] */) {
if ((JSGuards.isUndefined(operandNodeValue_))) {
return JSIsNullOrUndefinedNode.doUndefined(operandNodeValue_);
}
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doSymbol(Symbol)] */ && operandNodeValue_ instanceof Symbol) {
Symbol operandNodeValue__ = (Symbol) operandNodeValue_;
return JSIsNullOrUndefinedNode.doSymbol(operandNodeValue__);
}
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doTString(TruffleString)] */ && operandNodeValue_ instanceof TruffleString) {
TruffleString operandNodeValue__ = (TruffleString) operandNodeValue_;
return JSIsNullOrUndefinedNode.doTString(operandNodeValue__);
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doSafeInteger(SafeInteger)] */ && operandNodeValue_ instanceof SafeInteger) {
SafeInteger operandNodeValue__ = (SafeInteger) operandNodeValue_;
return JSIsNullOrUndefinedNode.doSafeInteger(operandNodeValue__);
}
if ((state_0 & 0b100000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doBigInt(BigInt)] */ && operandNodeValue_ instanceof BigInt) {
BigInt operandNodeValue__ = (BigInt) operandNodeValue_;
return JSIsNullOrUndefinedNode.doBigInt(operandNodeValue__);
}
if ((state_0 & 0b1111000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] || SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] */) {
JSObjectCachedData s6_ = this.jSObjectCached_cache;
if (s6_ != null) {
assert DSLSupport.assertIdempotence((s6_.cachedClass_ != null));
if ((CompilerDirectives.isExact(operandNodeValue_, s6_.cachedClass_))) {
return JSIsNullOrUndefinedNode.doJSObjectCached(operandNodeValue_, s6_.cachedClass_);
}
}
}
if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] */) {
if ((JSGuards.isJSObject(operandNodeValue_))) {
return JSIsNullOrUndefinedNode.doJSObject(operandNodeValue_);
}
}
if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
JSValueOrForeign0Data s8_ = this.jSValueOrForeign0_cache;
while (s8_ != null) {
if ((s8_.interop_.accepts(operandNodeValue_)) && (!(JSGuards.isJSDynamicObject(operandNodeValue_)))) {
return doJSValueOrForeign(operandNodeValue_, s8_.interop_);
}
s8_ = s8_.next_;
}
}
if ((state_0 & 0b1000000000) != 0 /* is SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
if ((!(JSGuards.isJSDynamicObject(operandNodeValue_)))) {
return this.jSValueOrForeign1Boundary1(state_0, operandNodeValue_);
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(operandNodeValue_);
}
@SuppressWarnings("static-method")
@TruffleBoundary
private boolean jSValueOrForeign1Boundary1(int state_0, Object operandNodeValue_) {
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
{
InteropLibrary interop__ = (INTEROP_LIBRARY_.getUncached(operandNodeValue_));
return doJSValueOrForeign(operandNodeValue_, interop__);
}
} finally {
encapsulating_.set(prev_);
}
}
@Override
public void executeVoid(VirtualFrame frameValue) {
executeBoolean(frameValue);
return;
}
private boolean executeAndSpecialize(Object operandNodeValue) {
int state_0 = this.state_0_;
if ((JSGuards.isJSNull(operandNodeValue))) {
state_0 = state_0 | 0b1 /* add SpecializationActive[JSIsNullOrUndefinedNode.doNull(Object)] */;
this.state_0_ = state_0;
return JSIsNullOrUndefinedNode.doNull(operandNodeValue);
}
if ((JSGuards.isUndefined(operandNodeValue))) {
state_0 = state_0 | 0b10 /* add SpecializationActive[JSIsNullOrUndefinedNode.doUndefined(Object)] */;
this.state_0_ = state_0;
return JSIsNullOrUndefinedNode.doUndefined(operandNodeValue);
}
if (operandNodeValue instanceof Symbol) {
Symbol operandNodeValue_ = (Symbol) operandNodeValue;
state_0 = state_0 | 0b100 /* add SpecializationActive[JSIsNullOrUndefinedNode.doSymbol(Symbol)] */;
this.state_0_ = state_0;
return JSIsNullOrUndefinedNode.doSymbol(operandNodeValue_);
}
if (operandNodeValue instanceof TruffleString) {
TruffleString operandNodeValue_ = (TruffleString) operandNodeValue;
state_0 = state_0 | 0b1000 /* add SpecializationActive[JSIsNullOrUndefinedNode.doTString(TruffleString)] */;
this.state_0_ = state_0;
return JSIsNullOrUndefinedNode.doTString(operandNodeValue_);
}
if (operandNodeValue instanceof SafeInteger) {
SafeInteger operandNodeValue_ = (SafeInteger) operandNodeValue;
state_0 = state_0 | 0b10000 /* add SpecializationActive[JSIsNullOrUndefinedNode.doSafeInteger(SafeInteger)] */;
this.state_0_ = state_0;
return JSIsNullOrUndefinedNode.doSafeInteger(operandNodeValue_);
}
if (operandNodeValue instanceof BigInt) {
BigInt operandNodeValue_ = (BigInt) operandNodeValue;
state_0 = state_0 | 0b100000 /* add SpecializationActive[JSIsNullOrUndefinedNode.doBigInt(BigInt)] */;
this.state_0_ = state_0;
return JSIsNullOrUndefinedNode.doBigInt(operandNodeValue_);
}
if (((state_0 & 0b10000000)) == 0 /* is-not SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] */) {
while (true) {
int count6_ = 0;
JSObjectCachedData s6_ = J_S_OBJECT_CACHED_CACHE_UPDATER.getVolatile(this);
JSObjectCachedData s6_original = s6_;
while (s6_ != null) {
assert DSLSupport.assertIdempotence((s6_.cachedClass_ != null));
if ((CompilerDirectives.isExact(operandNodeValue, s6_.cachedClass_))) {
break;
}
count6_++;
s6_ = null;
break;
}
if (s6_ == null && count6_ < 1) {
{
Class> cachedClass__ = (JSGuards.getClassIfJSObject(operandNodeValue));
if ((cachedClass__ != null) && (CompilerDirectives.isExact(operandNodeValue, cachedClass__))) {
s6_ = new JSObjectCachedData();
s6_.cachedClass_ = cachedClass__;
if (!J_S_OBJECT_CACHED_CACHE_UPDATER.compareAndSet(this, s6_original, s6_)) {
continue;
}
state_0 = state_0 | 0b1000000 /* add SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] */;
this.state_0_ = state_0;
}
}
}
if (s6_ != null) {
return JSIsNullOrUndefinedNode.doJSObjectCached(operandNodeValue, s6_.cachedClass_);
}
break;
}
}
if ((JSGuards.isJSObject(operandNodeValue))) {
this.jSObjectCached_cache = null;
state_0 = state_0 & 0xffffffbf /* remove SpecializationActive[JSIsNullOrUndefinedNode.doJSObjectCached(Object, Class<>)] */;
state_0 = state_0 | 0b10000000 /* add SpecializationActive[JSIsNullOrUndefinedNode.doJSObject(Object)] */;
this.state_0_ = state_0;
return JSIsNullOrUndefinedNode.doJSObject(operandNodeValue);
}
if (((state_0 & 0b1000000000)) == 0 /* is-not SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */) {
while (true) {
int count8_ = 0;
JSValueOrForeign0Data s8_ = J_S_VALUE_OR_FOREIGN0_CACHE_UPDATER.getVolatile(this);
JSValueOrForeign0Data s8_original = s8_;
while (s8_ != null) {
if ((s8_.interop_.accepts(operandNodeValue)) && (!(JSGuards.isJSDynamicObject(operandNodeValue)))) {
break;
}
count8_++;
s8_ = s8_.next_;
}
if (s8_ == null) {
if ((!(JSGuards.isJSDynamicObject(operandNodeValue))) && count8_ < (JSConfig.InteropLibraryLimit)) {
// assert (s8_.interop_.accepts(operandNodeValue));
s8_ = this.insert(new JSValueOrForeign0Data(s8_original));
InteropLibrary interop__ = s8_.insert((INTEROP_LIBRARY_.create(operandNodeValue)));
Objects.requireNonNull(interop__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value.");
s8_.interop_ = interop__;
if (!J_S_VALUE_OR_FOREIGN0_CACHE_UPDATER.compareAndSet(this, s8_original, s8_)) {
continue;
}
state_0 = state_0 | 0b100000000 /* add SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */;
this.state_0_ = state_0;
}
}
if (s8_ != null) {
return doJSValueOrForeign(operandNodeValue, s8_.interop_);
}
break;
}
}
{
InteropLibrary interop__ = null;
{
EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent();
Node prev_ = encapsulating_.set(this);
try {
if ((!(JSGuards.isJSDynamicObject(operandNodeValue)))) {
interop__ = (INTEROP_LIBRARY_.getUncached(operandNodeValue));
this.jSValueOrForeign0_cache = null;
state_0 = state_0 & 0xfffffeff /* remove SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */;
state_0 = state_0 | 0b1000000000 /* add SpecializationActive[JSIsNullOrUndefinedNode.doJSValueOrForeign(Object, InteropLibrary)] */;
this.state_0_ = state_0;
return doJSValueOrForeign(operandNodeValue, interop__);
}
} finally {
encapsulating_.set(prev_);
}
}
}
throw new UnsupportedSpecializationException(this, new Node[] {super.operandNode}, operandNodeValue);
}
@NeverDefault
public static JSIsNullOrUndefinedNode create(JavaScriptNode operand, boolean isUndefined, boolean isLeft) {
return new JSIsNullOrUndefinedNodeGen(operand, isUndefined, isLeft);
}
@GeneratedBy(JSIsNullOrUndefinedNode.class)
@DenyReplace
private static final class JSObjectCachedData implements SpecializationDataNode {
/**
* Source Info:
* Specialization: {@link JSIsNullOrUndefinedNode#doJSObjectCached}
* Parameter: {@link Class} cachedClass
*/
@CompilationFinal Class> cachedClass_;
JSObjectCachedData() {
}
}
@GeneratedBy(JSIsNullOrUndefinedNode.class)
@DenyReplace
private static final class JSValueOrForeign0Data extends Node implements SpecializationDataNode {
@Child JSValueOrForeign0Data next_;
/**
* Source Info:
* Specialization: {@link JSIsNullOrUndefinedNode#doJSValueOrForeign}
* Parameter: {@link InteropLibrary} interop
*/
@Child InteropLibrary interop_;
JSValueOrForeign0Data(JSValueOrForeign0Data next_) {
this.next_ = next_;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy