Skip to content
Snippets Groups Projects
Commit 3173d80d authored by René Schöne's avatar René Schöne Committed by Emma Söderberg
Browse files

Merged in 329-add-event-for-completion-of-flush (pull request #18)

Add event for completion of flush operation after setChild
parents ecccdc51 072e2be6
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
ASTNode.incHookSetParent = [[ ASTNode.incHookSetParent = [[
$if (IncrementalEnabled) $if (IncrementalEnabled)
$include(ASTNode.traceFlushIncBeginSetParent)
$if (IncrementalLevelParam) $if (IncrementalLevelParam)
if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) { if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) {
getParent_handler.notifyDependencies(); getParent_handler.notifyDependencies();
...@@ -51,6 +52,7 @@ if (state().disableDeps == 0 && !(state().IN_COMPUTATION > 0)) { ...@@ -51,6 +52,7 @@ if (state().disableDeps == 0 && !(state().IN_COMPUTATION > 0)) {
} }
} }
$endif $endif
$include(ASTNode.traceFlushIncEndSetParent)
/* /*
if (node != null) { if (node != null) {
inc_changeState(node.inc_state); inc_changeState(node.inc_state);
...@@ -63,6 +65,7 @@ $endif ...@@ -63,6 +65,7 @@ $endif
ASTNode.incHookSetChild1 = [[ ASTNode.incHookSetChild1 = [[
$if(IncrementalEnabled) $if(IncrementalEnabled)
$include(ASTNode.traceFlushIncBeginSetChild)
$if(IncrementalLevelParam) $if(IncrementalLevelParam)
if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) { if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) {
...@@ -162,13 +165,13 @@ $endif ...@@ -162,13 +165,13 @@ $endif
ASTNode.incHookSetChild5 = [[ ASTNode.incHookSetChild5 = [[
$if(IncrementalEnabled) $if(IncrementalEnabled)
$include(ASTNode.traceFlushIncEndSetChild)
$endif $endif
]] ]]
ASTNode.incHookInsertChild1 = [[ ASTNode.incHookInsertChild1 = [[
$if(IncrementalEnabled) $if(IncrementalEnabled)
$include(ASTNode.traceFlushIncBeginInsertChild)
$if(IncrementalLevelParam) $if(IncrementalLevelParam)
if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) { if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) {
numChildren_handler.notifyDependencies(); numChildren_handler.notifyDependencies();
...@@ -235,6 +238,7 @@ if (getChild_handler != null) { ...@@ -235,6 +238,7 @@ if (getChild_handler != null) {
getChild_handler = h; getChild_handler = h;
} }
$endif $endif
$include(ASTNode.traceFlushIncEndInsertChild)
$endif $endif
]] ]]
...@@ -242,7 +246,7 @@ $endif ...@@ -242,7 +246,7 @@ $endif
ASTNode.incHookRemoveChild1 = [[ ASTNode.incHookRemoveChild1 = [[
$if(IncrementalEnabled) $if(IncrementalEnabled)
$include(ASTNode.traceFlushIncBeginRemoveChild)
$if(IncrementalLevelParam) $if(IncrementalLevelParam)
if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) { if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) {
if (children[i] != null) { if (children[i] != null) {
...@@ -314,12 +318,14 @@ if (getChild_handler != null && this instanceof $List) { ...@@ -314,12 +318,14 @@ if (getChild_handler != null && this instanceof $List) {
getChild_handler[numChildren] = null; getChild_handler[numChildren] = null;
} }
$endif $endif
$include(ASTNode.traceFlushIncEndRemoveChild)
$endif $endif
]] ]]
TokenComponent.incHookSetToken = [[ TokenComponent.incHookSetToken = [[
$if(IncrementalEnabled) $if(IncrementalEnabled)
$include(TokenComponent.traceFlushIncBeginSetToken)
$if(IncrementalLevelParam) $if(IncrementalLevelParam)
if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) { if (state().disableDeps == 0 && !state().IN_ATTR_STORE_EVAL) {
...@@ -390,6 +396,6 @@ if (state().disableDeps == 0 && !(state().IN_COMPUTATION > 0)) { ...@@ -390,6 +396,6 @@ if (state().disableDeps == 0 && !(state().IN_COMPUTATION > 0)) {
$endif $endif
} }
$include(TokenComponent.traceFlushIncEndSetToken)
$endif $endif
]] ]]
...@@ -323,6 +323,66 @@ state().trace().flushAttr("#getAspectName", this, "#hostClassName.#signatureJava ...@@ -323,6 +323,66 @@ state().trace().flushAttr("#getAspectName", this, "#hostClassName.#signatureJava
$endif $endif
]] ]]
ASTNode.traceFlushIncBeginSetChild [[
$if (TraceFlush)
state().trace().flushIncStart(this, "ASTNode.setChild", i, node);
$endif
]]
TokenComponent.traceFlushIncBeginSetToken [[
$if (TraceFlush)
state().trace().flushIncStart(this, "set$(Id)", "", value);
$endif
]]
ASTNode.traceFlushIncBeginInsertChild [[
$if (TraceFlush)
state().trace().flushIncStart(this, "ASTNode.insertChild", i, node);
$endif
]]
ASTNode.traceFlushIncBeginRemoveChild [[
$if (TraceFlush)
state().trace().flushIncStart(this, "ASTNode.removeChild", i, "");
$endif
]]
ASTNode.traceFlushIncBeginSetParent [[
$if (TraceFlush)
state().trace().flushIncStart(this, "ASTNode.setParent", "", node);
$endif
]]
ASTNode.traceFlushIncEndSetChild [[
$if (TraceFlush)
state().trace().flushIncEnd(this, "ASTNode.setChild", i, node);
$endif
]]
TokenComponent.traceFlushIncEndSetToken [[
$if (TraceFlush)
state().trace().flushIncEnd(this, "set$(Id)", "", value);
$endif
]]
ASTNode.traceFlushIncEndInsertChild [[
$if (TraceFlush)
state().trace().flushIncEnd(this, "ASTNode.insertChild", i, node);
$endif
]]
ASTNode.traceFlushIncEndRemoveChild [[
$if (TraceFlush)
state().trace().flushIncEnd(this, "ASTNode.removeChild", i, "");
$endif
]]
ASTNode.traceFlushIncEndSetParent [[
$if (TraceFlush)
state().trace().flushIncEnd(this, "ASTNode.setParent", "", node);
$endif
]]
AttrDecl.traceFlushIncAttr [[ AttrDecl.traceFlushIncAttr [[
$if (TraceFlush) $if (TraceFlush)
state.trace().flushIncAttr("#getAspectName", fNode, fAttrID, "", ""); state.trace().flushIncAttr("#getAspectName", fNode, fAttrID, "", "");
......
...@@ -79,7 +79,9 @@ public static class Trace { ...@@ -79,7 +79,9 @@ public static class Trace {
FLUSH_ATTR, FLUSH_ATTR,
FLUSH_REWRITE, FLUSH_REWRITE,
FLUSH_REWRITE_INIT, FLUSH_REWRITE_INIT,
INC_FLUSH_START,
INC_FLUSH_ATTR, INC_FLUSH_ATTR,
INC_FLUSH_END,
// Flag: --tracing=coll // Flag: --tracing=coll
CONTRIBUTION_CHECK_BEGIN, CONTRIBUTION_CHECK_BEGIN,
...@@ -348,6 +350,20 @@ public static class Trace { ...@@ -348,6 +350,20 @@ public static class Trace {
receiver.accept($StateClass.Trace.Event.INC_FLUSH_ATTR, aspect, node, attr, params, value); receiver.accept($StateClass.Trace.Event.INC_FLUSH_ATTR, aspect, node, attr, params, value);
} }
/**
* Trace that flushing done by incremental evaluation begun.
*/
public void flushIncStart($ASTNode node, String attr, Object params, Object value) {
receiver.accept($StateClass.Trace.Event.INC_FLUSH_START, ASPECT_AST, node, attr, params, value);
}
/**
* Trace that flushing done by incremental evaluation ended.
*/
public void flushIncEnd($ASTNode node, String attr, Object params, Object value) {
receiver.accept($StateClass.Trace.Event.INC_FLUSH_END, ASPECT_AST, node, attr, params, value);
}
/** /**
* Trace that a contribution check to a collection attribute begun. * Trace that a contribution check to a collection attribute begun.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment