Commit 23ee425
[vm/aot/tfa] Signature shaking for both static and instance methods
The existing signature shaker transforms optional and named parameters
of static and top-level methods and constructors into required
parameters whenever they are always passed.
This change improves signature shaking in a number of areas:
- Extend signature shaking to cover instance methods.
- Remove parameters which are never passed.
- Remove parameters which are not used.
- Transform signatures before unboxing, enabling transformed parameters
to be unboxed.
TFA summaries for transformed functions are updated to stay in sync with
the program for later transformations.
Reduces instructions size of Flutter Gallery on ARM64 by 2.2%.
Issue: #40488
Change-Id: I39e364bc23b01e4502864d7369a745a9278cfb92
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161175
Commit-Queue: Aske Simon Christensen <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
Reviewed-by: Alexander Markov <[email protected]>1 parent 8f193a3 commit 23ee425
File tree
40 files changed
+1263
-601
lines changed- pkg/vm
- lib/transformations/type_flow
- testcases/transformations/type_flow/transformer
- protobuf_handler/lib
- test/transformations/type_flow
40 files changed
+1263
-601
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1535 | 1535 | | |
1536 | 1536 | | |
1537 | 1537 | | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
1538 | 1542 | | |
1539 | 1543 | | |
1540 | 1544 | | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | 1545 | | |
1547 | 1546 | | |
1548 | 1547 | | |
| |||
1565 | 1564 | | |
1566 | 1565 | | |
1567 | 1566 | | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
1568 | 1573 | | |
1569 | 1574 | | |
1570 | 1575 | | |
| |||
1648 | 1653 | | |
1649 | 1654 | | |
1650 | 1655 | | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
1651 | 1661 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 190 | | |
194 | 191 | | |
195 | | - | |
196 | | - | |
| 192 | + | |
197 | 193 | | |
198 | 194 | | |
199 | 195 | | |
200 | 196 | | |
201 | 197 | | |
202 | | - | |
203 | | - | |
| 198 | + | |
204 | 199 | | |
205 | 200 | | |
206 | 201 | | |
| |||
220 | 215 | | |
221 | 216 | | |
222 | 217 | | |
223 | | - | |
224 | 218 | | |
225 | 219 | | |
226 | 220 | | |
| |||
240 | 234 | | |
241 | 235 | | |
242 | 236 | | |
243 | | - | |
| 237 | + | |
244 | 238 | | |
245 | 239 | | |
246 | 240 | | |
| |||
263 | 257 | | |
264 | 258 | | |
265 | 259 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
| 260 | + | |
271 | 261 | | |
272 | 262 | | |
273 | 263 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
0 commit comments