public abstract class SLReadLocalVariableNode extends SLExpressionNode
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 SLReadLocalVariableNode.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.
| Constructor and Description |
|---|
SLReadLocalVariableNode() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getNodeObject() |
protected abstract int |
getSlot()
Returns the descriptor of the accessed local variable.
|
boolean |
hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag) |
protected boolean |
readBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) |
protected long |
readLong(com.oracle.truffle.api.frame.VirtualFrame frame) |
protected Object |
readObject(com.oracle.truffle.api.frame.VirtualFrame frame) |
addExpressionTag, createWrapper, executeBoolean, executeGeneric, executeLong, executeVoidaddRootTag, addStatementTag, formatSourceSection, getSourceCharIndex, getSourceEndIndex, getSourceLength, getSourceSection, hasSource, 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, reportPolymorphicSpecializeprotected abstract int getSlot()
NodeField annotation on the class.protected long readLong(com.oracle.truffle.api.frame.VirtualFrame frame)
protected boolean readBoolean(com.oracle.truffle.api.frame.VirtualFrame frame)
protected Object readObject(com.oracle.truffle.api.frame.VirtualFrame frame)
public boolean hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag)
hasTag in interface com.oracle.truffle.api.instrumentation.InstrumentableNodehasTag in class SLExpressionNodepublic Object getNodeObject()