Class DualNode
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.binary.DualNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, ResumableNode, ResumableNode.WithIntState, SequenceNode, Cloneable
-
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.WrapperNodeNested classes/interfaces inherited from interface ResumableNode
ResumableNode.WithIntState, ResumableNode.WithObjectState -
Field Summary
Fields inherited from class 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 left, JavaScriptNode right) execute(com.oracle.truffle.api.frame.VirtualFrame frame) Executes this node using the specified context and frame and returns the result value.booleanexecuteBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to a boolean.doubleexecuteDouble(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to a double.intexecuteInt(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to an int.voidexecuteVoid(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it throws away the result.getLeft()getRight()booleanisResultAlwaysOfType(Class<?> clazz) resume(com.oracle.truffle.api.frame.VirtualFrame frame, int stateSlot) Methods inherited from class JavaScriptNode
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, createWrapper, expressionToString, findBlockScopeNode, getSourceSection, hasSourceSection, hasTag, 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, getNodeObject, materializeInstrumentableNodesMethods inherited from interface ResumableNode
asResumableNode, resetStateMethods inherited from interface ResumableNode.WithIntState
getStateAsInt, getStateAsIntAndReset, getStateSlotKind, setStateAsInt
-
Constructor Details
-
DualNode
-
-
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
-
executeInt
public int executeInt(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException Description copied from class:JavaScriptNodeLikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to an int. A node can override this method if it has a better way to producing a value of type int.- Overrides:
executeIntin classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution as an int
- Throws:
com.oracle.truffle.api.nodes.UnexpectedResultException- if a loss-free conversion of the result to int is not possible
-
executeDouble
public double executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException Description copied from class:JavaScriptNodeLikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to a double. A node can override this method if it has a better way to producing a value of type double.- Overrides:
executeDoublein classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution as a double
- Throws:
com.oracle.truffle.api.nodes.UnexpectedResultException- if a loss-free conversion of the result to double is not possible
-
executeBoolean
public boolean executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException 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
- Throws:
com.oracle.truffle.api.nodes.UnexpectedResultException- if a loss-free conversion of the result to double is not possible
-
executeVoid
public void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame) Description copied from class:JavaScriptNodeLikeJavaScriptNode.execute(VirtualFrame)except that it throws away the result. A node can override this method if it has a better way to execute without producing a value.- Overrides:
executeVoidin classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method
-
getStatements
- Specified by:
getStatementsin interfaceSequenceNode
-
resume
- Specified by:
resumein interfaceResumableNode
-
isResultAlwaysOfType
- Overrides:
isResultAlwaysOfTypein classJavaScriptNode
-
copyUninitialized
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) - Overrides:
copyUninitializedin classJavaScriptNode
-
getLeft
-
getRight
-