Commit 33bdacc
[dart2wasm] Refactor ParameterInfo
- Remove the `Member? member` field:
- Knowing a `ParameterInfo`s member is not too useful, because it
doesn't tell us for which use of the member (tear-off getter,
invocation) the `ParameterInfo` is for.
- The `member` field has two uses:
- To compute whether the function being called takes a receiver or
context parameter.
- In dispatch table builder: to check whether a selector (via its
`ParameterInfo`) is for `noSuchMethod`.
Both of these can be implemented more directly, as done in this CL:
- Add `final bool takesContextOrReceiver` member to `ParameterInfo`.
- Add `final bool alwaysAddToDispatchTable` member to `SelectorInfo`
to handle the special case with `noSuchMethod`.
- Add various assertions in `ParameterInfo` members.
Change-Id: I473657f594c6306605677cf001854407d43f1347
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398883
Reviewed-by: Martin Kustermann <[email protected]>
Commit-Queue: Ömer Ağacan <[email protected]>1 parent 1b8e01f commit 33bdacc
File tree
3 files changed
+64
-54
lines changed- pkg/dart2wasm/lib
3 files changed
+64
-54
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
| |||
285 | 291 | | |
286 | 292 | | |
287 | 293 | | |
288 | | - | |
| 294 | + | |
289 | 295 | | |
290 | | - | |
| 296 | + | |
| 297 | + | |
291 | 298 | | |
292 | 299 | | |
293 | 300 | | |
| |||
452 | 459 | | |
453 | 460 | | |
454 | 461 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
| 462 | + | |
459 | 463 | | |
460 | 464 | | |
461 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | | - | |
49 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
50 | 58 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
56 | 70 | | |
57 | 71 | | |
58 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
59 | 75 | | |
60 | 76 | | |
61 | 77 | | |
62 | 78 | | |
63 | | - | |
| 79 | + | |
| 80 | + | |
64 | 81 | | |
65 | 82 | | |
66 | 83 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
71 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
72 | 92 | | |
73 | 93 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
77 | 97 | | |
78 | 98 | | |
79 | 99 | | |
80 | 100 | | |
81 | | - | |
| 101 | + | |
82 | 102 | | |
83 | 103 | | |
84 | 104 | | |
| 105 | + | |
85 | 106 | | |
86 | 107 | | |
87 | 108 | | |
88 | 109 | | |
| 110 | + | |
89 | 111 | | |
90 | 112 | | |
91 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | 727 | | |
733 | 728 | | |
734 | 729 | | |
| |||
741 | 736 | | |
742 | 737 | | |
743 | 738 | | |
744 | | - | |
| 739 | + | |
745 | 740 | | |
746 | 741 | | |
747 | 742 | | |
| |||
805 | 800 | | |
806 | 801 | | |
807 | 802 | | |
808 | | - | |
| 803 | + | |
809 | 804 | | |
810 | 805 | | |
811 | 806 | | |
| |||
1394 | 1389 | | |
1395 | 1390 | | |
1396 | 1391 | | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
1408 | 1395 | | |
1409 | 1396 | | |
1410 | 1397 | | |
1411 | 1398 | | |
1412 | 1399 | | |
1413 | 1400 | | |
1414 | 1401 | | |
1415 | | - | |
| 1402 | + | |
1416 | 1403 | | |
1417 | 1404 | | |
1418 | 1405 | | |
| |||
1478 | 1465 | | |
1479 | 1466 | | |
1480 | 1467 | | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | 1468 | | |
1485 | 1469 | | |
1486 | 1470 | | |
| |||
1500 | 1484 | | |
1501 | 1485 | | |
1502 | 1486 | | |
1503 | | - | |
| 1487 | + | |
1504 | 1488 | | |
1505 | 1489 | | |
1506 | 1490 | | |
| |||
0 commit comments