Class TagTreeNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.bytecode.TagTreeNode
All Implemented Interfaces:
TagTree, NodeInterface, Cloneable

public abstract class TagTreeNode extends Node implements TagTree
Class that implements tag tree NodeLibrary dispatch for tag tree items. This class is only intended to be used when implementing a custom tag tree node library.

All implementations of this class are intended to be generated and are not supposed to be implemented manually.

Since:
24.2
  • Constructor Details

    • TagTreeNode

      protected TagTreeNode(Object token)
      Internal constructor for generated code. Do not use.
      Since:
      24.2
  • Method Details

    • getLanguage

      protected abstract Class<? extends TruffleLanguage<?>> getLanguage()
      Allows to access the language instance associated with this node.
      Since:
      24.2
    • dispatch

      protected Class<?> dispatch()
      Returns the currently used NodeLibrary exports for this tag library.
      Since:
      24.2
    • getBytecodeNode

      public BytecodeNode getBytecodeNode()
      Returns the bytecode node associated with this node.
      Since:
      24.2
    • createDefaultScope

      public final Object createDefaultScope(Frame frame, boolean nodeEnter)
      Creates a default scope implementation based of this tag tree node. The scope returned represents the default scope implementation in use without any configuration in GenerateBytecode. The scope respects your interpreter's choice of block/root scoping. Use this method if the default scope implementation is usable for your language but other methods in NodeLibrary need to be implemented differently.

      The scope used for a tag tree node can be customized by setting GenerateBytecode.tagTreeNodeLibrary() and overriding NodeLibrary.getScope(Object, Frame, boolean).

      Since:
      24.2
    • toString

      public final String toString()
      Converts this node to a textual representation useful for debugging.
      Overrides:
      toString in class Node
      Since:
      24.2