Commit 2c3efc2
committed
Export data addresses from the Wasm module just like other symbols.
This removes the special handling of exported immutable globals which
simplifies the code in a few different ways.
For programs that export data addresses (this is relatively rare) this
means codesize reduction for the generated JS (since it no longer
contains the constant values) and the codesize increase for the Wasm
binary (since it now contains extra exports).
The main reason for this is consistency with dynamic linking (where data
exports are always needed) and a reduction in complexity.
The following (14) test expectation files were updated by
running the tests with `--rebaseline`:
```
codesize/test_codesize_minimal_64.json: 2657 => 2671 [+14 bytes / +0.53%]
test/codesize/test_codesize_minimal_O0.expected.js updated
codesize/test_codesize_minimal_O0.json: 20398 => 20501 [+103 bytes / +0.50%]
codesize/test_codesize_minimal_O1.json: 3498 => 3510 [+12 bytes / +0.34%]
codesize/test_codesize_minimal_O2.json: 2622 => 2632 [+10 bytes / +0.38%]
codesize/test_codesize_minimal_O3.json: 2354 => 2368 [+14 bytes / +0.59%]
codesize/test_codesize_minimal_Os.json: 2354 => 2368 [+14 bytes / +0.59%]
codesize/test_codesize_minimal_Os_mr.json: 559 => 572 [+13 bytes / +2.33%]
codesize/test_codesize_minimal_Oz-ctors.json: 2322 => 2336 [+14 bytes / +0.60%]
codesize/test_codesize_minimal_Oz.json: 2354 => 2368 [+14 bytes / +0.59%]
codesize/test_codesize_minimal_esm.json: 2489 => 2504 [+15 bytes / +0.60%]
codesize/test_codesize_minimal_pthreads.json: 27208 => 27220 [+12 bytes / +0.04%]
codesize/test_codesize_minimal_pthreads_memgrowth.json: 27636 => 27648 [+12 bytes / +0.04%]
codesize/test_codesize_minimal_wasmfs.json: 2354 => 2368 [+14 bytes / +0.59%]
Average change: +0.60% (+0.04% - +2.33%)
```1 parent f285b98 commit 2c3efc2
File tree
19 files changed
+130
-188
lines changed- src
- lib
- test/codesize
- tools
19 files changed
+130
-188
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1630 | 1630 | | |
1631 | 1631 | | |
1632 | 1632 | | |
1633 | | - | |
1634 | | - | |
1635 | | - | |
1636 | | - | |
1637 | 1633 | | |
1638 | | - | |
| 1634 | + | |
1639 | 1635 | | |
1640 | | - | |
| 1636 | + | |
1641 | 1637 | | |
1642 | | - | |
1643 | 1638 | | |
1644 | 1639 | | |
1645 | 1640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
| 1319 | + | |
1319 | 1320 | | |
1320 | 1321 | | |
1321 | 1322 | | |
| |||
1340 | 1341 | | |
1341 | 1342 | | |
1342 | 1343 | | |
| 1344 | + | |
| 1345 | + | |
1343 | 1346 | | |
1344 | 1347 | | |
1345 | 1348 | | |
1346 | 1349 | | |
1347 | | - | |
1348 | | - | |
1349 | 1350 | | |
1350 | 1351 | | |
1351 | 1352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments