Annotation Interface NodeInfo


@Retention(RUNTIME) @Target(TYPE) @Inherited public @interface NodeInfo
Annotation for providing additional information on nodes.
Since:
0.8 or earlier
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Provides a rough estimate for the cost of the annotated Node.
    A human readable explanation of the purpose of the annotated Node.
    A description, providing a user-readable explanation of the source language of the annotated Node.
    Short name representing the node that can be used for debugging.
  • Element Details

    • shortName

      String shortName
      Short name representing the node that can be used for debugging.
      Returns:
      the short name
      Since:
      0.8 or earlier
      Default:
      ""
    • cost

      NodeCost cost
      Provides a rough estimate for the cost of the annotated Node. This estimate can be used by runtime systems or guest languages to implement heuristics based on Truffle ASTs.
      Since:
      0.8 or earlier
      See Also:
      Default:
      MONOMORPHIC
    • description

      String description
      A human readable explanation of the purpose of the annotated Node. Can be used e.g. for debugging or visualization purposes.
      Returns:
      the description
      Since:
      0.8 or earlier
      Default:
      ""
    • language

      String language
      A description, providing a user-readable explanation of the source language of the annotated Node. Can be used e.g. for debugging or visualization purposes. Typically this information is set only in an abstract base node for the language implementation.
      Returns:
      the description
      Since:
      0.8 or earlier
      Default:
      ""