Skip to content

Avoid deep recursion in PatternExplainer.VisitPathsToNode#80685

Merged
AlekseyTs merged 2 commits intodotnet:mainfrom
AlekseyTs:Issue80569
Oct 14, 2025
Merged

Avoid deep recursion in PatternExplainer.VisitPathsToNode#80685
AlekseyTs merged 2 commits intodotnet:mainfrom
AlekseyTs:Issue80569

Conversation

@AlekseyTs
Copy link
Contributor

Related to #80569

@AlekseyTs AlekseyTs requested a review from a team as a code owner October 13, 2025 21:57
if (!exploreToNode(test.WhenFalse, currentRequiresFalseWhenClause))
return false;
}
continue;
Copy link
Member

@RikkiGibson RikkiGibson Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace to make formatter happy

Suggested change
continue;
continue;

{
if (!exploreToNode(test.WhenTrue, currentRequiresFalseWhenClause))
return false;
stack.Count = stackSize;
Copy link
Member

@RikkiGibson RikkiGibson Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is setting the count in this way doing? I guess it is like reverting the stack contents to how they were before the current call to exploreToNode?

Copy link
Contributor Author

@AlekseyTs AlekseyTs Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is setting the count in this way doing? I guess it is like reverting the stack contents to how they were before entering the do {...}?

The intent is to reset the stack to the state it was in when we entered the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants