Class JSIsNullOrUndefinedNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.nodes.JavaScriptNode
com.oracle.truffle.js.nodes.unary.JSUnaryNode
com.oracle.truffle.js.nodes.unary.JSIsNullOrUndefinedNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, Cloneable
This node optimizes the check whether the argument is null or undefined. Used from the
JSEqualNode for optimizing a == undefined; and a == null;-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.ChildrenNested classes/interfaces inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode -
Field Summary
Fields inherited from class JSUnaryNode
operandNodeFields inherited from class JavaScriptNode
INTERMEDIATE_VALUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJSIsNullOrUndefinedNode(JavaScriptNode operand, boolean isUndefined, boolean isLeft) -
Method Summary
Modifier and TypeMethodDescriptionprotected JavaScriptNodecopyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) static JSIsNullOrUndefinedNodecreate()static JSIsNullOrUndefinedNodecreateFromEquals(JavaScriptNode left, JavaScriptNode right) protected static booleanprotected static booleandoJSObject(Object object) protected static booleandoJSObjectCached(Object object, Class<?> cachedClass) protected booleandoJSValueOrForeign(Object operand, com.oracle.truffle.api.interop.InteropLibrary interop) protected static booleanprotected static booleandoSafeInteger(SafeInteger operand) protected static booleanprotected static booleandoTString(com.oracle.truffle.api.strings.TruffleString operand) protected static booleandoUndefined(Object operand) abstract booleanexecuteBoolean(Object input) booleanbooleanisResultAlwaysOfType(Class<?> clazz) com.oracle.truffle.api.instrumentation.InstrumentableNodematerializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) Methods inherited from class JSUnaryNode
expressionToString, getNodeObject, getOperandMethods inherited from class JavaScriptNode
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, createWrapper, execute, executeBoolean, executeDouble, executeInt, executeVoid, findBlockScopeNode, getSourceSection, hasSourceSection, isInstrumentable, onReplace, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTagsMethods inherited from class JavaScriptBaseNode
getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperators, reportLoopCount, reportLoopCountMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, reportReplaceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
createProbe, findNearestNodeAt, findNearestNodeAt, findProbe
-
Constructor Details
-
JSIsNullOrUndefinedNode
-
-
Method Details
-
executeBoolean
-
hasTag
- Specified by:
hasTagin interfacecom.oracle.truffle.api.instrumentation.InstrumentableNode- Overrides:
hasTagin classJavaScriptNode
-
materializeInstrumentableNodes
-
doNull
-
doUndefined
-
doSymbol
-
doTString
protected static boolean doTString(com.oracle.truffle.api.strings.TruffleString operand) -
doSafeInteger
-
doBigInt
-
doJSObjectCached
-
doJSObject
-
doJSValueOrForeign
protected boolean doJSValueOrForeign(Object operand, com.oracle.truffle.api.interop.InteropLibrary interop) -
createFromEquals
-
create
-
isResultAlwaysOfType
- Overrides:
isResultAlwaysOfTypein classJavaScriptNode
-
copyUninitialized
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) - Overrides:
copyUninitializedin classJavaScriptNode
-