Class StandardTags.StatementTag

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

public static final class StandardTags.StatementTag extends Tag
Marks program locations that represent a statement of a language.

Use case descriptions:

  • Debugger: Marks program locations where ordinary stepping should halt. The debugger will halt just before a code location is executed that is marked with this tag.

    In most languages, this means statements are distinct from expressions and only one node representing the statement should be tagged. Subexpressions are typically not tagged so that for example a step-over operation will stop at the next independent statement to get the desired behavior.

The StatemenTag uses the identifier "STATEMENT". A node tagged with StandardTags.StatementTag must provide a source section, if its root node provides a source section.

If the a node tagged with statement 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:
0.12