Commit a6b0fce
[tfa,aot,dart2wasm] Retain libraries which only have extensions and extension types
Previously, TFA-based tree shaker did not retain libraries if they have
extensions and extension types which are still used.
As a result, kernel files were incomplete and certain tools, such as
Flutter const finder failed to read kernel files after tree shaking.
This change fixes tree shaker to retain libraries when they have used
extensions and extension types.
TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter160137.dart
Fixes flutter/flutter#160137
Change-Id: Iac6f3a13323d053dfab2230367dcafa2550484db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401481
Commit-Queue: Slava Egorov <[email protected]>
Auto-Submit: Alexander Markov <[email protected]>
Reviewed-by: Slava Egorov <[email protected]>1 parent 982b9fa commit a6b0fce
File tree
4 files changed
+80
-0
lines changed- pkg/vm
- lib/transformations/type_flow
- testcases/transformations/type_flow/transformer
4 files changed
+80
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
| 1001 | + | |
1001 | 1002 | | |
1002 | 1003 | | |
1003 | 1004 | | |
| |||
1006 | 1007 | | |
1007 | 1008 | | |
1008 | 1009 | | |
| 1010 | + | |
1009 | 1011 | | |
1010 | 1012 | | |
1011 | 1013 | | |
| |||
Lines changed: 30 additions & 0 deletions
| 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
Lines changed: 43 additions & 0 deletions
| 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments