Skip to content
Snippets Groups Projects
Commit 91704c7f authored by Emma Söderberg's avatar Emma Söderberg
Browse files

Merge branch 'fix-inc-param-debug' of bitbucket.org:jastadd/jastadd2 into fix-inc-param-debug

parents 6558af9d 647ba7f5
No related branches found
No related tags found
No related merge requests found
......@@ -85,14 +85,10 @@ aspect IncrementalDebug {
*/
public String ASTDecl.genDumpAttributeDepsString() {
StringBuffer res = new StringBuffer();
TemplateContext tt = templateContext();
// Add dump string for each attribute
for (AttrDecl attr : listOfCachedAttributes()) {
tt.bind("IsParameterized", attr.isParameterized());
tt.bind("IsNTA", attr.isHOA());
tt.bind("AttrSign", attr.signature());
tt.bind("IsToken", attr.isToken());
res.append(tt.expand("ASTDecl.checkAndDumpAttributeDeps"));
TemplateContext tt = attr.templateContext();
res.append(tt.expand("AttrDecl.checkAndDumpAttributeDeps"));
}
return res.toString();
}
......
......@@ -233,45 +233,45 @@ $endif
]]
# Generate code for checking an attribute handler and dumping its dependencies
ASTDecl.checkAndDumpAttributeDeps = [[
AttrDecl.checkAndDumpAttributeDeps = [[
$if (IncrementalLevelParam)
$if (IsParameterized)
for (java.util.Iterator itr = $(AttrSign)_handler.values().iterator(); itr.hasNext();) {
$if (#isParameterized)
for (java.util.Iterator itr = #(signature)_handler.values().iterator(); itr.hasNext();) {
$DDGNodeName handler = ($DDGNodeName)itr.next();
handler.dumpDeps();
}
$else
if ($(AttrSign)_handler != null) {
$(AttrSign)_handler.dumpDeps();
if (#(signature)_handler != null) {
#(signature)_handler.dumpDeps();
}
$endif
$if (IsNTA)
$if (IsParameterized)
if ($(AttrSign)_proxy != null) {
$(AttrSign)_proxy.dumpDependencies();
$if (#isHOA)
$if (#isParameterized)
if (#(signature)_proxy != null) {
#(signature)_proxy.dumpDependencies();
}
$else
$if (!IsToken)
if ($(AttrSign)_computed && ($(AttrSign)_value instanceof $ASTNode)) {
$(AttrSign)_value.dumpDependencies();
$if (!#isToken)
if (#(signature)_computed && (#(signature)_value instanceof $ASTNode)) {
#(signature)_value.dumpDependencies();
}
$endif
$endif
$endif
$endif
$if (IncrementalLevelAttr)
if ($(AttrSign)_handler != null) {
$(AttrSign)_handler.dumpDeps();
if (#(signature)_handler != null) {
#(signature)_handler.dumpDeps();
}
$if (IsNTA)
$if (IsParameterized)
if ($(AttrSign)_proxy != null) {
$(AttrSign)_proxy.dumpDependencies();
$if (#isHOA)
$if (#isParameterized)
if (#(signature)_proxy != null) {
#(signature)_proxy.dumpDependencies();
}
$else
$if (!IsToken)
if ($(AttrSign)_computed && ($(AttrSign)_value instanceof $ASTNode)) {
$(AttrSign)_value.dumpDependencies();
$if (!#isToken)
if (#(signature)_computed && (#(signature)_value instanceof $ASTNode)) {
#(signature)_value.dumpDependencies();
}
$endif
$endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment