# C backend: flatten out some of the long-lived state · gitcafe/zig

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

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

Visibility: public

Requested revision: 1606717b5fed83ee64ba1a91e55248e07a51afa6

Requested commit: 1606717b5fed83ee64ba1a91e55248e07a51afa6

Commit: 1606717b5fed83ee64ba1a91e55248e07a51afa6

Tree: a7a1de9fe9ff8ddac0c8b920c6fabd0598434eaf

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
C backend: flatten out some of the long-lived state

When the compiler's state lives through multiple Compilation.update()
calls, the C backend stores the rendered C source code for each
decl code body and forward declarations.

With this commit, the state is still stored, but it is managed in one
big array list in link/C.zig rather than many array lists, one for each
decl. This means simpler serialization and deserialization.

```

## Parents

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

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