Class StandardTags.RootBodyTag

java.lang.Object
com.oracle.truffle.api.instrumentation.Tag
com.oracle.truffle.api.instrumentation.StandardTags.RootBodyTag
Enclosing class:
StandardTags

public static final class StandardTags.RootBodyTag extends Tag
Marks program locations as bodies of a function, method or closure. The root prolog and epilog is not a part of this node, what makes a difference from StandardTags.RootTag. In particular, when the implementation copies Frame.getArguments() into frame slots, it should do it before this node for the instrumentation to work correctly.

Use case descriptions:

  • Profiler: Marks body of every root that should be profiled and where local variables are initialized and ready to be retrieved.
The RootBodyTag uses the identifier "ROOT_BODY". A node tagged with StandardTags.RootBodyTag must provide a source section , if its root node provides a source section.

If the a node tagged with root body returns a non null value then it must be an interop value. There are assertions in place verifying this when Java assertions are enabled (-ea).

Since:
19.2.0