Class SLBlockNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.sl.nodes.local.SLScopedNode
com.oracle.truffle.sl.nodes.SLStatementNode
com.oracle.truffle.sl.nodes.controlflow.SLBlockNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode,com.oracle.truffle.api.nodes.BlockNode.ElementExecutor<SLStatementNode>,com.oracle.truffle.api.nodes.NodeInterface,Cloneable
public final class SLBlockNode
extends SLStatementNode
implements com.oracle.truffle.api.nodes.BlockNode.ElementExecutor<SLStatementNode>
A statement node that just executes a list of other statements.
-
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteVoid(com.oracle.truffle.api.frame.VirtualFrame frame) Execute all block statements.voidexecuteVoid(com.oracle.truffle.api.frame.VirtualFrame frame, SLStatementNode node, int index, int argument) Truffle nodes don't have a fixed execute signature.All declared local variables accessible in this block.intMethods inherited from class com.oracle.truffle.sl.nodes.SLStatementNode
addRootTag, addStatementTag, createWrapper, formatSourceSection, getSourceCharIndex, getSourceEndIndex, getSourceLength, getSourceSection, hasSource, hasTag, isInstrumentable, setSourceSection, setUnavailableSourceSection, toStringMethods inherited from class com.oracle.truffle.sl.nodes.local.SLScopedNode
findBlock, getVisibleVariablesIndexOnEnter, hasScope, setVisibleVariablesIndexOnEnter, setVisibleVariablesIndexOnExitMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.api.nodes.BlockNode.ElementExecutor
executeBoolean, executeByte, executeChar, executeDouble, executeFloat, executeGeneric, executeInt, executeLong, executeShortMethods inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
createProbe, findNearestNodeAt, findNearestNodeAt, findProbe, getNodeObject, materializeInstrumentableNodes
-
Constructor Details
-
SLBlockNode
-
-
Method Details
-
executeVoid
public void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame) Execute all block statements. The block node makes sure thatfull unrollingof the loop is triggered during compilation. This allows theSLStatementNode.executeVoid(com.oracle.truffle.api.frame.VirtualFrame)method of all children to be inlined.- Specified by:
executeVoidin classSLStatementNode
-
getStatements
-
executeVoid
public void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame, SLStatementNode node, int index, int argument) Truffle nodes don't have a fixed execute signature. TheBlockNode.ElementExecutorinterface tells the framework how block element nodes should be executed. The executor allows to add a custom exception handler for each element, e.g. to handle a specificControlFlowExceptionor to pass a customizable argument, that allows implement startsWith semantics if needed. For SL we don't need to pass any argument as we just have plain block nodes, therefore we passBlockNode.NO_ARGUMENT. In our case the executor does not need to remember any state so we reuse a singleton instance.- Specified by:
executeVoidin interfacecom.oracle.truffle.api.nodes.BlockNode.ElementExecutor<SLStatementNode>
-
getDeclaredLocalVariables
All declared local variables accessible in this block. Variables declared in parent blocks are included. -
getParentBlockIndex
public int getParentBlockIndex()
-