# IR: re-organize where state goes to prepare for generics · gitcafe/zig

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

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

Visibility: public

Requested revision: 2f259b8176184f063f555aed34087cf7560124fb

Requested commit: 2f259b8176184f063f555aed34087cf7560124fb

Commit: 2f259b8176184f063f555aed34087cf7560124fb

Tree: b4e1cc89b32673c159c68a46ba1e0683ea208102

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
IR: re-organize where state goes to prepare for generics

 * Rip out legacy code for generics
 * put scope in instruction instead of AST nodes
 * separate top level decl stuff from AST nodes
   - remove the assumption that there is a 1:1 correspondence
     between an output instruction and an AST node
   - This way we won't have to clone AST nodes for generics.

```

## Parents

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

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