public abstract class SLBuiltinNode extends SLExpressionNode
NodeChild
that defines the function arguments.SLContext.installBuiltins(). Every builtin node
subclass is instantiated there, wrapped into a function, and added to the
SLFunctionRegistry. This ensures that builtin functions can be called like user-defined
functions; there is no special function lookup or call node for builtin functions.| Constructor and Description |
|---|
SLBuiltinNode() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Object |
execute(com.oracle.truffle.api.frame.VirtualFrame frame) |
boolean |
executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) |
Object |
executeGeneric(com.oracle.truffle.api.frame.VirtualFrame frame)
The execute method when no specialization is possible.
|
long |
executeLong(com.oracle.truffle.api.frame.VirtualFrame frame) |
void |
executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
When we use an expression at places where a
statement is already
sufficient, the return value is just discarded. |
addExpressionTag, createWrapper, hasTagaddRootTag, 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, reportPolymorphicSpecializepublic final Object executeGeneric(com.oracle.truffle.api.frame.VirtualFrame frame)
SLExpressionNodeexecuteGeneric in class SLExpressionNodepublic final boolean executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
executeBoolean in class SLExpressionNodecom.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic final long executeLong(com.oracle.truffle.api.frame.VirtualFrame frame)
throws com.oracle.truffle.api.nodes.UnexpectedResultException
executeLong in class SLExpressionNodecom.oracle.truffle.api.nodes.UnexpectedResultExceptionpublic final void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
SLExpressionNodestatement is already
sufficient, the return value is just discarded.executeVoid in class SLExpressionNodeprotected abstract Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)