Unify ConstraintGraph change tracking with SavedTypeVariableBindings #76759
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'd like to get rid of all the state that's inside SolverScope today, and instead record a trail of changes to individual data structures. This is a preliminary PR which moves the ConstraintGraph change tracking into a new
CSTrail.cpp
, which defines aSolverTrail
. I also refactored the existing logic for saving and restoring the fixed types of type variables to useSolverTrail
.For now, there's a hack in there to preserve the previous behavior where type variable bindings are restored before all constraint graph changes. Once I untangle some other issues I will streamline this. Next steps after that are converting all other state tracking to use the new mechanism, which will hopefully reduce memory usage and improve performance.