diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-01-21 02:37:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-01-31 21:09:22 -0700 |
| commit | 2f992e1bb3ff0beb01bd7763a7937000a88f445e (patch) | |
| tree | 2de8db279cda9d5f38d3c54e5b92534b7796e7b9 /src/codegen.zig | |
| parent | 093cbeb018c2df052618bee6602f0f7038327d31 (diff) | |
| download | zig-2f992e1bb3ff0beb01bd7763a7937000a88f445e.tar.gz zig-2f992e1bb3ff0beb01bd7763a7937000a88f445e.zip | |
astgen: const locals that end up being rvalues do not alloc
Local variable declarations now detect whether the result location for the
initialization expression consumes the result location as a pointer. If
it does, then the local is emitted as a LocalPtr. Otherwise it is
emitted as a LocalVal.
This results in clean, straightforward ZIR code for semantic analysis.
Diffstat (limited to 'src/codegen.zig')
0 files changed, 0 insertions, 0 deletions
