Skip to content
Snippets Groups Projects
Commit 9a65594c authored by Jesper's avatar Jesper
Browse files

Fix test regression from commit 6558af9d

parent 873b08f8
No related branches found
No related tags found
No related merge requests found
...@@ -117,8 +117,9 @@ aspect IncrementalDebug { ...@@ -117,8 +117,9 @@ aspect IncrementalDebug {
StringBuffer res = new StringBuffer(); StringBuffer res = new StringBuffer();
TemplateContext tt = templateContext(); TemplateContext tt = templateContext();
for (AttrDecl attr : listOfCachedAttributes()) { for (AttrDecl attr : listOfCachedAttributes()) {
// TODO(joqvist): use AttrDecl as template context instead.
tt.bind("IsParameterized", attr.getNumParameter() > 0); tt.bind("IsParameterized", attr.getNumParameter() > 0);
tt.bind("IsCircular", attr.isCircular()); tt.bind("SimpleCacheCheck", attr.simpleCacheCheck());
tt.bind("PrintAsObject", attr.isPrimitive() || attr.getType().equals("String")); tt.bind("PrintAsObject", attr.isPrimitive() || attr.getType().equals("String"));
tt.bind("AttrSign", attr.signature()); tt.bind("AttrSign", attr.signature());
res.append(tt.expand("ASTDecl.dumpCachedAttributeValue")); res.append(tt.expand("ASTDecl.dumpCachedAttributeValue"));
......
...@@ -139,18 +139,18 @@ if ($(AttrSign)_values != null) { ...@@ -139,18 +139,18 @@ if ($(AttrSign)_values != null) {
} }
} }
$else $else
$if (IsCircular) $if (SimpleCacheCheck)
if ($(AttrSign)_computed == $StateClass.NON_CYCLE || $(AttrSign)_computed == state().cycle()) {
$else
if ($(AttrSign)_computed) { if ($(AttrSign)_computed) {
$endif $else
$if (PrintAsObject) if ($(AttrSign)_computed == $StateClass.NON_CYCLE || $(AttrSign)_computed == state().cycle()) {
$endif
$if (PrintAsObject)
System.out.println("value(" + relativeNodeID() + ":$(AttrSign), " + $(AttrSign)_value + ")"); System.out.println("value(" + relativeNodeID() + ":$(AttrSign), " + $(AttrSign)_value + ")");
$else $else
Object obj = $(AttrSign)_value; Object obj = $(AttrSign)_value;
System.out.println("value(" + relativeNodeID() + ":$(AttrSign), " + System.out.println("value(" + relativeNodeID() + ":$(AttrSign), " +
(obj instanceof $ASTNode ? (($ASTNode) obj).relativeNodeID() : obj) + ")"); (obj instanceof $ASTNode ? (($ASTNode) obj).relativeNodeID() : obj) + ")");
$endif $endif
} }
$endif $endif
]] ]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment