public final class SLBlockNode extends SLStatementNode implements com.oracle.truffle.api.nodes.BlockNode.ElementExecutor<SLStatementNode>
| Constructor and Description |
|---|
SLBlockNode(SLStatementNode[] bodyNodes) |
| Modifier and Type | Method and Description |
|---|---|
void |
executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
Execute all block statements.
|
void |
executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame,
SLStatementNode node,
int index,
int argument)
Truffle nodes don't have a fixed execute signature.
|
SLWriteLocalVariableNode[] |
getDeclaredLocalVariables()
All declared local variables accessible in this block.
|
int |
getParentBlockIndex() |
List<SLStatementNode> |
getStatements() |
addRootTag, addStatementTag, createWrapper, formatSourceSection, getSourceCharIndex, getSourceEndIndex, getSourceLength, getSourceSection, hasSource, hasTag, isInstrumentable, setSourceSection, setUnavailableSourceSection, toStringfindBlock, getVisibleVariablesIndexOnEnter, hasScope, setVisibleVariablesIndexOnEnter, setVisibleVariablesIndexOnExitaccept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecializeclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic SLBlockNode(SLStatementNode[] bodyNodes)
public void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
full
unrolling of the loop is triggered during compilation. This allows the
SLStatementNode.executeVoid(com.oracle.truffle.api.frame.VirtualFrame) method of all children to be inlined.executeVoid in class SLStatementNodepublic List<SLStatementNode> getStatements()
public void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame,
SLStatementNode node,
int index,
int argument)
BlockNode.ElementExecutor interface
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 specific
ControlFlowException or 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 pass BlockNode.NO_ARGUMENT. In our case the executor
does not need to remember any state so we reuse a singleton instance.executeVoid in interface com.oracle.truffle.api.nodes.BlockNode.ElementExecutor<SLStatementNode>public SLWriteLocalVariableNode[] getDeclaredLocalVariables()
public int getParentBlockIndex()