Skip to content
Snippets Groups Projects
Commit 647ba7f5 authored by Jesper's avatar Jesper
Browse files

Simplify checkAndDumpAttributeDeps

parent 5c148260
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();
}
......
......@@ -229,45 +229,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