Class SLReadLocalVariableNode
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.SLExpressionNode
com.oracle.truffle.sl.nodes.local.SLReadLocalVariableNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode,com.oracle.truffle.api.nodes.NodeInterface,Cloneable
Node to read a local variable from a function's
frame. The Truffle frame API
allows to store primitive values of all Java primitive types, and Object values. This means that
all SL types that are objects are handled by the readObject(com.oracle.truffle.api.frame.VirtualFrame) method.
We use the primitive type only when the same primitive type is uses for all writes. If the local
variable is type-polymorphic, then the value is always stored as an Object, i.e., primitive
values are boxed. Even a mixture of long and boolean writes leads to both being
stored boxed.
-
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 TypeMethodDescriptionprotected abstract intgetSlot()Returns the descriptor of the accessed local variable.booleanprotected booleanreadBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) protected longreadLong(com.oracle.truffle.api.frame.VirtualFrame frame) protected ObjectreadObject(com.oracle.truffle.api.frame.VirtualFrame frame) Methods inherited from class com.oracle.truffle.sl.nodes.SLExpressionNode
addExpressionTag, createWrapper, executeBoolean, executeGeneric, executeLong, executeVoidMethods inherited from class com.oracle.truffle.sl.nodes.SLStatementNode
addRootTag, addStatementTag, formatSourceSection, getSourceCharIndex, getSourceEndIndex, getSourceLength, getSourceSection, hasSource, 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.instrumentation.InstrumentableNode
createProbe, findNearestNodeAt, findNearestNodeAt, findProbe, materializeInstrumentableNodes
-
Constructor Details
-
SLReadLocalVariableNode
public SLReadLocalVariableNode()
-
-
Method Details
-
getSlot
protected abstract int getSlot()Returns the descriptor of the accessed local variable. The implementation of this method is created by the Truffle DSL based on theNodeFieldannotation on the class. -
readLong
protected long readLong(com.oracle.truffle.api.frame.VirtualFrame frame) -
readBoolean
protected boolean readBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) -
readObject
-
hasTag
- Specified by:
hasTagin interfacecom.oracle.truffle.api.instrumentation.InstrumentableNode- Overrides:
hasTagin classSLExpressionNode
-
getNodeObject
-