Hamish Knight
c69590fbdd
[CS] Clean up pack expansion environment handling a little
...
- Track environments for `PackExpansionExpr` directly
instead of using a locator.
- Split up the querying and creation of the environment
such that the mismatch logic can be done directly in
CSSimplify instead of duplicating it.
- Just store the environment directly instead of
the shape and UUID.
2025-02-20 21:31:46 +00:00
Hamish Knight
29e9f429e3
[CS] NFC: Rename PackEnvironments -> PackElementExpansions
...
IMO "environment" is confusable for GenericEnvironment,
make it clearer it's referring to the parent
PackExpansionExpr.
2025-02-20 21:31:46 +00:00
Slava Pestov
cda3cda132
Sema: Rework change recording in PotentialBindings::retract()
...
Instead of making an undo() do an infer(), let's record fine-grained
changes about what was retracted, and directly re-insert the same
elements into the data structures.
2025-02-04 20:26:12 -05:00
Pavel Yaskevich
f94685e704
[CSTrail] NFC: Add dump() methods to SolverTrail
2024-12-04 10:36:12 -08:00
Slava Pestov
58a6a64647
Sema: SolverTrail::Change::RetiredConstraint now remembers the position
2024-10-21 17:19:01 -04:00
Slava Pestov
bdab82a192
Sema: Use xmacros to clean up more duplication in CSTrail.{cpp,h}
2024-10-08 16:50:49 -04:00
Slava Pestov
90175400d2
Sema: Record generated constraints in the trail
2024-10-08 16:17:28 -04:00
Slava Pestov
1e2d4fbc59
Sema: Record score increases in the trail
2024-10-08 16:16:31 -04:00
Slava Pestov
f2412f318e
Sema: Record key path expressions in the trail
2024-10-07 16:50:48 -04:00
Slava Pestov
881a0100b2
Sema: Record implicit value conversions in the trail
2024-10-07 16:50:48 -04:00
Slava Pestov
ac17292dfe
Sema: Record preconcurrency closures in the trail
2024-10-07 16:50:48 -04:00
Slava Pestov
b961a7ec51
Sema: Record isolated parameters in the trail
2024-10-07 16:50:48 -04:00
Slava Pestov
500acd122a
Sema: Record potential throw sites in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
39d0eab275
Sema: Record case label items in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
8c8a385a4a
Sema: Record SyntacticElementTargetKeys in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
516277f0fd
Sema: Record contextual types in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
666361adf2
Sema: Record implied results in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
1d18cd07cf
Sema: Record closure types in the trail
2024-10-07 16:50:47 -04:00
Slava Pestov
892e79cd70
Sema: Use an xmacro to clean up some duplication in CSTrail.cpp
2024-10-07 16:50:46 -04:00
Slava Pestov
6862955244
Sema: Record applied property wrappers in the trail
2024-10-07 16:50:46 -04:00
Slava Pestov
c7edc3494e
Sema: Record result builder transforms in the trail
2024-10-07 16:50:45 -04:00
Slava Pestov
9115a46736
Sema: Record favored constraints in the trail
2024-10-07 16:50:45 -04:00
Slava Pestov
b2adf51d78
Sema: Record disabled constraints in the trail
2024-10-07 16:50:45 -04:00
Slava Pestov
411c590bc8
Sema: Record key path component types in the trail
2024-10-07 16:50:44 -04:00
Slava Pestov
7ea975015f
Sema: Record ASTNode types in the trail
2024-10-07 16:50:44 -04:00
Slava Pestov
3dc16a9f5b
Sema: Record defaulted constraints in the trail
2024-10-01 18:10:20 -04:00
Slava Pestov
0518b762d1
Sema: Record pack environments in the trail
2024-10-01 18:10:20 -04:00
Slava Pestov
f51bf3cf9d
Sema: Record pack expansion environments in the trail
2024-10-01 18:10:20 -04:00
Slava Pestov
9afb1a960b
Sema: Record opened pack expansion types in the trail
2024-10-01 18:10:20 -04:00
Slava Pestov
7d3350d0f2
Sema: Record opened existential types in the trail
2024-10-01 18:10:19 -04:00
Slava Pestov
f963f36a16
Sema: Record opened types in the trail
2024-10-01 18:10:19 -04:00
Slava Pestov
a9f392278f
Sema: Record argument matching choices in the trail
2024-10-01 18:10:18 -04:00
Slava Pestov
8b4a58fb02
Sema: Record applied disjunctions in the trail
2024-10-01 18:10:18 -04:00
Slava Pestov
8799596bed
Sema: Record disjunction choices in the trail
2024-10-01 18:10:18 -04:00
Slava Pestov
49487b8893
Sema: Record fixed requirements in the trail
2024-10-01 18:10:17 -04:00
Slava Pestov
df692edc7c
Sema: Record fixes in the trail
2024-10-01 12:34:41 -04:00
Slava Pestov
62a470e3d5
Sema: Record conversion restrictions in the trail
2024-10-01 12:34:41 -04:00
Slava Pestov
186589bd25
Sema: Remove SolverTrail::Change::introducedToInference()
2024-09-30 22:05:41 -04:00
Slava Pestov
6652e34f55
Sema: Add SolverTrail::Change::InferredBindings and ::RetractedBindings
2024-09-30 21:29:59 -04:00
Slava Pestov
b885c29f71
Sema: Split up SolverTrail::Change::AddedConstraint and ::RemovedConstraint
2024-09-30 21:29:59 -04:00
Slava Pestov
ae53c8e7ff
Sema: Split up SolverTrail::Change::BoundTypeVariable
2024-09-30 15:09:38 -04:00
Slava Pestov
45488809c0
Sema: Add LLVM_DEBUGs to CSTrail.cpp
2024-09-29 21:48:08 -04:00
Slava Pestov
148033930c
Sema: Split off introduceToInference() into its own Change
...
Previously, retractFromInference() was the last step in
unbindTypeVariable(). This doesn't really make sense,
because bindTypeVariable() doesn't call introduceToInference();
its two callers do it later.
Start untangling this by splitting off introduceToInference()
into its own Change, but for now, record this change at the
incorrect place to maintain the same behavior as before.
2024-09-29 21:46:41 -04:00
Slava Pestov
c0afe3fce1
Sema: Don't create new ConstraintGraphNode during active undo
...
This messes up the bookkeeping for the trail.
2024-09-27 10:51:47 -04:00
Slava Pestov
0c53543927
Sema: More general dumpActiveScopeChanges()
2024-09-26 23:15:27 -04:00
Slava Pestov
105b6b39a9
Sema: Remove ConstraintGraphScope
2024-09-26 23:15:27 -04:00
Slava Pestov
8ee4eeee55
Sema: Migrate SavedTypeVariableBindings to SolverTrail
2024-09-26 23:15:27 -04:00
Slava Pestov
4cc27c9b20
Sema: Factor out SolverTrail from ConstraintGraph
2024-09-26 23:15:26 -04:00