Package com.oracle.truffle.sl.nodes
Class SLExpressionNode
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
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode,com.oracle.truffle.api.nodes.NodeInterface,Cloneable
- Direct Known Subclasses:
SLBigIntegerLiteralNode,SLBinaryNode,SLBuiltinAstNode,SLFunctionBodyNode,SLFunctionLiteralNode,SLInvokeNode,SLLogicalNotNode,SLLongLiteralNode,SLParenExpressionNode,SLReadArgumentNode,SLReadLocalVariableNode,SLReadPropertyNode,SLShortCircuitNode,SLStringLiteralNode,SLToBooleanNode,SLUnboxNode,SLWriteLocalVariableNode,SLWritePropertyNode
Base class for all SL nodes that produce a value and therefore benefit from type specialization.
The annotation
TypeSystemReference specifies the SL types. Specifying it here defines the
type system for all subclasses.-
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 TypeMethodDescriptionfinal voidMarks this node as being aStandardTags.ExpressionTagfor instrumentation purposes.com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNodecreateWrapper(com.oracle.truffle.api.instrumentation.ProbeNode probe) booleanexecuteBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) abstract ObjectexecuteGeneric(com.oracle.truffle.api.frame.VirtualFrame frame) The execute method when no specialization is possible.longexecuteLong(com.oracle.truffle.api.frame.VirtualFrame frame) voidexecuteVoid(com.oracle.truffle.api.frame.VirtualFrame frame) When we use an expression at places where astatementis already sufficient, the return value is just discarded.booleanMethods 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, getNodeObject, materializeInstrumentableNodes
-
Constructor Details
-
SLExpressionNode
public SLExpressionNode()
-
-
Method Details
-
executeGeneric
The execute method when no specialization is possible. This is the most general case, therefore it must be provided by all subclasses. -
executeVoid
public void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame) When we use an expression at places where astatementis already sufficient, the return value is just discarded.- Specified by:
executeVoidin classSLStatementNode
-
createWrapper
public com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode createWrapper(com.oracle.truffle.api.instrumentation.ProbeNode probe) - Specified by:
createWrapperin interfacecom.oracle.truffle.api.instrumentation.InstrumentableNode- Overrides:
createWrapperin classSLStatementNode
-
hasTag
- Specified by:
hasTagin interfacecom.oracle.truffle.api.instrumentation.InstrumentableNode- Overrides:
hasTagin classSLStatementNode
-
addExpressionTag
public final void addExpressionTag()Marks this node as being aStandardTags.ExpressionTagfor instrumentation purposes. -
executeLong
public long executeLong(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException - Throws:
com.oracle.truffle.api.nodes.UnexpectedResultException
-
executeBoolean
public boolean executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException - Throws:
com.oracle.truffle.api.nodes.UnexpectedResultException
-