Commit 5671730
[dart2js] Pass type arguments to callable properties even with
--omit-implicit-checks.
When the default check policy is "trusted" instead of "emitted", we skip
checking every function during the RTI need computation. This works
because if the type arguments are needed for some other reason, like the
literal being used in the body, we see the type use and go back and
update the RTI need of the function. We can't do this for callable
properties because we don't know which function will be assigned at
runtime, so we need to conservatively provide type arguments no matter
what.
We could optimize this slightly by only providing type arguments if we
know a type use occurs in a function which is assignable to the type of
the property, but I expect this to save little for the amount of
overhead during compilation.
We also update the dependency computation to ensure that if a callable
property needs type arguments, then they're available for the enclosing
context to pass along.
Bug: #41449
Fixes: #41449
Change-Id: I98d9024dfa64cbfe33bd43172ffa905a8537649e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154284
Reviewed-by: Stephen Adams <[email protected]>
Commit-Queue: Mayank Patke <[email protected]>1 parent 4c74ebb commit 5671730
File tree
3 files changed
+129
-4
lines changed- pkg/compiler/lib/src/js_backend
- tests
- dart2js_2
- dart2js
3 files changed
+129
-4
lines changedLines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
174 | | - | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
| |||
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
184 | | - | |
185 | | - | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
| |||
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| 310 | + | |
| 311 | + | |
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
| |||
1031 | 1035 | | |
1032 | 1036 | | |
1033 | 1037 | | |
| 1038 | + | |
| 1039 | + | |
1034 | 1040 | | |
1035 | 1041 | | |
1036 | 1042 | | |
| |||
1139 | 1145 | | |
1140 | 1146 | | |
1141 | 1147 | | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1142 | 1151 | | |
1143 | 1152 | | |
1144 | 1153 | | |
| |||
1317 | 1326 | | |
1318 | 1327 | | |
1319 | 1328 | | |
1320 | | - | |
| 1329 | + | |
1321 | 1330 | | |
1322 | 1331 | | |
1323 | 1332 | | |
| |||
| 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 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 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 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
0 commit comments