public class DualNode extends JavaScriptNode implements SequenceNode, ResumableNode.WithIntState
com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.ChildrenResumableNode.WithIntState, ResumableNode.WithObjectStateINTERMEDIATE_VALUE| Constructor and Description |
|---|
DualNode(JavaScriptNode left,
JavaScriptNode right) |
| Modifier and Type | Method and Description |
|---|---|
protected JavaScriptNode |
copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
static JavaScriptNode |
create(JavaScriptNode left,
JavaScriptNode right) |
Object |
execute(com.oracle.truffle.api.frame.VirtualFrame frame)
Executes this node using the specified context and frame and returns the result value.
|
boolean |
executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to a
boolean. |
double |
executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to a
double. |
int |
executeInt(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to an
int. |
void |
executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it throws away the result. |
JavaScriptNode |
getLeft() |
JavaScriptNode |
getRight() |
JavaScriptNode[] |
getStatements() |
boolean |
isResultAlwaysOfType(Class<?> clazz) |
Object |
resume(com.oracle.truffle.api.frame.VirtualFrame frame,
int stateSlot) |
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, createWrapper, executeLong, expressionToString, findBlockScopeNode, getSourceSection, hasSourceSection, hasTag, isInstrumentable, onReplace, removeSourceSection, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTagsgetLanguage, getRealm, hasOverloadedOperatorsaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecializeclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetStateAsInt, getStateAsIntAndReset, getStateSlotKind, setStateAsIntasResumableNode, createResumableNode, resetStatepublic DualNode(JavaScriptNode left, JavaScriptNode right)
public static JavaScriptNode create(JavaScriptNode left, JavaScriptNode right)
public Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNodeexecute in class JavaScriptNodeframe - the frame of the currently executing guest language methodpublic int executeInt(com.oracle.truffle.api.frame.VirtualFrame frame)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
JavaScriptNodeJavaScriptNode.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.executeInt in class JavaScriptNodeframe - the frame of the currently executing guest language methodcom.oracle.truffle.api.nodes.UnexpectedResultException - if a loss-free conversion of the result to int is not
possiblepublic double executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
JavaScriptNodeJavaScriptNode.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.executeDouble in class JavaScriptNodeframe - the frame of the currently executing guest language methodcom.oracle.truffle.api.nodes.UnexpectedResultException - if a loss-free conversion of the result to double is not
possiblepublic boolean executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
JavaScriptNodeJavaScriptNode.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.executeBoolean in class JavaScriptNodeframe - the frame of the currently executing guest language methodcom.oracle.truffle.api.nodes.UnexpectedResultException - if a loss-free conversion of the result to double is not
possiblepublic void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNodeJavaScriptNode.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.executeVoid in class JavaScriptNodeframe - the frame of the currently executing guest language methodpublic JavaScriptNode[] getStatements()
getStatements in interface SequenceNodepublic Object resume(com.oracle.truffle.api.frame.VirtualFrame frame, int stateSlot)
resume in interface ResumableNodepublic boolean isResultAlwaysOfType(Class<?> clazz)
isResultAlwaysOfType in class JavaScriptNodeprotected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
copyUninitialized in class JavaScriptNodepublic JavaScriptNode getLeft()
public JavaScriptNode getRight()