commit 84cf04469b98845635a3d8875851e929ca4ea993
parent 79c701e4fb2e9be46a9b17e131e1228d9e265116
Author: Sebastian <sebastian@sebsite.pw>
Date: Fri, 13 May 2022 22:43:31 -0400
docs: more accurate runtime.txt
Fixes syntax for function declarations, and fixes data field of slice
type.
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/runtime.txt b/docs/runtime.txt
@@ -1,9 +1,9 @@
harec expects the runtime to provide some features under the "rt" namespace.
-fn @noreturn rt::abort(msg: str) void
+@noreturn @symbol("rt.abort") fn _abort(msg: str) void;
Print a diagnostic message and terminate the program.
-fn @noreturn rt::abort_fixed(reason: int) void
+@noreturn fn abort_fixed(reason: int) void;
Print a diagnostic message from a list of pre-determined abort reasons,
and terminate the program. The list of reasons are:
@@ -33,7 +33,7 @@ field accordingly. "unensure" is called when the space is no longer needed, and
should shrink the allocation as appropriate.
type slice = struct {
- data: *void,
+ data: nullable *void,
length: size,
capacity: size,
};