# Zcu: refactor Decl.analysis field · gitcafe/zig

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

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

Visibility: public

Requested revision: 0d8207c29236bf731f7d3bad189beb3a1e1b1d0c

Requested commit: 0d8207c29236bf731f7d3bad189beb3a1e1b1d0c

Commit: 0d8207c29236bf731f7d3bad189beb3a1e1b1d0c

Tree: d7cb3a14a5c3b9ce77f299b24502204318993913

Author: mlugg

Committer: mlugg

## Message

```
Zcu: refactor Decl.analysis field

* Functions failing codegen now set this failure on the function
  analysis state. Decl analysis `codegen_failure` is reserved for
  failures generating constant values.

* `liveness_failure` is consolidated into `codegen_failure`, as we do
  not need to distinguish these, and Liveness.Verify is just a debugging
  feature anyway.

* `sema_failure_retryable` and `codegen_failure_retryable` are removed.
  Instead, retryable failures are recorded in the new
  `Zcu.retryable_failures` list. On an incremental update, this list is
  flushed, and all elements are marked as outdated so that we re-attempt
  analysis and code generation.

Also remove the `generation` fields from `Zcu` and `Decl` as these are
not needed by our new strategy for incremental updates.

```

## Parents

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

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