Skip to content

Commit 50deedb

Browse files
Copilotdadhi
andauthored
refactor: simplify flat equality loop control
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/340a2774-3537-47bb-b6cb-038b55aec114 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
1 parent f933b56 commit 50deedb

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/FastExpressionCompiler.LightExpression/FlatExpression.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,14 +1783,16 @@ public bool Eq(ref ExprTree xTree, ref ExprTree yTree)
17831783
continue;
17841784
}
17851785

1786+
var advanced = false;
17861787
while (true)
17871788
{
17881789
if (remainingSiblings != 0)
17891790
{
17901791
xIdx = x.NextIdx;
17911792
yIdx = y.NextIdx;
17921793
remainingSiblings--;
1793-
goto ContinueTraversal;
1794+
advanced = true;
1795+
break;
17941796
}
17951797

17961798
if (_eqFrames.Count == 0)
@@ -1804,11 +1806,12 @@ public bool Eq(ref ExprTree xTree, ref ExprTree yTree)
18041806
xIdx = frame.XNextIdx;
18051807
yIdx = frame.YNextIdx;
18061808
remainingSiblings = frame.RemainingSiblingsAfterNode - 1;
1807-
goto ContinueTraversal;
1809+
advanced = true;
1810+
break;
18081811
}
18091812
}
1810-
1811-
ContinueTraversal:;
1813+
if (advanced)
1814+
continue;
18121815
}
18131816
}
18141817

0 commit comments

Comments
 (0)