Commit 6c1b746
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 => 2665 [+8 bytes / +0.30%]
test/codesize/test_codesize_minimal_O0.expected.js updated
codesize/test_codesize_minimal_O0.json: 20398 => 20495 [+97 bytes / +0.48%]
codesize/test_codesize_minimal_O1.json: 3498 => 3504 [+6 bytes / +0.17%]
codesize/test_codesize_minimal_O2.json: 2622 => 2626 [+4 bytes / +0.15%]
codesize/test_codesize_minimal_O3.json: 2354 => 2362 [+8 bytes / +0.34%]
codesize/test_codesize_minimal_Os.json: 2354 => 2362 [+8 bytes / +0.34%]
codesize/test_codesize_minimal_Os_mr.json: 559 => 572 [+13 bytes / +2.33%]
codesize/test_codesize_minimal_Oz-ctors.json: 2322 => 2330 [+8 bytes / +0.34%]
codesize/test_codesize_minimal_Oz.json: 2354 => 2362 [+8 bytes / +0.34%]
codesize/test_codesize_minimal_esm.json: 2489 => 2498 [+9 bytes / +0.36%]
codesize/test_codesize_minimal_pthreads.json: 27208 => 27214 [+6 bytes / +0.02%]
codesize/test_codesize_minimal_pthreads_memgrowth.json: 27636 => 27642 [+6 bytes / +0.02%]
codesize/test_codesize_minimal_wasmfs.json: 2354 => 2362 [+8 bytes / +0.34%]
Average change: +0.43% (+0.02% - +2.33%)
```1 parent f285b98 commit 6c1b746
File tree
19 files changed
+137
-195
lines changed- src
- lib
- test/codesize
- tools
19 files changed
+137
-195
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 | | - | |
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 | | - | |
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 | |
|---|---|---|---|
| |||
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 | |
|---|---|---|---|
| |||
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