Class BlockScopeNode
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.function.NamedEvaluationTargetNode
com.oracle.truffle.js.nodes.function.BlockScopeNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode,com.oracle.truffle.api.nodes.NodeInterface,com.oracle.truffle.api.nodes.RepeatingNode,Cloneable
- Direct Known Subclasses:
BlockScopeNode.FrameBlockScopeNode,BlockScopeNode.VirtualBlockScopeNode
public abstract class BlockScopeNode
extends NamedEvaluationTargetNode
implements com.oracle.truffle.api.nodes.RepeatingNode
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classRepresents a local block scope that has been merged into the function's virtual frame.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
FieldsFields inherited from class com.oracle.truffle.js.nodes.JavaScriptNode
INTERMEDIATE_VALUEFields inherited from interface com.oracle.truffle.api.nodes.RepeatingNode
BREAK_LOOP_STATUS, CONTINUE_LOOP_STATUS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract com.oracle.truffle.api.frame.VirtualFrameappendScopeFrame(com.oracle.truffle.api.frame.VirtualFrame frame) static BlockScopeNodecreate(JavaScriptNode block, JSFrameSlot blockScopeSlot, com.oracle.truffle.api.frame.FrameDescriptor frameDescriptor, JSFrameSlot parentSlot, boolean functionBlock, boolean captureFunctionFrame, boolean generatorFunctionBlock, boolean hasParentBlock, int start, int end) static BlockScopeNodecreateVirtual(JavaScriptNode block, int frameStart, int frameEnd) execute(com.oracle.truffle.api.frame.VirtualFrame frame) Executes this node using the specified context and frame and returns the result value.booleanexecuteRepeating(com.oracle.truffle.api.frame.VirtualFrame frame) voidexecuteVoid(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it throws away the result.executeWithName(com.oracle.truffle.api.frame.VirtualFrame frame, Object name) final voidexitScope(com.oracle.truffle.api.frame.VirtualFrame frame) abstract voidexitScope(com.oracle.truffle.api.frame.VirtualFrame frame, boolean yield) getBlock()abstract ObjectgetBlockScope(com.oracle.truffle.api.frame.VirtualFrame frame) intintabstract booleanbooleanisResultAlwaysOfType(Class<?> clazz) abstract voidsetBlockScope(com.oracle.truffle.api.frame.VirtualFrame frame, Object state) Methods inherited from class com.oracle.truffle.js.nodes.function.NamedEvaluationTargetNode
createWrapperMethods inherited from class com.oracle.truffle.js.nodes.JavaScriptNode
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, copyUninitialized, executeBoolean, executeDouble, executeInt, expressionToString, findBlockScopeNode, getSourceSection, hasSourceSection, hasTag, isInstrumentable, onReplace, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTagsMethods inherited from class com.oracle.truffle.js.nodes.JavaScriptBaseNode
getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperatorsMethods 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, reportPolymorphicSpecializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
findNearestNodeAt, findNearestNodeAt, getNodeObject, materializeInstrumentableNodesMethods inherited from interface com.oracle.truffle.api.nodes.RepeatingNode
executeRepeatingWithValue, initialLoopStatus, shouldContinue
-
Field Details
-
block
-
-
Constructor Details
-
BlockScopeNode
-
-
Method Details
-
create
public static BlockScopeNode create(JavaScriptNode block, JSFrameSlot blockScopeSlot, com.oracle.truffle.api.frame.FrameDescriptor frameDescriptor, JSFrameSlot parentSlot, boolean functionBlock, boolean captureFunctionFrame, boolean generatorFunctionBlock, boolean hasParentBlock, int start, int end) -
createVirtual
-
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
-
appendScopeFrame
public abstract com.oracle.truffle.api.frame.VirtualFrame appendScopeFrame(com.oracle.truffle.api.frame.VirtualFrame frame) -
exitScope
public final void exitScope(com.oracle.truffle.api.frame.VirtualFrame frame) -
exitScope
public abstract void exitScope(com.oracle.truffle.api.frame.VirtualFrame frame, boolean yield) -
getBlockScope
-
setBlockScope
-
executeRepeating
public boolean executeRepeating(com.oracle.truffle.api.frame.VirtualFrame frame) - Specified by:
executeRepeatingin interfacecom.oracle.truffle.api.nodes.RepeatingNode
-
executeWithName
- Specified by:
executeWithNamein classNamedEvaluationTargetNode
-
getBlock
-
isFunctionBlock
public abstract boolean isFunctionBlock() -
isResultAlwaysOfType
- Overrides:
isResultAlwaysOfTypein classJavaScriptNode
-
getFrameStart
public int getFrameStart() -
getFrameEnd
public int getFrameEnd()
-