diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-01-17 15:21:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-01-17 15:23:50 -0700 |
| commit | f4e051e35d8019c9a8d99ccae8f2e9d8f032629a (patch) | |
| tree | cbeebf38b85f5aaaaff50ea7f9f875c02ac63667 /src/codegen | |
| parent | 79628d48a4429818bddef2e86e2d7073d1955302 (diff) | |
| download | zig-f4e051e35d8019c9a8d99ccae8f2e9d8f032629a.tar.gz zig-f4e051e35d8019c9a8d99ccae8f2e9d8f032629a.zip | |
Sema: fix comptime break semantics
Previously, breaking from an outer block at comptime would result in
incorrect control flow. Now there is a mechanism, `error.ComptimeBreak`,
similar to `error.ComptimeReturn`, to send comptime control flow further
up the stack, to its matching block.
This commit also introduces a new log scope. To use it, pass
`--debug-log sema_zir` and you will see 1 line per ZIR instruction
semantically analyzed. This is useful when you want to understand what
comptime control flow is doing while debugging the compiler.
One more `switch` test case is passing.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions
