diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-23 21:12:29 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-23 21:12:29 -0700 |
| commit | fbfae832eaf520f7fcc632580b4b4a7fb171f90f (patch) | |
| tree | 1a8b34df8132e7bffc336235cfdae17f261f41c9 /src/stage1/codegen.cpp | |
| parent | 49be88859d3cef22c5cc27c908264a235c78a4d0 (diff) | |
| download | zig-fbfae832eaf520f7fcc632580b4b4a7fb171f90f.tar.gz zig-fbfae832eaf520f7fcc632580b4b4a7fb171f90f.zip | |
AstGen: emit nosuspend function calls
Inside a nosuspend block, emit function calls as nosuspend calls.
Also inside a comptime block, emit function calls as comptime calls.
Also emit `async foo()` calls as async calls.
Remove compile error for `nosuspend` block inside `suspend` block.
Instead of implicitly treating every `suspend` block also as a
`nosuspend` block (which would make sense), we leave suspension points
as compile errors, to hint to the programmer about accidents. Of course
they may then assert `nosuspend` by introducing a block within their
suspend block.
To make room in `Zir.Inst.Tag` I moved `typeof_peer` and `compile_log`
to `Extended`.
Diffstat (limited to 'src/stage1/codegen.cpp')
0 files changed, 0 insertions, 0 deletions
