Class WhileNode
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.control.StatementNode
com.oracle.truffle.js.nodes.control.WhileNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, Cloneable
12.6.2 The while Statement.
-
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.WrapperNode -
Field Summary
Fields inherited from class StatementNode
EMPTYFields inherited from class JavaScriptNode
INTERMEDIATE_VALUE -
Method Summary
Modifier and TypeMethodDescriptionprotected JavaScriptNodecopyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) static JavaScriptNodecreateDesugaredFor(com.oracle.truffle.api.nodes.LoopNode loopNode) static JavaScriptNodecreateDesugaredForAwaitOf(com.oracle.truffle.api.nodes.LoopNode loopNode) static JavaScriptNodecreateDesugaredForIn(com.oracle.truffle.api.nodes.LoopNode loopNode) static JavaScriptNodecreateDesugaredForOf(com.oracle.truffle.api.nodes.LoopNode loopNode) static JavaScriptNodecreateDoWhile(com.oracle.truffle.api.nodes.LoopNode loopNode) static com.oracle.truffle.api.nodes.RepeatingNodecreateDoWhileRepeatingNode(JavaScriptNode condition, JavaScriptNode body) static com.oracle.truffle.api.nodes.RepeatingNodecreateForOfRepeatingNode(JavaScriptNode nextResultNode, JavaScriptNode body, JSWriteFrameSlotNode writeNextValueNode) static JavaScriptNodecreateWhileDo(com.oracle.truffle.api.nodes.LoopNode loopNode) static com.oracle.truffle.api.nodes.RepeatingNodecreateWhileDoRepeatingNode(JavaScriptNode condition, JavaScriptNode body) execute(com.oracle.truffle.api.frame.VirtualFrame frame) Executes this node using the specified context and frame and returns the result value.voidexecuteVoid(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it throws away the result.com.oracle.truffle.api.nodes.LoopNodebooleanbooleanisResultAlwaysOfType(Class<?> clazz) com.oracle.truffle.api.instrumentation.InstrumentableNodematerializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) Methods inherited from class StatementNode
executeConditionAsBooleanMethods inherited from class JavaScriptNode
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, createWrapper, executeBoolean, executeDouble, executeInt, expressionToString, findBlockScopeNode, getSourceSection, hasSourceSection, 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
-
Method Details
-
createWhileDoRepeatingNode
public static com.oracle.truffle.api.nodes.RepeatingNode createWhileDoRepeatingNode(JavaScriptNode condition, JavaScriptNode body) -
createWhileDo
-
createDesugaredFor
-
createDesugaredForOf
-
createDesugaredForIn
-
createDesugaredForAwaitOf
public static JavaScriptNode createDesugaredForAwaitOf(com.oracle.truffle.api.nodes.LoopNode loopNode) -
createDoWhileRepeatingNode
public static com.oracle.truffle.api.nodes.RepeatingNode createDoWhileRepeatingNode(JavaScriptNode condition, JavaScriptNode body) -
createDoWhile
-
createForOfRepeatingNode
public static com.oracle.truffle.api.nodes.RepeatingNode createForOfRepeatingNode(JavaScriptNode nextResultNode, JavaScriptNode body, JSWriteFrameSlotNode writeNextValueNode) -
hasTag
- Specified by:
hasTagin interfacecom.oracle.truffle.api.instrumentation.InstrumentableNode- Overrides:
hasTagin classJavaScriptNode
-
getNodeObject
-
materializeInstrumentableNodes
-
copyUninitialized
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) - Overrides:
copyUninitializedin classJavaScriptNode
-
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
-
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
-
isResultAlwaysOfType
- Overrides:
isResultAlwaysOfTypein classJavaScriptNode
-
getLoopNode
public com.oracle.truffle.api.nodes.LoopNode getLoopNode()
-