From bb1b1dd1021ebf568d3241536c4d8342f246768e Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Mon, 6 Mar 2023 16:23:33 +0100 Subject: [PATCH] update version data --- src/data/master.zig | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/data/master.zig b/src/data/master.zig index dcbc991..0fda360 100644 --- a/src/data/master.zig +++ b/src/data/master.zig @@ -208,7 +208,7 @@ pub const builtins = [_]Builtin{ .signature = "@breakpoint()", .snippet = "@breakpoint()", .documentation = - \\This function inserts a platform-specific debug trap instruction which causes debuggers to break there. + \\This function inserts a platform-specific debug trap instruction which causes debuggers to break there. Unlike for `@trap()`, execution may continue after this point if the program is resumed. \\ \\This function is only valid within function scope. , @@ -1861,6 +1861,17 @@ pub const builtins = [_]Builtin{ , .arguments = &.{}, }, + .{ + .name = "@trap", + .signature = "@trap() noreturn", + .snippet = "@trap()", + .documentation = + \\This function inserts a platform-specific trap/jam instruction which can be used to exit the program abnormally. This may be implemented by explicitly emitting an invalid instruction which may cause an illegal instruction exception of some sort. Unlike for `@breakpoint()`, execution does not continue after this point. + \\ + \\Outside function scope, this builtin causes a compile error. + , + .arguments = &.{}, + }, .{ .name = "@truncate", .signature = "@truncate(comptime T: type, integer: anytype) T",