Generate more specific attribute names in trace events

Create issue
Issue #278 new
Jesper Öqvist created an issue

In JastAdd 2.2.3, attribute names in trace events list the node which the attribute was declared on, not necessarily the node the equation was defined on.

For example:

// grammar:
// A;
// B: A;

aspect Test {
  syn int A.x() = 1;
  eq B.x() = 2;

This results in the following code (with --tracing=compute):

class B extends ASTNode {
  public int x() {
    state().trace().computeBegin(this, "A.x()", "", "");
    int x_value = 2;
    state().trace().computeEnd(this, "A.x()", "", x_value);
    return x_value;

Note that the attribute name in the trace event includes the typename A instead of B.

It would be easier to generate individual cache configurations for each equation of an attribute based on tracing information if the AST node where the equation was defined is used as the typename in the trace event.

Comments (0)

  1. Log in to comment