Commit 6ccdbd9
authored
Split out immutable GadtConstraint (#16602)
This change eagerly allocates a GadtConstraint whenever its state is
changed, rather than simply changing the reference(s) in, what's now
called, `GadtConstraintHandling`, such as `constraint`. Previous to a
recent change, in order to restore the GADT constraints, a fresh copy
was eagerly created in a number of cases, just so it can be used to
restore, for the cases in which it must be restored. The recent change
exposed the underlying pieces of the GADT constraint and allowed those
to be restored as components. Now we still do that, but as a packaged up
GadtConstraint that we created once, eagerly. That also makes sure that
invariants in components are upheld, like the mappings.File tree
17 files changed
+229
-241
lines changed- compiler/src
- dotty/tools/dotc
- core
- inlines
- transform
- typer
- scala/quoted/runtime/impl
17 files changed
+229
-241
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| |||
Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
| 752 | + | |
762 | 753 | | |
763 | 754 | | |
764 | 755 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
413 | | - | |
| 414 | + | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
| |||
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
544 | | - | |
545 | | - | |
| 545 | + | |
| 546 | + | |
546 | 547 | | |
547 | 548 | | |
548 | 549 | | |
| |||
567 | 568 | | |
568 | 569 | | |
569 | 570 | | |
570 | | - | |
| 571 | + | |
571 | 572 | | |
572 | 573 | | |
573 | 574 | | |
| |||
624 | 625 | | |
625 | 626 | | |
626 | 627 | | |
627 | | - | |
628 | | - | |
629 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
630 | 631 | | |
631 | 632 | | |
632 | | - | |
| 633 | + | |
633 | 634 | | |
634 | 635 | | |
635 | 636 | | |
| |||
721 | 722 | | |
722 | 723 | | |
723 | 724 | | |
724 | | - | |
| 725 | + | |
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
| |||
0 commit comments