@@ -724,14 +724,12 @@ func (c *OpContext) evalStateCI(v Expr, state combinedFlags) (result Value, ci C
724
724
// TODO: is this indirect necessary?
725
725
// arc = arc.Indirect()
726
726
727
- n := arc .state
728
727
if c .isDevVersion () {
729
- n = arc .getState (c )
730
- if n != nil {
728
+ if n := arc .getState (c ); n != nil {
731
729
c .ci , _ = n .detectCycleV3 (arc , nil , x , c .ci )
732
730
}
733
731
} else {
734
- if n != nil {
732
+ if n := arc . state ; n != nil {
735
733
c .ci , _ = n .markCycle (arc , nil , x , c .ci )
736
734
}
737
735
}
@@ -742,7 +740,7 @@ func (c *OpContext) evalStateCI(v Expr, state combinedFlags) (result Value, ci C
742
740
743
741
if c .isDevVersion () {
744
742
if s := arc .getState (c ); s != nil {
745
- defer n .retainProcess ().releaseProcess ()
743
+ defer s .retainProcess ().releaseProcess ()
746
744
747
745
origNeeds := state .conditions ()
748
746
needs := origNeeds | arcTypeKnown
@@ -751,7 +749,7 @@ func (c *OpContext) evalStateCI(v Expr, state combinedFlags) (result Value, ci C
751
749
switch runMode {
752
750
case finalize :
753
751
arc .unify (c , needs , attemptOnly , true ) // to set scalar
754
- arc . state .freeze (needs )
752
+ s .freeze (needs )
755
753
case attemptOnly :
756
754
arc .unify (c , needs , attemptOnly , true ) // to set scalar
757
755
0 commit comments