Class JSToBooleanUnaryNode
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.cast.JSToBooleanUnaryNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode,com.oracle.truffle.api.nodes.NodeInterface,Cloneable
- See Also:
-
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 com.oracle.truffle.js.nodes.unary.JSUnaryNode
operandNodeFields inherited from class com.oracle.truffle.js.nodes.JavaScriptNode
INTERMEDIATE_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JavaScriptNodecopyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) static JavaScriptNodecreate(JavaScriptNode child) protected static booleanprotected static booleandoBoolean(boolean value) protected static booleandoDouble(double value) protected static booleandoForeignObject(Object value, com.oracle.truffle.api.nodes.Node node, JSToBooleanNode toBooleanNode) protected static booleandoInt(int value) protected static booleandoLong(long value) protected static booleanprotected static booleanprotected static booleandoString(com.oracle.truffle.api.strings.TruffleString value) protected static booleanprotected static booleandoUndefined(Object value) final Objectexecute(com.oracle.truffle.api.frame.VirtualFrame frame) Executes this node using the specified context and frame and returns the result value.abstract booleanexecuteBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to a boolean.booleanbooleanisResultAlwaysOfType(Class<?> clazz) com.oracle.truffle.api.instrumentation.InstrumentableNodematerializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) Methods inherited from class com.oracle.truffle.js.nodes.unary.JSUnaryNode
expressionToString, getNodeObject, getOperandMethods inherited from class com.oracle.truffle.js.nodes.JavaScriptNode
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, createWrapper, executeDouble, executeInt, executeVoid, findBlockScopeNode, getSourceSection, hasSourceSection, isInstrumentable, onReplace, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTagsMethods inherited from class com.oracle.truffle.js.nodes.JavaScriptBaseNode
getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperatorsMethods 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, reportPolymorphicSpecializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
findNearestNodeAt, findNearestNodeAt
-
Constructor Details
-
JSToBooleanUnaryNode
-
-
Method Details
-
create
-
execute
Description copied from class:JavaScriptNodeExecutes this node using the specified context and frame and returns the result value.- Specified by:
executein classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution
-
executeBoolean
public abstract boolean executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) Description copied from class:JavaScriptNodeLikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to a boolean. A node can override this method if it has a better way to producing a value of type boolean.- Overrides:
executeBooleanin classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution as a boolean
-
doBoolean
protected static boolean doBoolean(boolean value) -
doNull
-
doUndefined
-
doInt
protected static boolean doInt(int value) -
doLong
protected static boolean doLong(long value) -
doDouble
protected static boolean doDouble(double value) -
doBigInt
-
doString
protected static boolean doString(com.oracle.truffle.api.strings.TruffleString value) -
doObject
-
doSymbol
-
doForeignObject
protected static boolean doForeignObject(Object value, com.oracle.truffle.api.nodes.Node node, JSToBooleanNode toBooleanNode) -
copyUninitialized
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) - Overrides:
copyUninitializedin classJavaScriptNode
-
isResultAlwaysOfType
- Overrides:
isResultAlwaysOfTypein classJavaScriptNode
-
hasTag
- Specified by:
hasTagin interfacecom.oracle.truffle.api.instrumentation.InstrumentableNode- Overrides:
hasTagin classJavaScriptNode
-
materializeInstrumentableNodes
-