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, transferSourceSectionAndTagsaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, lookupContextReference, lookupLanguageReference, notifyInserted, replace, replace, reportPolymorphicSpecializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetState, getStateAndReset, getStateAsInt, getStateAsIntAndReset, parent, resetState, setStateprotected 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)
JavaScriptNodeexecute in class JavaScriptNodeframe - 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.InstrumentableNodehasTag in class JavaScriptNodepublic 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.InstrumentableNodeprotected final Object suspendAwait(com.oracle.truffle.api.frame.VirtualFrame frame, Object value)
public Object getNodeObject()
getNodeObject in interface com.oracle.truffle.api.instrumentation.InstrumentableNodepublic Object resume(com.oracle.truffle.api.frame.VirtualFrame frame)
resume in interface ResumableNodeprotected 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 JavaScriptNodepublic 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)