Commit f25a2b4
[dart2wasm] Implement
Currently `jsifyRaw()` on a Dart list calls out to JS which allocates an
array and then calls back into Dart for each array element, which uses
`jsifyRaw()` on the array elements.
The JS runtimes will not inline the call back into Dart. So there's
actually very little reason to do this in JS, so we can implement it in
Dart.
That in return will also make this more ammenable to tree shaking as the
`$listRead` and `$listLenght` aren't force-exported anymore.
Change-Id: I8b3b7f553ce9fa72880f6ca08edb95b900e98570
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414781
Reviewed-by: Srujan Gaddam <[email protected]>
Commit-Queue: Martin Kustermann <[email protected]>jsifyRaw() of Dart lists in Dart1 parent ef64387 commit f25a2b4
File tree
2 files changed
+9
-29
lines changed- pkg/dart2wasm/lib/js
- sdk/lib/_internal/wasm/lib
2 files changed
+9
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 75 | | |
89 | 76 | | |
90 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
261 | 267 | | |
262 | 268 | | |
263 | 269 | | |
| |||
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
372 | | - | |
| 378 | + | |
373 | 379 | | |
374 | 380 | | |
375 | 381 | | |
| |||
672 | 678 | | |
673 | 679 | | |
674 | 680 | | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
0 commit comments