Commit 4f8e384
committed
Sema: rewrite peer type resolution
The existing logic for peer type resolution was quite convoluted and
buggy. This rewrite makes it much more resilient, readable, and
extensible. The algorithm works by first iterating over the types to
select a "strategy", then applying that strategy, possibly applying peer
resolution recursively.
The new semantics around PTR for comptime-known fixed-width integers did
require some small changes to parts of the compiler, std, and
compiler_rt. Regarding the MachO changes, I spoke to @kubkon about how
best to do them, and this is what he suggested.
Several new tests have been added to cover cases which the old logic did
not correctly handle.
Resolves: #9917
Resolves: #15644
Resolves: #157091 parent b677b36 commit 4f8e384
File tree
12 files changed
+1258
-543
lines changed- lib
- compiler_rt
- std
- Build/Step
- crypto
- fmt/parse_float
- src
- link
- MachO
- dyld_info
- test
- behavior
- cases/compile_errors
12 files changed
+1258
-543
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | | - | |
| 1024 | + | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
893 | 897 | | |
894 | 898 | | |
895 | 899 | | |
| |||
0 commit comments