# wasm: Fix loading from pointers to support defer · gitcafe/zig

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

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

Visibility: public

Requested revision: 3de111d993712f01cf5dd3bf6e2704550c9745e4

Requested commit: 3de111d993712f01cf5dd3bf6e2704550c9745e4

Commit: 3de111d993712f01cf5dd3bf6e2704550c9745e4

Tree: ae6acdc0884a653eff54e7e7081e144f4e71be0a

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Fix loading from pointers to support defer

Previously, the `load` instruction would just pass the pointer to the next instruction
for types that comply to `isByRef`. However, this meant that a defer would directly write
to the reference, rather than a copy. After this commit, we always copy the value.

```

## Parents

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

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