# stage2: proper split of requireRuntimeBlock and requireFunctionBlock · gitcafe/zig

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

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

Visibility: public

Requested revision: 4c13d020dbecbd7664b99765de33f230e98f3322

Requested commit: 4c13d020dbecbd7664b99765de33f230e98f3322

Commit: 4c13d020dbecbd7664b99765de33f230e98f3322

Tree: a4e9adc1b9ee5ca6a2db85a1e23f74847f75f878

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: proper split of requireRuntimeBlock and requireFunctionBlock

 * improve the ZIR generated of variable decls
   - utilize the same ZIR for the type and init value when possible
   - init value gets a result location with the variable type.
     no manual coercion is required.
 * no longer use return instructions to extract values out of comptime
   blocks. Instead run the analysis and then look at the corresponding
   analyzed instruction, relying on the comptime mechanism to report
   errors when something could not be comptime evaluated.

```

## Parents

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

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