# wasm: add \`dead\` tag to \`WValue\` · gitcafe/zig

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

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

Visibility: public

Requested revision: 99422cb5284f3e15c1b5a8598a6b1622c0e7b6ca

Requested commit: 99422cb5284f3e15c1b5a8598a6b1622c0e7b6ca

Commit: 99422cb5284f3e15c1b5a8598a6b1622c0e7b6ca

Tree: cf712b929c5f3fd1128cd83a97863203c762d8f4

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: add `dead` tag to `WValue`

This new tag is used for freed locals that are not allowed to have any
remaining references pointing to it. This new tag allows us to easily
identify liveness bugs. Previously we would set the entire region to
`undefined` which would incorrectly set the tag to `function_index`,
making codegen think it was a valid `WValue` while it wasn't.

```

## Parents

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

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