Class SLBuiltinNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.sl.builtins.SLBuiltinNode
All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable
Direct Known Subclasses:
SLAddToHostClassPathBuiltin, SLDefineFunctionBuiltin, SLEvalBuiltin, SLExitBuiltin, SLGetSizeBuiltin, SLHasSizeBuiltin, SLHelloEqualsWorldBuiltin, SLImportBuiltin, SLInNativeImageBuiltin, SLIsExecutableBuiltin, SLIsInstanceBuiltin, SLIsNullBuiltin, SLJavaTypeBuiltin, SLNanoTimeBuiltin, SLNewObjectBuiltin, SLPrintlnBuiltin, SLReadlnBuiltin, SLRegisterShutdownHookBuiltin, SLStackTraceBuiltin, SLTypeOfBuiltin, SLWrapPrimitiveBuiltin

public abstract class SLBuiltinNode extends com.oracle.truffle.api.nodes.Node
Base class for all builtin functions. It contains the Truffle DSL annotation NodeChild that defines the function arguments.
The builtin functions are registered in 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.
  • 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.Children
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Object
    execute(com.oracle.truffle.api.frame.VirtualFrame frame, Object... arguments)
     

    Methods inherited from class com.oracle.truffle.api.nodes.Node

    accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SLBuiltinNode

      public SLBuiltinNode()
  • Method Details

    • execute

      public abstract Object execute(com.oracle.truffle.api.frame.VirtualFrame frame, Object... arguments)