Skip to content

Commit

Permalink
Updated information about builtin functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Jul 30, 2024
1 parent ef402e8 commit 3aefa8c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/content/docs/references/docs/builtins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -46,22 +46,26 @@ 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

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

Expand Down

0 comments on commit 3aefa8c

Please sign in to comment.