# stage2: preliminary reworking for whole-file-AstGen · gitcafe/zig

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

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

Visibility: public

Requested revision: 3114115348e789ae4bab8844c7ebd0067185f1c4

Requested commit: 3114115348e789ae4bab8844c7ebd0067185f1c4

Commit: 3114115348e789ae4bab8844c7ebd0067185f1c4

Tree: 3d7fb3bd000ee263054bc4ddc9c98c0359b04a1f

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: preliminary reworking for whole-file-AstGen

See #8516.

 * AstGen is now done on whole files at once rather than per Decl.

 * Introduce a new wait group for AstGen tasks. `performAllTheWork`
   waits for all AstGen tasks to be complete before doing Sema,
   single-threaded.
   - The C object compilation tasks are moved to be spawned after
     AstGen, since they only need to complete by the end of
     the function.

With this commit, the codebase compiles, but much more reworking is
needed to get things back into a useful state.

```

## Parents

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

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