Commit Graph

52 Commits

Author SHA1 Message Date
Pavel Yaskevich
f94685e704 [CSTrail] NFC: Add dump() methods to SolverTrail 2024-12-04 10:36:12 -08:00
Pavel Yaskevich
f18b772293 [CSTrail] NFC: Make dumpActiveScopeChanges friendlier to humans
`dumpActiveScopeChanges` is used as part of `-debug-constraints`
and could be overwhelming if there are a lot of changes in the scope
because it prints every change including binding inference from
every applicable constraint.

These changes make `dumpActiveScopeChanges` more of summary of
what happened with type variables and constraints so far which
is much easier to navigate while debugging.
2024-12-04 10:36:05 -08:00
Slava Pestov
eeab483cab Sema: Undo changes in chronological order in SolverTrail::undo() 2024-11-19 21:24:12 -05:00
Slava Pestov
a40d4c79ea Sema: Fix access of wrong union member 2024-10-24 18:17:52 -04: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
5fdc1a81b8 Sema: Record retired constraints in the trail 2024-10-08 16:39:34 -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
1d177d0187 Sema: Record expression patterns 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
43a4ac9216 Sema: Record resolved overloads in the trail 2024-10-07 16:50:46 -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
9201a37519 Sema: Strenghten invariants in SolverTrail::Change::undo() 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