diff --git a/src/jastadd/incremental/IncrementalEval.jadd b/src/jastadd/incremental/IncrementalEval.jadd index be4e8845476621c4e9d3b858281ca1a774d0aee8..6b38fe0544ba7d1b8514fe5ed1997c17785328da 100644 --- a/src/jastadd/incremental/IncrementalEval.jadd +++ b/src/jastadd/incremental/IncrementalEval.jadd @@ -38,8 +38,6 @@ aspect IncrementalEval { tt.expand("ASTDecl.relativeNodeIDMethodWithRewrite", out); - tt.expand("List.internalNTAList", out); - tt.bind("NtaIndexCheck", emitNtaIndexCheckString()); tt.expand("ASTDecl.childIsNtaMethod", out); diff --git a/src/template/ast/Attributes.tt b/src/template/ast/Attributes.tt index 407e5b18e1fad12071ab7e9c617b1100cbb1efbc..ec0f76f5e0b555b8a4ce8569b5a4ae0ca31ac257 100644 --- a/src/template/ast/Attributes.tt +++ b/src/template/ast/Attributes.tt @@ -231,7 +231,6 @@ SynDecl.higherOrderAttributeCode:norewrite [[ $if(#isParameterized) if (#(signature)_proxy == null) { #(signature)_proxy = new $ASTNode(); - $include(AttrDecl.incHookCreateNtaList) #(signature)_proxy.setParent(this); } if (#(signature)_value != null) { @@ -246,7 +245,6 @@ SynDecl.higherOrderAttributeCode:rewritesEnabled [[ $if(#isParameterized) if (#(signature)_proxy == null) { #(signature)_proxy = new $ASTNode(); - $include(AttrDecl.incHookCreateNtaList) $if(LegacyRewrite) #(signature)_proxy.is$$Final = true; $endif diff --git a/src/template/incremental/NTAs.tt b/src/template/incremental/NTAs.tt index 9fac34d9d528a606e37bfd8a4d8cac43b0656a72..6580f15c15551e43fd1a87947e5c67f4a2b599ef 100644 --- a/src/template/incremental/NTAs.tt +++ b/src/template/incremental/NTAs.tt @@ -38,40 +38,3 @@ $if(IncrementalEnabled) } $endif ]] - -List.internalNTAList = [[ -$if(IncrementalEnabled) -$if(#isListDecl) - /** @apilevel internal */ - public boolean $List.inc_internalNTAList = false; - - /** @apilevel internal */ - public java.util.Map $List.inc_internalNTAList_map; - - /** @apilevel internal */ - public void $List.inc_internalNTAList(java.util.Map m) { - inc_internalNTAList = true; - inc_internalNTAList_map = m; - } - -$endif -$endif -]] - -AttrDecl.incHookCreateNtaList = [[ -$if(IncrementalEnabled) - -$if(IncrementalLevelNode) -$if(#getNTA) -#(signature)_proxy.inc_internalNTAList(#(signature)_values); -$endif -$endif - -$if(IncrementalLevelRegion) -$if(#getNTA) -#(signature)_proxy.inc_internalNTAList(#(signature)_values); -$endif -$endif - -$endif -]] diff --git a/src/template/incremental/Notification.tt b/src/template/incremental/Notification.tt index 828748f8ed0de5a6ab2a92d700b5c9b681f37e0a..44fa00a1307604e680e0801d9bb221a7211de44a 100644 --- a/src/template/incremental/Notification.tt +++ b/src/template/incremental/Notification.tt @@ -439,51 +439,8 @@ $if(IncrementalLevelRegion) /** @apilevel internal */ public boolean #name.inc_flush_NTA($ASTNode node) { $if(#isListDecl) - if (inc_internalNTAList) { - state().enterConstruction(); - int childIndex = getIndexOfChild(node); - removeChild(childIndex); - node.inc_flush_subtree(node.handler()); - state().exitConstruction(); - if (inc_internalNTAList_map.containsValue(node)) { - for (java.util.Iterator itr = inc_internalNTAList_map.keySet().iterator(); itr.hasNext();) { - Object key = itr.next(); - if (inc_internalNTAList_map.get(key) == node) { - inc_internalNTAList_map.remove(key); - break; - } - } - } - return true; - } - if (parent != null) { - int index = parent.getIndexOfChild(this); - if (index >= 0 && parent.childIsNTA(index)) { - state().enterConstruction(); - int childIndex = getIndexOfChild(node); - removeChild(childIndex); - node.inc_flush_subtree(node.handler()); - state().exitConstruction(); - return true; - } - return false; - } $else - $if(#isListDecl) - if (parent != null) { - int index = parent.getIndexOfChild(this); - if (index >= 0 && parent.childIsNTA(index)) { - state().enterConstruction(); - node.setParent(null); - node.inc_flush_subtree(node.handler()); - state().exitConstruction(); - return true; - } - return false; - } - $else $FlushNTAs - $endif $endif return false; } @@ -619,6 +576,11 @@ $if(IncrementalChangeFlush) $if(IsNTA) $if(IsParameterized) if ($(AttrSign)_proxy != null) { + for (Object v : $(AttrSign)_values.values()) { + ((ASTNode)v).inc_flush_subtree(handler()); + } + $(AttrSign)_values.clear(); +/* for (int index = 0; index < $(AttrSign)_proxy.numChildren; index++) { $ASTNode value = $(AttrSign)_proxy.children[index]; if (!value.isRegionRoot()) { @@ -639,6 +601,7 @@ if ($(AttrSign)_proxy != null) { } } } +*/ } $else $if(IsNtaWithTree)