diff options
| author | Luuk de Gram <luuk@degram.dev> | 2022-02-28 19:32:10 +0100 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2022-03-01 08:35:20 +0100 |
| commit | f5a31cb0d693ef3c07da7f446c95999cef34488b (patch) | |
| tree | 8b4ea40e8a2d8240d0559ef9220ccd4c8fe9868b /src/type.zig | |
| parent | b1159ab7aecfe704adcb4cf44d6fedafd572a720 (diff) | |
| download | zig-f5a31cb0d693ef3c07da7f446c95999cef34488b.tar.gz zig-f5a31cb0d693ef3c07da7f446c95999cef34488b.zip | |
wasm-linker: Intern globals, exports & imports
Symbols that have globals used to have their lookup key be the symbol name.
This key is now the offset into the string table.
Imports have both the module name (library name) and name (of the symbol), those strings are now
also being interned. This can save us up to 24bytes per import which have both their module name and name de-duplicated.
Module names are almost entirely the same for all imports, providing us with a big chance of saving us 12 bytes at least.
Just like imports, exports can also have a seperate name than the internal symbol name. Rather than storing the slice,
we now store the offset of this string instead.
Diffstat (limited to 'src/type.zig')
0 files changed, 0 insertions, 0 deletions
