Skip to content
Snippets Groups Projects
Commit 2e68cf90 authored by René Schöne's avatar René Schöne
Browse files

Move state initialization for circular attribute equations to begin of method.

parent 2c0eeabf
No related branches found
No related tags found
No related merge requests found
Pipeline #13736 passed
...@@ -36,8 +36,8 @@ AttrDecl.circularEquation:unparameterized [[ ...@@ -36,8 +36,8 @@ AttrDecl.circularEquation:unparameterized [[
#annotations #annotations
$include(AttrDecl.generatedAnnotations) $include(AttrDecl.generatedAnnotations)
public #getType #name() { public #getType #name() {
$include(AttrDecl.cacheCheck)
$StateClass state = state(); $StateClass state = state();
$include(AttrDecl.cacheCheck)
if (!#(signature)_initialized) { if (!#(signature)_initialized) {
$if(#isCollection) $if(#isCollection)
$ASTNode _node = this; $ASTNode _node = this;
...@@ -155,6 +155,7 @@ AttrDecl.circularEquation:parameterized [[ ...@@ -155,6 +155,7 @@ AttrDecl.circularEquation:parameterized [[
$include(AttrDecl.incHookAttrRead) $include(AttrDecl.incHookAttrRead)
$StateClass state = state();
#initLazyMaps #initLazyMaps
$StateClass.CircularValue _value; $StateClass.CircularValue _value;
if (#(signature)_values.containsKey(_parameters)) { if (#(signature)_values.containsKey(_parameters)) {
...@@ -179,7 +180,6 @@ $if(#getNTA) ...@@ -179,7 +180,6 @@ $if(#getNTA)
} }
$endif $endif
} }
$StateClass state = state();
if (!state.inCircle() || state.calledByLazyAttribute()) { if (!state.inCircle() || state.calledByLazyAttribute()) {
$include(AttrDecl.traceCircularEnterCase1) $include(AttrDecl.traceCircularEnterCase1)
state.enterCircle(); state.enterCircle();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment