From 3aefa8c728c9469cf24657bfa779ac0e2531d465 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Tue, 30 Jul 2024 20:58:42 +0200 Subject: [PATCH] Updated information about builtin functions. --- src/content/docs/references/docs/builtins.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/content/docs/references/docs/builtins.md b/src/content/docs/references/docs/builtins.md index 4a73659..66c176e 100644 --- a/src/content/docs/references/docs/builtins.md +++ b/src/content/docs/references/docs/builtins.md @@ -9,7 +9,7 @@ name prefix. ## Builtin constants -These can all safely be used by the user. +These constants are generated by the compiler and can safely be used by the user. #### $$BENCHMARK_NAMES An array of names of the benchmark functions. @@ -46,14 +46,18 @@ The current module name. The current time. -## Builtin functions +## Compiler builtin functions -These functions are *not guaranteed* to exist on all platforms. They are intended for standard library -internal use, and typically the standard library has macros that wrap these builtins, so they should not be used on its own. +The `$$` namespace defines *compiler builtin functions*. +These special functions are __not guaranteed__ to exist on +all platforms, and are ways to wrap compiler implemented, optimized implementations +of some particular functionality. They are mainly intended for standard +library *internal* use. The standard library have macros +that wrap these builtins, so they should normally not be used on their own. #### $$trap -Emits a trap instruction. +Emits a trap instruction. #### $$unreachable @@ -61,7 +65,7 @@ Inserts an "unreachable" annotation. #### $$stacktrace -Returns the current "callstack" reference if available. Compiler dependent. +Returns the current "callstack" reference if available. OS and compiler dependent. #### $$volatile_store