# wasm: Store stack-offset as WValue · gitcafe/zig

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

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

Visibility: public

Requested revision: 37fea3e3ddc1f7d266d95789c3b1005291bcb96b

Requested commit: 37fea3e3ddc1f7d266d95789c3b1005291bcb96b

Commit: 37fea3e3ddc1f7d266d95789c3b1005291bcb96b

Tree: b334600461274faaf19708f79263bfac7a37e699

Author: Luuk de Gram

Committer: Jakub Konka

## Message

```
wasm: Store stack-offset as WValue

Rather than using runtime to perform pointer arithmetic to set the stack offset as
a pointer into a local, we now store the offset as a WValue from the bottom of the stack.
This has the benefit of less instructions, few locals, and less performance impact when
we allocate a value on the virtual stack.

```

## Parents

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

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