public class AwaitNode extends JavaScriptNode implements ResumableNode, SuspendNode
Modifier and Type | Field and Description |
---|---|
protected JSContext |
context |
protected JavaScriptNode |
expression |
protected JSReadFrameSlotNode |
readAsyncContextNode |
protected JSReadFrameSlotNode |
readAsyncResultNode |
INTERMEDIATE_VALUE
Modifier | Constructor and Description |
---|---|
protected |
AwaitNode(JSContext context,
JavaScriptNode expression,
JSReadFrameSlotNode readAsyncContextNode,
JSReadFrameSlotNode readAsyncResultNode) |
Modifier and Type | Method and Description |
---|---|
protected JavaScriptNode |
copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
static AwaitNode |
create(JSContext context,
JavaScriptNode expression,
JSReadFrameSlotNode readAsyncContextNode,
JSReadFrameSlotNode readAsyncResultNode) |
Object |
execute(com.oracle.truffle.api.frame.VirtualFrame frame)
Executes this node using the specified context and frame and returns the result value.
|
static List<com.oracle.truffle.api.TruffleStackTraceElement> |
findAsyncStackFramesFromHandler(com.oracle.truffle.api.object.DynamicObject handlerFunction) |
static List<com.oracle.truffle.api.TruffleStackTraceElement> |
findAsyncStackFramesFromPromise(com.oracle.truffle.api.object.DynamicObject promise) |
Object |
getNodeObject() |
boolean |
hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag) |
com.oracle.truffle.api.instrumentation.InstrumentableNode |
materializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
Object |
resume(com.oracle.truffle.api.frame.VirtualFrame frame) |
protected Object |
resumeAwait(com.oracle.truffle.api.frame.VirtualFrame frame) |
protected Object |
suspendAwait(com.oracle.truffle.api.frame.VirtualFrame frame,
Object value) |
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, createWrapper, executeBoolean, executeDouble, executeInt, executeLong, executeSafeInteger, executeString, executeVoid, expressionToString, findBlockScopeNode, getSourceSection, hasSourceSection, isInstrumentable, isResultAlwaysOfType, onReplace, removeSourceSection, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTags
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, lookupContextReference, lookupLanguageReference, notifyInserted, replace, replace, reportPolymorphicSpecialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getState, getStateAndReset, getStateAsInt, getStateAsIntAndReset, parent, resetState, setState
protected JavaScriptNode expression
protected JSReadFrameSlotNode readAsyncResultNode
protected JSReadFrameSlotNode readAsyncContextNode
protected final JSContext context
protected AwaitNode(JSContext context, JavaScriptNode expression, JSReadFrameSlotNode readAsyncContextNode, JSReadFrameSlotNode readAsyncResultNode)
public static AwaitNode create(JSContext context, JavaScriptNode expression, JSReadFrameSlotNode readAsyncContextNode, JSReadFrameSlotNode readAsyncResultNode)
public Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNode
execute
in class JavaScriptNode
frame
- the frame of the currently executing guest language methodpublic boolean hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag)
hasTag
in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
hasTag
in class JavaScriptNode
public com.oracle.truffle.api.instrumentation.InstrumentableNode materializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
materializeInstrumentableNodes
in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
protected final Object suspendAwait(com.oracle.truffle.api.frame.VirtualFrame frame, Object value)
public Object getNodeObject()
getNodeObject
in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
public Object resume(com.oracle.truffle.api.frame.VirtualFrame frame)
resume
in interface ResumableNode
protected Object resumeAwait(com.oracle.truffle.api.frame.VirtualFrame frame)
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
copyUninitialized
in class JavaScriptNode
public static List<com.oracle.truffle.api.TruffleStackTraceElement> findAsyncStackFramesFromPromise(com.oracle.truffle.api.object.DynamicObject promise)
public static List<com.oracle.truffle.api.TruffleStackTraceElement> findAsyncStackFramesFromHandler(com.oracle.truffle.api.object.DynamicObject handlerFunction)