# stage2: fix memory management of ZIR code · gitcafe/zig

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

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

Visibility: public

Requested revision: 7598a00f34e91375bc8d4f57e8f5ecbc0d1b4d14

Requested commit: 7598a00f34e91375bc8d4f57e8f5ecbc0d1b4d14

Commit: 7598a00f34e91375bc8d4f57e8f5ecbc0d1b4d14

Tree: 75338d2cf30fb9092692d0b447d8e2cd610d3023

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: fix memory management of ZIR code

 * free Module.Fn ZIR code when destroying the owner Decl
 * unreachable_safe and unreachable_unsafe are collapsed into one ZIR
   instruction with a safety flag.
 * astgen: emit an unreachable instruction for unreachable literals
 * don't forget to call deinit on ZIR code
 * astgen: implement some builtin functions

```

## Parents

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

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