Commit 36f3574
committed
Fix deserialization of lifetime dependencies on ast function types
While deserializing AST function types FunctionType and GenericFunctionType which include
lifetime dependencies and an implicit self parameter, we don't correctly populate
ASTExtInfoBuilder.lifetimeDependencies. We end up reading one dependency less due to
incorrect index calculation.
Unlike SILFunctionType, AST function types FunctionType and GenericFunctionType
do not include implicit self in their param list. They represent methods with
implicit self as like: `(Self) -> (Args...) -> Result` and don't have any information
to indicate they may have implicit self. Since we use number of parameters while
deserializing lifetime dependencies, we go wrong for such function types.
Serialize the length of parameter indices, so that lifetime dependencies can be
deserialized to that length.
rdar://1517682161 parent 284c371 commit 36f3574
File tree
6 files changed
+70
-22
lines changed- include/swift/AST
- lib/Serialization
- validation-test/Serialization
6 files changed
+70
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
230 | 249 | | |
231 | 250 | | |
232 | 251 | | |
| |||
250 | 269 | | |
251 | 270 | | |
252 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
253 | 285 | | |
254 | 286 | | |
255 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3891 | 3891 | | |
3892 | 3892 | | |
3893 | 3893 | | |
3894 | | - | |
| 3894 | + | |
3895 | 3895 | | |
3896 | 3896 | | |
3897 | 3897 | | |
| |||
4493 | 4493 | | |
4494 | 4494 | | |
4495 | 4495 | | |
4496 | | - | |
4497 | | - | |
4498 | 4496 | | |
4499 | 4497 | | |
4500 | | - | |
| 4498 | + | |
4501 | 4499 | | |
4502 | 4500 | | |
4503 | 4501 | | |
| |||
7438 | 7436 | | |
7439 | 7437 | | |
7440 | 7438 | | |
7441 | | - | |
7442 | | - | |
| 7439 | + | |
7443 | 7440 | | |
7444 | 7441 | | |
7445 | 7442 | | |
| |||
8091 | 8088 | | |
8092 | 8089 | | |
8093 | 8090 | | |
8094 | | - | |
| 8091 | + | |
8095 | 8092 | | |
8096 | 8093 | | |
8097 | 8094 | | |
| |||
9378 | 9375 | | |
9379 | 9376 | | |
9380 | 9377 | | |
9381 | | - | |
| 9378 | + | |
9382 | 9379 | | |
9383 | 9380 | | |
9384 | 9381 | | |
| |||
9387 | 9384 | | |
9388 | 9385 | | |
9389 | 9386 | | |
| 9387 | + | |
9390 | 9388 | | |
9391 | 9389 | | |
9392 | 9390 | | |
9393 | 9391 | | |
9394 | 9392 | | |
9395 | 9393 | | |
9396 | | - | |
9397 | | - | |
9398 | | - | |
| 9394 | + | |
| 9395 | + | |
| 9396 | + | |
9399 | 9397 | | |
9400 | | - | |
9401 | | - | |
9402 | | - | |
| 9398 | + | |
| 9399 | + | |
| 9400 | + | |
9403 | 9401 | | |
9404 | 9402 | | |
9405 | 9403 | | |
9406 | | - | |
| 9404 | + | |
9407 | 9405 | | |
9408 | 9406 | | |
9409 | 9407 | | |
9410 | 9408 | | |
9411 | | - | |
| 9409 | + | |
9412 | 9410 | | |
9413 | 9411 | | |
9414 | 9412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
1104 | | - | |
| 1103 | + | |
1105 | 1104 | | |
1106 | 1105 | | |
1107 | 1106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
2323 | 2323 | | |
2324 | 2324 | | |
2325 | 2325 | | |
| 2326 | + | |
2326 | 2327 | | |
2327 | 2328 | | |
2328 | 2329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2733 | 2733 | | |
2734 | 2734 | | |
2735 | 2735 | | |
2736 | | - | |
| 2736 | + | |
| 2737 | + | |
2737 | 2738 | | |
2738 | | - | |
2739 | | - | |
| 2739 | + | |
2740 | 2740 | | |
2741 | 2741 | | |
2742 | 2742 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments