# stage2/wasm: only free types after func overwrite · gitcafe/zig

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

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

Visibility: public

Requested revision: f9963909a1cf73eaee47102f4e4dcafe5afa3898

Requested commit: f9963909a1cf73eaee47102f4e4dcafe5afa3898

Commit: f9963909a1cf73eaee47102f4e4dcafe5afa3898

Tree: cdeae4330ae7e20f9f286f1a16f344a45e6eacb8

Author: Isaac Freund

Committer: Isaac Freund

## Message

```
stage2/wasm: only free types after func overwrite

Functions which are free'd are not immediately removed from the binary
as this would cause a shifting of function indexes. Instead, they hang
around until they can be overwritten by a new function. This means that
the types associated with these dead functions must also remain until
the function is overwritten to avoid a type mismatch.

```

## Parents

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

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