public abstract class JavaScriptNode extends JavaScriptBaseNode implements com.oracle.truffle.api.instrumentation.InstrumentableNode
| Modifier and Type | Field and Description |
|---|---|
protected static String |
INTERMEDIATE_VALUE |
| Modifier | Constructor and Description |
|---|---|
protected |
JavaScriptNode() |
protected |
JavaScriptNode(com.oracle.truffle.api.source.SourceSection sourceSection) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCallTag() |
void |
addExpressionTag() |
void |
addRootBodyTag() |
void |
addStatementTag() |
static <T extends JavaScriptNode> |
cloneUninitialized(T[] nodeArray,
Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
static <T extends JavaScriptNode> |
cloneUninitialized(T node,
Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
JavaScriptNode |
copy() |
protected JavaScriptNode |
copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode |
createWrapper(com.oracle.truffle.api.instrumentation.ProbeNode probe) |
abstract 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. |
long |
executeLong(com.oracle.truffle.api.frame.VirtualFrame frame) |
void |
executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it throws away the result. |
String |
expressionToString() |
static com.oracle.truffle.api.nodes.Node |
findBlockScopeNode(com.oracle.truffle.api.nodes.Node node) |
com.oracle.truffle.api.source.SourceSection |
getSourceSection() |
boolean |
hasSourceSection() |
boolean |
hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag) |
boolean |
isInstrumentable() |
boolean |
isResultAlwaysOfType(Class<?> clazz) |
protected void |
onReplace(com.oracle.truffle.api.nodes.Node newNode,
CharSequence reason) |
void |
removeSourceSection() |
void |
setSourceSection(com.oracle.truffle.api.source.Source source,
int charIndex,
int charLength) |
void |
setSourceSection(com.oracle.truffle.api.source.SourceSection section) |
String |
toString() |
static void |
transferSourceSection(JavaScriptNode fromNode,
JavaScriptNode toNode) |
static void |
transferSourceSectionAddExpressionTag(JavaScriptNode fromNode,
JavaScriptNode toNode) |
static void |
transferSourceSectionAndTags(JavaScriptNode fromNode,
JavaScriptNode toNode) |
getLanguage, getRealm, hasOverloadedOperatorsaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecializeprotected static final String INTERMEDIATE_VALUE
protected JavaScriptNode()
protected JavaScriptNode(com.oracle.truffle.api.source.SourceSection sourceSection)
public boolean isInstrumentable()
isInstrumentable in interface com.oracle.truffle.api.instrumentation.InstrumentableNodepublic com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode createWrapper(com.oracle.truffle.api.instrumentation.ProbeNode probe)
createWrapper in interface com.oracle.truffle.api.instrumentation.InstrumentableNodepublic abstract Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
frame - 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
JavaScriptNode.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.frame - 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
JavaScriptNode.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.frame - 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
JavaScriptNode.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.frame - 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 long executeLong(com.oracle.truffle.api.frame.VirtualFrame frame)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
com.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNode.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.frame - the frame of the currently executing guest language methodpublic JavaScriptNode copy()
copy in class JavaScriptBaseNodepublic String toString()
toString in class com.oracle.truffle.api.nodes.Nodeprotected void onReplace(com.oracle.truffle.api.nodes.Node newNode,
CharSequence reason)
onReplace in class JavaScriptBaseNodepublic static void transferSourceSectionAndTags(JavaScriptNode fromNode, JavaScriptNode toNode)
public static void transferSourceSectionAddExpressionTag(JavaScriptNode fromNode, JavaScriptNode toNode)
public static void transferSourceSection(JavaScriptNode fromNode, JavaScriptNode toNode)
public final boolean hasSourceSection()
public final com.oracle.truffle.api.source.SourceSection getSourceSection()
getSourceSection in class com.oracle.truffle.api.nodes.Nodepublic final void setSourceSection(com.oracle.truffle.api.source.SourceSection section)
public final void setSourceSection(com.oracle.truffle.api.source.Source source,
int charIndex,
int charLength)
public boolean isResultAlwaysOfType(Class<?> clazz)
public boolean hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag)
hasTag in interface com.oracle.truffle.api.instrumentation.InstrumentableNodepublic final void addStatementTag()
public final void addCallTag()
public final void addRootBodyTag()
public final void addExpressionTag()
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
public static <T extends JavaScriptNode> T cloneUninitialized(T node, Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
public static <T extends JavaScriptNode> T[] cloneUninitialized(T[] nodeArray, Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
public void removeSourceSection()
public String expressionToString()
public static com.oracle.truffle.api.nodes.Node findBlockScopeNode(com.oracle.truffle.api.nodes.Node node)