Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Jastadd2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
Jastadd2
Commits
647ba7f5
Commit
647ba7f5
authored
4 years ago
by
Jesper
Browse files
Options
Downloads
Patches
Plain Diff
Simplify checkAndDumpAttributeDeps
parent
5c148260
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/jastadd/incremental/IncrementalDebug.jadd
+2
-6
2 additions, 6 deletions
src/jastadd/incremental/IncrementalDebug.jadd
src/template/incremental/Debug.tt
+21
-21
21 additions, 21 deletions
src/template/incremental/Debug.tt
with
23 additions
and
27 deletions
src/jastadd/incremental/IncrementalDebug.jadd
+
2
−
6
View file @
647ba7f5
...
@@ -85,14 +85,10 @@ aspect IncrementalDebug {
...
@@ -85,14 +85,10 @@ aspect IncrementalDebug {
*/
*/
public String ASTDecl.genDumpAttributeDepsString() {
public String ASTDecl.genDumpAttributeDepsString() {
StringBuffer res = new StringBuffer();
StringBuffer res = new StringBuffer();
TemplateContext tt = templateContext();
// Add dump string for each attribute
// Add dump string for each attribute
for (AttrDecl attr : listOfCachedAttributes()) {
for (AttrDecl attr : listOfCachedAttributes()) {
tt.bind("IsParameterized", attr.isParameterized());
TemplateContext tt = attr.templateContext();
tt.bind("IsNTA", attr.isHOA());
res.append(tt.expand("AttrDecl.checkAndDumpAttributeDeps"));
tt.bind("AttrSign", attr.signature());
tt.bind("IsToken", attr.isToken());
res.append(tt.expand("ASTDecl.checkAndDumpAttributeDeps"));
}
}
return res.toString();
return res.toString();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/template/incremental/Debug.tt
+
21
−
21
View file @
647ba7f5
...
@@ -229,45 +229,45 @@ $endif
...
@@ -229,45 +229,45 @@ $endif
]]
]]
# Generate code for checking an attribute handler and dumping its dependencies
# Generate code for checking an attribute handler and dumping its dependencies
A
ST
Decl.checkAndDumpAttributeDeps = [[
A
ttr
Decl.checkAndDumpAttributeDeps = [[
$if (IncrementalLevelParam)
$if (IncrementalLevelParam)
$if (
I
sParameterized)
$if (
#i
sParameterized)
for (java.util.Iterator itr =
$(AttrSign
)_handler.values().iterator(); itr.hasNext();) {
for (java.util.Iterator itr =
#(signature
)_handler.values().iterator(); itr.hasNext();) {
$DDGNodeName handler = ($DDGNodeName)itr.next();
$DDGNodeName handler = ($DDGNodeName)itr.next();
handler.dumpDeps();
handler.dumpDeps();
}
}
$else
$else
if (
$(AttrSign
)_handler != null) {
if (
#(signature
)_handler != null) {
$(AttrSign
)_handler.dumpDeps();
#(signature
)_handler.dumpDeps();
}
}
$endif
$endif
$if (
IsNT
A)
$if (
#isHO
A)
$if (
I
sParameterized)
$if (
#i
sParameterized)
if (
$(AttrSign
)_proxy != null) {
if (
#(signature
)_proxy != null) {
$(AttrSign
)_proxy.dumpDependencies();
#(signature
)_proxy.dumpDependencies();
}
}
$else
$else
$if (!
I
sToken)
$if (!
#i
sToken)
if (
$(AttrSign
)_computed && (
$(AttrSign
)_value instanceof $ASTNode)) {
if (
#(signature
)_computed && (
#(signature
)_value instanceof $ASTNode)) {
$(AttrSign
)_value.dumpDependencies();
#(signature
)_value.dumpDependencies();
}
}
$endif
$endif
$endif
$endif
$endif
$endif
$endif
$endif
$if (IncrementalLevelAttr)
$if (IncrementalLevelAttr)
if (
$(AttrSign
)_handler != null) {
if (
#(signature
)_handler != null) {
$(AttrSign
)_handler.dumpDeps();
#(signature
)_handler.dumpDeps();
}
}
$if (
IsNT
A)
$if (
#isHO
A)
$if (
I
sParameterized)
$if (
#i
sParameterized)
if (
$(AttrSign
)_proxy != null) {
if (
#(signature
)_proxy != null) {
$(AttrSign
)_proxy.dumpDependencies();
#(signature
)_proxy.dumpDependencies();
}
}
$else
$else
$if (!
I
sToken)
$if (!
#i
sToken)
if (
$(AttrSign
)_computed && (
$(AttrSign
)_value instanceof $ASTNode)) {
if (
#(signature
)_computed && (
#(signature
)_value instanceof $ASTNode)) {
$(AttrSign
)_value.dumpDependencies();
#(signature
)_value.dumpDependencies();
}
}
$endif
$endif
$endif
$endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment