diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-12-12 15:32:37 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-12-13 12:52:21 +0200 |
| commit | 7b2a936173165002105ba5e76bed69654e132fea (patch) | |
| tree | 54a77e6d627b2cdec08b57d4402f35011fd064df /lib/std/builtin.zig | |
| parent | 4832677c3bce61725c67306c4683921296abdff9 (diff) | |
| download | zig-7b2a936173165002105ba5e76bed69654e132fea.tar.gz zig-7b2a936173165002105ba5e76bed69654e132fea.zip | |
remove `stack` option from `@call`
Diffstat (limited to 'lib/std/builtin.zig')
| -rw-r--r-- | lib/std/builtin.zig | 71 |
1 files changed, 32 insertions, 39 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index 4ee9d4306b..eb1212607d 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -591,45 +591,38 @@ fn testVersionParse() !void { /// This data structure is used by the Zig language code generation and /// therefore must be kept in sync with the compiler implementation. -pub const CallOptions = struct { - modifier: Modifier = .auto, - - /// Only valid when `Modifier` is `Modifier.async_kw`. - stack: ?[]align(std.Target.stack_align) u8 = null, - - pub const Modifier = enum { - /// Equivalent to function call syntax. - auto, - - /// Equivalent to async keyword used with function call syntax. - async_kw, - - /// Prevents tail call optimization. This guarantees that the return - /// address will point to the callsite, as opposed to the callsite's - /// callsite. If the call is otherwise required to be tail-called - /// or inlined, a compile error is emitted instead. - never_tail, - - /// Guarantees that the call will not be inlined. If the call is - /// otherwise required to be inlined, a compile error is emitted instead. - never_inline, - - /// Asserts that the function call will not suspend. This allows a - /// non-async function to call an async function. - no_async, - - /// Guarantees that the call will be generated with tail call optimization. - /// If this is not possible, a compile error is emitted instead. - always_tail, - - /// Guarantees that the call will inlined at the callsite. - /// If this is not possible, a compile error is emitted instead. - always_inline, - - /// Evaluates the call at compile-time. If the call cannot be completed at - /// compile-time, a compile error is emitted instead. - compile_time, - }; +pub const CallModifier = enum { + /// Equivalent to function call syntax. + auto, + + /// Equivalent to async keyword used with function call syntax. + async_kw, + + /// Prevents tail call optimization. This guarantees that the return + /// address will point to the callsite, as opposed to the callsite's + /// callsite. If the call is otherwise required to be tail-called + /// or inlined, a compile error is emitted instead. + never_tail, + + /// Guarantees that the call will not be inlined. If the call is + /// otherwise required to be inlined, a compile error is emitted instead. + never_inline, + + /// Asserts that the function call will not suspend. This allows a + /// non-async function to call an async function. + no_async, + + /// Guarantees that the call will be generated with tail call optimization. + /// If this is not possible, a compile error is emitted instead. + always_tail, + + /// Guarantees that the call will inlined at the callsite. + /// If this is not possible, a compile error is emitted instead. + always_inline, + + /// Evaluates the call at compile-time. If the call cannot be completed at + /// compile-time, a compile error is emitted instead. + compile_time, }; /// This data structure is used by the Zig language code generation and |
