Annotation Interface NodeChild


A NodeChild element defines an executable child for the enclosing Node. A Node contains multiple NodeChildren specified in linear execution order.
Since:
0.8 or earlier
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Allow this child node to be used in uncached mode.
    The executeWith() property allows a node to pass the result of one child's executable as an input to another child's executable.
    boolean
    Allows implicit creation of this child node.
    Defines the initializer expression for implicit child node creation.
     
    Defines the expression to get an uncached instance of the child node.
     
  • Element Details

    • value

      String value
      Since:
      0.8 or earlier
      Default:
      ""
    • type

      Class<?> type
      Since:
      0.8 or earlier
      Default:
      com.oracle.truffle.api.nodes.Node.class
    • executeWith

      String[] executeWith
      The executeWith() property allows a node to pass the result of one child's executable as an input to another child's executable. These referenced children must be defined before the current node in the execution order. The current node type() attribute must be set to a Node which supports the evaluated execution with the number of executeWith() arguments that are defined. For example if this child is executed with one argument, the type() attribute must define a node which publicly declares a method with the signature Object execute*(VirtualFrame, Object).
      Since:
      0.8 or earlier
      Default:
      {}
    • implicit

      boolean implicit
      Allows implicit creation of this child node. If this property is false (the default), the factory method of the parent node needs to be called with an instance of the child node as argument. If implicit() is true, the child node will be implicitly created when calling the factory method of the parent node.
      Since:
      21.1
      Default:
      false
    • implicitCreate

      String implicitCreate
      Defines the initializer expression for implicit child node creation. Specifying this property will enable implicit() mode on this child node automatically, this should not be specified together with implicit(). If implicit() is true, the initializer expression defaults to "create()".
      Since:
      21.1
      See Also:
      Default:
      "create()"
    • allowUncached

      boolean allowUncached
      Allow this child node to be used in uncached mode. If set to false (the default), only execute methods that have an explicit argument for the child value can be used on the uncached version of the parent node. If set to true, execute methods that do not have an explicit argument for the child value use an uncached version of the child node to compute the missing value.
      Since:
      21.1
      See Also:
      Default:
      false
    • uncached

      String uncached
      Defines the expression to get an uncached instance of the child node. Specifying this property will implicitly enable allowUncached() on this child node, this should not be specified together with allowUncached(). If allowUncached() is true, the uncached expression defaults to "getUncached()".
      Since:
      21.1
      See Also:
      Default:
      "getUncached()"