Commit 73629e6
[dart2wasm] Prefer to initialize large 32-bit integer arrays from data section
When crossing the 10k array limit we have to construct
`const WasmArray<WasmI32>` arrays lazily. We do that by array allocation
followed by individual stores to initialize it.
This can cause rather large wasm functions to be generated, which are
slow to validate, compile & run.
Instead initialize such arrays from the data section. This may increase
the wasm file size a bit, but seems to decrease the compressed wasm file
and increases validation & initialization time.
The ACX gallery for example will benefit from this.
Change-Id: I42609e83059cd1543df401efdb30c1cbd72e6296
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417161
Commit-Queue: Martin Kustermann <[email protected]>
Reviewed-by: Ömer Ağacan <[email protected]>1 parent 6ad56c6 commit 73629e6
1 file changed
+34
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
673 | 674 | | |
674 | 675 | | |
675 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
676 | 708 | | |
677 | 709 | | |
678 | 710 | | |
| |||
0 commit comments