# wasm: Refactor storing values\. · gitcafe/zig

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

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

Visibility: public

Requested revision: 9615d7aee7fa0478ad01e4054b620213b73278e1

Requested commit: 9615d7aee7fa0478ad01e4054b620213b73278e1

Commit: 9615d7aee7fa0478ad01e4054b620213b73278e1

Tree: faeb532e10fc9d3b7d24d2066af6bb8bdc3bcd14

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Refactor storing values.

Due to the new structure of lowerConstant, we can now simplify the logic in a lot of situations.
- We no longer have to check the `WValue`'s tag to determine how to load/store a value.
- We can now provide simple memcopy's for aggregate types.
- Constants are now memoized, meaning we do no longer lower constants on each callsite.

```

## Parents

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

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