Commit 3f59a7d
authored
[NFC] Add type.with(...) API to update reference types (#7359)
There are many places where we have to copy a reference type with some
modification, for example to make it refer to a different heap type or
to make it non-nullable or nullable. Previously the only way to do this
was with the `Type` constructor, retrieving and passing in the
unmodified fields of the old type explicitly.
With the addition of exact types, all of these sites have to be updated
to additionally propagate the old type's exactness. To simplify these
call sites and make them more robust against future additions to the
structure of reference types, introduce new APIs to update just a single
part of a reference type at a time.1 parent 626e212 commit 3f59a7d
4 files changed
Lines changed: 21 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
| 208 | + | |
211 | 209 | | |
212 | 210 | | |
213 | 211 | | |
| |||
467 | 465 | | |
468 | 466 | | |
469 | 467 | | |
470 | | - | |
| 468 | + | |
471 | 469 | | |
472 | 470 | | |
473 | 471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
| 155 | + | |
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
401 | 412 | | |
402 | 413 | | |
403 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1076 | 1076 | | |
1077 | 1077 | | |
1078 | 1078 | | |
1079 | | - | |
1080 | | - | |
| 1079 | + | |
1081 | 1080 | | |
1082 | 1081 | | |
1083 | 1082 | | |
| |||
1087 | 1086 | | |
1088 | 1087 | | |
1089 | 1088 | | |
1090 | | - | |
1091 | | - | |
| 1089 | + | |
1092 | 1090 | | |
1093 | 1091 | | |
1094 | 1092 | | |
| |||
1099 | 1097 | | |
1100 | 1098 | | |
1101 | 1099 | | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
| 1100 | + | |
1105 | 1101 | | |
1106 | 1102 | | |
1107 | 1103 | | |
| |||
1124 | 1120 | | |
1125 | 1121 | | |
1126 | 1122 | | |
1127 | | - | |
1128 | | - | |
| 1123 | + | |
1129 | 1124 | | |
1130 | 1125 | | |
1131 | 1126 | | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
| 1127 | + | |
1135 | 1128 | | |
1136 | 1129 | | |
1137 | 1130 | | |
| |||
1141 | 1134 | | |
1142 | 1135 | | |
1143 | 1136 | | |
1144 | | - | |
1145 | | - | |
| 1137 | + | |
1146 | 1138 | | |
1147 | 1139 | | |
1148 | 1140 | | |
| |||
1317 | 1309 | | |
1318 | 1310 | | |
1319 | 1311 | | |
1320 | | - | |
| 1312 | + | |
1321 | 1313 | | |
1322 | 1314 | | |
1323 | 1315 | | |
| |||
0 commit comments