Commit c0e0139
committed
[AST] Allocate PlaceholderTypes in the correct arena
We shouldn't be allocating placeholders for type
variables in the permanent arena, and we should be
caching them such that equality works.
To achieve this, we need to introduce a new
"solver allocated" type property. This is required
because we don't want to mark placeholder types
with type variable originators as themselves having
type variables, as it's not part of their structural
type. Also update ErrorType to use this bit, though
I don't believe we currently create ErrorTypes
with type variable originators.1 parent 748315b commit c0e0139
File tree
5 files changed
+70
-18
lines changed- include/swift/AST
- lib
- AST
- Sema
- test/Constraints
- validation-test/Sema/type_checker_crashers_fixed
5 files changed
+70
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
| |||
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
227 | 239 | | |
228 | 240 | | |
229 | 241 | | |
| |||
501 | 513 | | |
502 | 514 | | |
503 | 515 | | |
| 516 | + | |
| 517 | + | |
504 | 518 | | |
505 | 519 | | |
506 | 520 | | |
| |||
6714 | 6728 | | |
6715 | 6729 | | |
6716 | 6730 | | |
6717 | | - | |
6718 | | - | |
| 6731 | + | |
| 6732 | + | |
| 6733 | + | |
6719 | 6734 | | |
6720 | 6735 | | |
6721 | 6736 | | |
| |||
6774 | 6789 | | |
6775 | 6790 | | |
6776 | 6791 | | |
| 6792 | + | |
| 6793 | + | |
6777 | 6794 | | |
6778 | 6795 | | |
6779 | 6796 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
| |||
1811 | 1812 | | |
1812 | 1813 | | |
1813 | 1814 | | |
1814 | | - | |
1815 | | - | |
1816 | | - | |
| 1815 | + | |
| 1816 | + | |
1817 | 1817 | | |
1818 | 1818 | | |
1819 | 1819 | | |
| |||
3117 | 3117 | | |
3118 | 3118 | | |
3119 | 3119 | | |
3120 | | - | |
3121 | | - | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
3122 | 3126 | | |
3123 | 3127 | | |
3124 | 3128 | | |
3125 | 3129 | | |
3126 | 3130 | | |
3127 | | - | |
3128 | | - | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
3129 | 3157 | | |
3130 | 3158 | | |
3131 | 3159 | | |
| |||
3943 | 3971 | | |
3944 | 3972 | | |
3945 | 3973 | | |
3946 | | - | |
| 3974 | + | |
3947 | 3975 | | |
3948 | 3976 | | |
3949 | 3977 | | |
| |||
4604 | 4632 | | |
4605 | 4633 | | |
4606 | 4634 | | |
4607 | | - | |
| 4635 | + | |
4608 | 4636 | | |
4609 | 4637 | | |
4610 | 4638 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8475 | 8475 | | |
8476 | 8476 | | |
8477 | 8477 | | |
8478 | | - | |
8479 | | - | |
| 8478 | + | |
| 8479 | + | |
8480 | 8480 | | |
8481 | 8481 | | |
8482 | 8482 | | |
| |||
8486 | 8486 | | |
8487 | 8487 | | |
8488 | 8488 | | |
8489 | | - | |
8490 | | - | |
| 8489 | + | |
| 8490 | + | |
| 8491 | + | |
| 8492 | + | |
8491 | 8493 | | |
8492 | 8494 | | |
8493 | 8495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
0 commit comments