# wasm: Refactor lowerUnnamedConst · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f4adb53bcfff18c24758bf4ea2968efd17911e02)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f4adb53bcfff18c24758bf4ea2968efd17911e02

Requested commit: f4adb53bcfff18c24758bf4ea2968efd17911e02

Commit: f4adb53bcfff18c24758bf4ea2968efd17911e02

Tree: e8af179bb1a842b1e7dbf6fa63614583bb359667

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Refactor lowerUnnamedConst

Rather than ping ponging between codegen and the linker to generate the symbols/atoms
for a local constant and its relocations. We now create all neccesary objects within the linker.

This simplifies the code as we can now simply call `lowerUnnamedConst` from anywhere in codegen,
allowing us to further improve lowering constants into .rodata so we do not have to sacrifice
lowering certain types such as decl_ref's where its type is a slice.

```

## Parents

- [27eb42c15e4e9ab547eaf02cca8810cc0e10e6bf](https://git.cafe/gitcafe/zig/commit/27eb42c15e4e9ab547eaf02cca8810cc0e10e6bf?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f4adb53bcfff18c24758bf4ea2968efd17911e02?format=markdown)
