diff options
| author | Luuk de Gram <luuk@degram.dev> | 2022-01-17 22:34:13 +0100 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2022-01-19 20:01:23 +0100 |
| commit | 28acbdb02ff934fed3363a580128575e7d8c92ee (patch) | |
| tree | fb9e5e49d24353c714754333b6083f88d247daaf /src/codegen | |
| parent | 9615d7aee7fa0478ad01e4054b620213b73278e1 (diff) | |
| download | zig-28acbdb02ff934fed3363a580128575e7d8c92ee.tar.gz zig-28acbdb02ff934fed3363a580128575e7d8c92ee.zip | |
wasm-linker: Allow for creation of local symbols
The backend can create annonymous local symbols. This can be used for constants
that will be passed by reference so it will not have to be lowered to the stack, and then
stored into the data section. This also means it's valid to return a pointer to a constant array.
Those local symbols that are created, will be managed by the parent decl. Free'ing the parent decl,
will also free all of its locals.
When a local symbol was created, the index of said symbol will be returned and saved in the `memory`
tag of a `WValue` which is then memoized. This means that each 'emit' of this WValue will create a relocation
for that constant/symbol and the actual pointer value will be set after relocation phase.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions
