# rewrite wasm/Emit.zig · gitcafe/zig

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

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

Visibility: public

Requested revision: e521879e4730fd85a92081c0040db7dc5daad8a3

Requested commit: e521879e4730fd85a92081c0040db7dc5daad8a3

Commit: e521879e4730fd85a92081c0040db7dc5daad8a3

Tree: be07a1a575ad2728027846e0b8cce0f50b807cf0

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
rewrite wasm/Emit.zig

mainly, rework how relocations works. This is the point at which symbol
indexes are known - not before. And don't emit unnecessary relocations!
They're only needed when emitting an object file.

Changes wasm linker to keep MIR around long-lived so that fixups can be
reapplied after linker garbage collection.

use labeled switch while we're at it

```

## Parents

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

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