cstr int nat nat32 nat16 nat8 float bool err blank char any eq neq not Number is_different neg add mul div mod lt gt le ge sub pow console unsafe_console print nn supports_ansi colors set exists bits lshift rshift xor band bor bnot tochar slice mask of range mutget get KB MB GB alloc resize last len new bucket_contents bucket arena allocated status circular list unsafe_alloc at char_allocator strdat str copy copy_null_terminated unsafe_temp endpos revalidate starts_with ends_with contains find empty is_number ok printf rotl splitmix64 Rand next Hashable hash to_hash_base robinhood_str_entry robinhood_nat_entry robinhood_entry raw is_zero strmap natmap unpack post abs sqrt sin cos log tan floor asin acos atan exp isnan isinf vec mat sparse_element coo float_allocator constvec reduce dot sum mean min max var std self accumulator append pearson rows cols constmat mutvec row nnz todense matrix tagged unsafe_match unsafe_defer_free tagged_alloc match pipe mutex_size unsafe_pipe_lock unsafe_pipe_unlock with system_thread unsafe_spawn join cpu growing_thread_pool thread unsafe_pipe_match unsafe_pipe_defer_free unsafe_pipe_mutax_init pipe_alloc shared unsafe_blob blob as find_compatible_size realloc free zero dereference_ptr color position size unsafe_open_window window is_open unsafe_begin_drawing unsafe_end_drawing draw clear text sleep TextureData Texture open texture circ ellipse line rect tri dt uptime key_down key_pressed key_released mouse_pos mouse_down mouse_pressed mouse_wheel KEY_NULL KEY_APOSTROPHE KEY_COMMA KEY_MINUS KEY_PERIOD KEY_SLASH KEY_ZERO KEY_ONE KEY_TWO KEY_THREE KEY_FOUR KEY_FIVE KEY_SIX KEY_SEVEN KEY_EIGHT KEY_NINE KEY_SEMICOLON KEY_EQUAL KEY_A KEY_B KEY_C KEY_D KEY_E KEY_F KEY_G KEY_H KEY_I KEY_J KEY_K KEY_L KEY_M KEY_N KEY_O KEY_P KEY_Q KEY_R KEY_S KEY_T KEY_U KEY_V KEY_W KEY_X KEY_Y KEY_Z KEY_LEFT_BRACKET KEY_BACKSLASH KEY_RIGHT_BRACKET KEY_GRAVE KEY_SPACE KEY_ESCAPE KEY_ENTER KEY_TAB KEY_BACKSPACE KEY_INSERT KEY_DELETE KEY_RIGHT KEY_LEFT KEY_DOWN KEY_UP KEY_PAGE_UP KEY_PAGE_DOWN KEY_HOME KEY_END KEY_CAPS_LOCK KEY_SCROLL_LOCK KEY_NUM_LOCK KEY_PRINT_SCREEN KEY_PAUSE KEY_F1 KEY_F2 KEY_F3 KEY_F4 KEY_F5 KEY_F6 KEY_F7 KEY_F8 KEY_F9 KEY_F10 KEY_F11 KEY_F12 KEY_LEFT_SHIFT KEY_LEFT_CONTROL KEY_LEFT_ALT KEY_LEFT_SUPER KEY_RIGHT_SHIFT KEY_RIGHT_CONTROL KEY_RIGHT_ALT KEY_RIGHT_SUPER KEY_KB_MENU KEY_KP_0 KEY_KP_1 KEY_KP_2 KEY_KP_3 KEY_KP_4 KEY_KP_5 KEY_KP_6 KEY_KP_7 KEY_KP_8 KEY_KP_9 KEY_KP_DECIMAL KEY_KP_DIVIDE KEY_KP_MULTIPLY KEY_KP_SUBTRACT KEY_KP_ADD KEY_KP_ENTER KEY_KP_EQUAL KEY_BACK KEY_MENU KEY_VOLUME_UP KEY_VOLUME_DOWN NumberOrPtr to_number already_defined String run print_marker restore_stdout stdout_to_err assert test time

cstr

cstr - constant string

Defined in: builtins line 1

cstr

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 218

cstr(cstr cstr, str) -> (cstr)

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 3

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 218

cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 218

cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

cstr - a cstr description of an error code

Defined in: std/core/error.s line 19

cstr(last_error) -> (cstr)

Error codes should not be compared numerically against given numbers, as their numbering changes for different programs. Instead, they should be converted to a cstr string with this function, which can then be compared. This comparison is also one numerical comparison, as care is taken for all cstr to point to the same memory location.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

int

int - a signed integer value

Defined in: builtins line 1

int

Represents values in the range 2^-63 to 2^63-1.

int - cast to int

Defined in: std/core/convert.s line 75

int(bits {tag, nat value}) -> (int)

Converts a bit representation to the corresponding integer.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

int - cast to int

Defined in: std/core/convert.s line 27

int(nat) -> (int)

Overflows are mapped to negative integers without any numerical safeguards.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 7

int - cast to int

Defined in: std/core/convert.s line 27

int(int) -> (int)

Serves as a tautology function for code that parses on multiple number types.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 7

int - cast to int

Defined in: std/core/convert.s line 27

int(float) -> (int)

May lose information due to truncating.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 7

int - converts a string to an integer

Defined in: std/core/convertstr.s line 148

int(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (int)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 62
  • Transpiled C size: 604

Potential errors

  1. null pointer
  2. invalid int conversion from empty string
  3. invalid int conversion from string with only a sign
  4. invalid integer int from non-number string
  5. out of bounds

int - converts a string to an integer

Defined in: std/core/convertstr.s line 148

int(cstr) -> (int)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 58
  • Transpiled C size: 598

Potential errors

  1. null pointer
  2. invalid int conversion from empty string
  3. invalid int conversion from string with only a sign
  4. invalid integer int from non-number string
  5. out of bounds

int - reads an integer from the console

Defined in: std/core/convertstr.s line 36

int(console {tag}) -> (int)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 50
  • Transpiled C size: 527

Potential errors

  1. user input was not a float
  2. null pointer
  3. out of bounds
  4. unexpected end of console read

nat

nat - an unsigned integer value

Defined in: builtins line 1

nat

Represents values in the range 0 to 2^64-1.

nat - retrieved unsigned number from lesser-bit unsigned number

Defined in: std/core/convert.s line 170

nat(nat32) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

nat - retrieved unsigned number from lesser-bit unsigned number

Defined in: std/core/convert.s line 170

nat(nat16) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

nat - retrieved unsigned number from lesser-bit unsigned number

Defined in: std/core/convert.s line 170

nat(nat8) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

nat - cast to nat

Defined in: std/core/convert.s line 70

nat(bits {tag, nat value}) -> (nat)

Converts a bit representation to the corresponding natural number.

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

nat - cast to nat

Defined in: std/core/convert.s line 35

nat(nat) -> (nat)

Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 7

nat - cast to nat

Defined in: std/core/convert.s line 35

nat(int) -> (nat)

Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 42

Potential errors

  1. cannot convert negative int to nat

nat - cast to nat

Defined in: std/core/convert.s line 35

nat(float) -> (nat)

Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 42

Potential errors

  1. cannot convert negative float to nat

nat - converts a string to an unsigned integer

Defined in: std/core/convertstr.s line 171

nat(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (nat)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 329

Potential errors

  1. invalid nat conversion from non-number string
  2. null pointer
  3. invalid nat conversion from empty string
  4. out of bounds

nat - converts a string to an unsigned integer

Defined in: std/core/convertstr.s line 171

nat(cstr) -> (nat)

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 323

Potential errors

  1. invalid nat conversion from non-number string
  2. null pointer
  3. invalid nat conversion from empty string
  4. out of bounds

nat - reads an unsigned integer from the console

Defined in: std/core/convertstr.s line 60

nat(console {tag}) -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 390

Potential errors

  1. user input was not a float
  2. null pointer
  3. out of bounds

nat32

nat32 - a 32-bit unsigned integer value

Defined in: builtins line 1

nat32

Represents values in the range 0 to 2^32-1.

nat32 - retrieved 32-bit unsigned number from lesser-bit unsigned number

Defined in: std/core/convert.s line 175

nat32(nat16) -> (nat32)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

nat32 - retrieved 32-bit unsigned number from lesser-bit unsigned number

Defined in: std/core/convert.s line 175

nat32(nat8) -> (nat32)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

nat32 - convert unsigned number to 32-bit unsigned number

Defined in: std/core/convert.s line 162

nat32(nat x, "truncate") -> (nat32)

The conversion truncates the given input, if it would not fit. For example, 4294967295 becomes 1.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [x%4294967295]

nat32 - convert unsigned number to 32-bit unsigned number

Defined in: std/core/convert.s line 154

nat32(nat) -> (nat32)

The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 34

Potential errors

  1. nat value too large to pack in nat32

nat16

nat16 - a 16-bit unsigned integer value

Defined in: builtins line 1

nat16

Represents values in the range 0 to 2^16-1.

nat16 - retrieved 16-bit unsigned number from lesser-bit unsigned number

Defined in: std/core/convert.s line 180

nat16(nat8) -> (nat16)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

nat16 - convert unsigned number to 16-bit unsigned number

Defined in: std/core/convert.s line 147

nat16(nat x, "truncate") -> (nat16)

This conversion truncates the given input, if it would not fit. For example, 65536 becomes 1.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

nat16 - convert unsigned number to 16-bit unsigned number

Defined in: std/core/convert.s line 139

nat16(nat) -> (nat16)

The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 34

Potential errors

  1. nat value too large to pack in nat16

nat8

nat8 - a 8-bit unsigned integer value

Defined in: builtins line 1

nat8

Represents values in the range 0 to 255.

nat8 - convert a character to 8-bit unsigned number

Defined in: std/core/convert.s line 132

nat8(char) -> (nat8)

The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

nat8 - convert unsigned number to 8-bit unsigned number

Defined in: std/core/convert.s line 120

nat8(nat) -> (nat8)

The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 34

Potential errors

  1. nat value too large to pack in nat8

float

float

Defined in: builtins line 1

float

float - cast to float

Defined in: std/core/convert.s line 81

float(bits {tag, nat value}) -> (float)

Converts a bit representation to the corresponding float number.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 18

float - cast to float

Defined in: std/core/convert.s line 20

float(nat) -> (float)

May lose information because floats are not exact representation of all integers.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

float - cast to float

Defined in: std/core/convert.s line 20

float(int) -> (float)

May lose information because floats are not exact representation of all integers.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

float - cast to float

Defined in: std/core/convert.s line 20

float(float) -> (float)

Serves as a tautology function for code that parses on multiple number types.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

float - converts a string to a float

Defined in: std/core/convertstr.s line 183

float(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (float)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 89
  • Transpiled C size: 928

Potential errors

  1. null pointer
  2. out of bounds
  3. invalid float conversion from empty string
  4. invalid float conversion from string with only a sign
  5. invalid float conversion from non-number string
  6. invalid float conversion from string without a value after the dot

float - converts a string to a float

Defined in: std/core/convertstr.s line 183

float(cstr) -> (float)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 85
  • Transpiled C size: 922

Potential errors

  1. null pointer
  2. out of bounds
  3. invalid float conversion from empty string
  4. invalid float conversion from string with only a sign
  5. invalid float conversion from non-number string
  6. invalid float conversion from string without a value after the dot

float - reads a float from the console

Defined in: std/core/convertstr.s line 80

float(console {tag}) -> (float)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 67
  • Transpiled C size: 722

Potential errors

  1. user input was not a float
  2. null pointer
  3. out of bounds
  4. unexpected end of console read

bool

bool - boolean value

Defined in: builtins line 1

bool

Can only be true or false.

err

err

Defined by the compiler

err

blank

blank - empty tuple

Defined in: builtins line 1

blank() -> ()

This is the type of non-existent variables, empty parantheses, and functions of no returns.

char

char - a character

Defined in: builtins line 1

char

Represents characters in the numeric range 0 to 255.

char - treat as character

Defined in: std/core/string.s line 115

char(cstr) -> (char)

The first character of a string is extracted, for example to write c = char "C".

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 20

char - treat as character

Defined in: std/core/string.s line 109

char(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (char)

The first character of a string is extracted, for example to write c = char str "C".

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

char

Defined in: std/core/convertstr.s line 24

char(console {tag}) -> (char)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 34

Potential errors

  1. unexpected end of console read

any

any - any type

Defined in: builtins line 1

any() -> ()

Represents a generic for buffers and pointers for type-independent code that can be matched to a concrete type later. This type ordains special treatment by the compiler.

eq

eq - equals

Defined in: std/core/bool.s line 51

eq(false, true) -> (false)

This is a compile-time operation that does not evoke any runtime booleans.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 9

eq - equals

Defined in: std/core/bool.s line 46

eq(true, false) -> (false)

This is a compile-time operation that does not evoke any runtime booleans.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 9

eq - equals

Defined in: std/core/bool.s line 41

eq(false, false) -> (true)

This is a compile-time operation that does not evoke any runtime booleans.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 9

eq - equals

Defined in: std/core/bool.s line 36

eq(true, true) -> (true)

This is a compile-time operation that does not evoke any runtime booleans.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 9

eq - equals

Defined in: std/core/bool.s line 20

eq(bool x, bool y) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 9

eq - equals

Defined in: std/core/numbers.s line 56

eq(any ptr x, any ptr y) -> (bool)

Compares the address of two pointers.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

eq - equals

Defined in: std/core/numbers.s line 40

eq(last_error x, last_error y) -> (bool)

Compares two error messages. This comparison is used only for comparing error messages produced by the same running program.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

eq - equals

Defined in: std/core/numbers.s line 26

eq(nat x, nat y) -> (bool)

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

eq - equals

Defined in: std/core/numbers.s line 26

eq(int x, int y) -> (bool)

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

eq - equals

Defined in: std/core/numbers.s line 26

eq(float x, float y) -> (bool)

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

eq - equals

Defined in: std/core/bool.s line 82

eq(bool value, false) -> (bool)

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

eq - equals

Defined in: std/core/bool.s line 78

eq(false, bool value) -> (bool)

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

eq - equals

Defined in: std/core/bool.s line 74

eq(bool value, true) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

eq - equals

Defined in: std/core/bool.s line 70

eq(true, bool value) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

eq - equals

Defined in: std/core/string.s line 295

eq(cstr x, str) -> (bool)

Complexity

  • Level of abstraction: 1 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 77

eq - equals

Defined in: std/core/string.s line 289

eq(str, cstr y) -> (bool)

Complexity

  • Level of abstraction: 1 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 77

eq - equals

Defined in: std/core/string.s line 261

eq(str, str) -> (bool)

This implementation avoids indirection by checking for the first string character first, which will typically be stored only one indirection away instead of two, and is thus very friendly to CPU cache usage when manipulating strings.

It is interesting to consider what happens should the memory surfaces where strings are stored be corrupted by replacing string data while the string is still used in code (this is a logical bug but memory-safe). In that case, two strings could have the exact same contents but be deemed not equal to each other. This contradiction occurs only when active strings are overwritten with new data, and is in fact a good way to check for logical inconsistencies. In the rare cases where you want to guarantee the outcome of this equality under data corruptions use eq(revalidate x, revalidate y) to re-retrieve the first characters. This is still faster than full comparison of large strings, given that most string comparisons yield false.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 18
  • Transpiled C size: 105

eq - equals

Defined in: std/core/string.s line 252

eq(cstr x, cstr y) -> (bool)

Comparing two cstrs is as simple as comparing their addresses, so this operation is exceedingly lightweight and a convenient means for checking for runtime tags. The compier enforces that two same-content cstr will always have the same memory address.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

eq - equals

Defined in: std/core/string.s line 122

eq(char x, char y) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 63

eq(int ptr _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 63

eq(float ptr _x, float _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 63

eq(float ptr _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 43

eq(cstr ptr x, cstr ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 61

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 43

eq(cstr ptr x, str ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 103

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 43

eq(str ptr x, cstr ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 103

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 43

eq(str ptr x, str ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 145

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 39

eq(cstr x, cstr ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 37

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 39

eq(cstr x, str ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 79

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 39

eq(str, cstr ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 43

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 39

eq(str, str ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 85

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 35

eq(cstr ptr x, cstr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 37

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 35

eq(cstr ptr x, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 43

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 35

eq(str ptr x, cstr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 79

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 35

eq(str ptr x, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 85

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 63

eq(nat _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 63

eq(int _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 63

eq(float _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 63

eq(nat ptr _x, nat _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 63

eq(nat ptr _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

eq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 63

eq(int ptr _x, int _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

neq

neq - not equal

Defined in: std/core/bool.s line 25

neq(bool x, bool y) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 9

neq - not equal

Defined in: std/core/numbers.s line 48

neq(last_error x, last_error y) -> (bool)

Compares two error messages. This comparison is used only for comparing error messages produced by the same running program.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

neq - not equal

Defined in: std/core/numbers.s line 33

neq(nat x, nat y) -> (bool)

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

neq - not equal

Defined in: std/core/numbers.s line 33

neq(int x, int y) -> (bool)

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

neq - not equal

Defined in: std/core/numbers.s line 33

neq(float x, float y) -> (bool)

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

neq - not equal

Defined in: std/core/bool.s line 90

neq(bool x, false y) -> (bool)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 21

neq - not equal

Defined in: std/core/bool.s line 90

neq(bool x, true y) -> (bool)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 21

neq - not equal

Defined in: std/core/bool.s line 86

neq(false x, bool y) -> (bool)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 21

neq - not equal

Defined in: std/core/bool.s line 86

neq(true x, bool y) -> (bool)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 21

neq - not equal

Defined in: std/core/bool.s line 66

neq(false x, false y) -> (false)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 21

neq - not equal

Defined in: std/core/bool.s line 66

neq(false x, true y) -> (true)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 21

neq - not equal

Defined in: std/core/bool.s line 66

neq(true x, false y) -> (true)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 21

neq - not equal

Defined in: std/core/bool.s line 66

neq(true x, true y) -> (false)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 21

neq - not equal

Defined in: std/unsafe.s line 19

neq(any ptr x, any ptr y) -> (bool)

Compares the address of two pointers.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

neq - not equals

Defined in: std/core/string.s line 301

neq(cstr x, cstr y) -> (bool)

Negates the outcome of equality checks between cstr and strings.

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 21

neq - not equals

Defined in: std/core/string.s line 301

neq(cstr x, str) -> (bool)

Negates the outcome of equality checks between cstr and strings.

Complexity

  • Level of abstraction: 1 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 27

neq - not equals

Defined in: std/core/string.s line 301

neq(str, cstr y) -> (bool)

Negates the outcome of equality checks between cstr and strings.

Complexity

  • Level of abstraction: 1 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 27

neq - not equals

Defined in: std/core/string.s line 301

neq(str, str) -> (bool)

Negates the outcome of equality checks between cstr and strings.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 33

neq - not equals

Defined in: std/core/string.s line 127

neq(char x, char y) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 55

neq(cstr ptr x, cstr ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 61

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 55

neq(cstr ptr x, str ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 10 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 103

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 55

neq(str ptr x, cstr ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 10 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 103

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 55

neq(str ptr x, str ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 145

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 51

neq(cstr x, cstr ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 37

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 51

neq(cstr x, str ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 10 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 79

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 51

neq(str, cstr ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 10 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 43

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 51

neq(str, str ptr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 85

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 47

neq(cstr ptr x, cstr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 37

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 47

neq(cstr ptr x, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 10 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 43

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 47

neq(str ptr x, cstr y) -> (bool)

Complexity

  • Level of abstraction: 0 to 10 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 79

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 47

neq(str ptr x, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 85

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 73

neq(nat _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 73

neq(int _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 73

neq(float _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 73

neq(nat ptr _x, nat _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 73

neq(nat ptr _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 73

neq(int ptr _x, int _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 73

neq(int ptr _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 73

neq(float ptr _x, float _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

neq - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 73

neq(float ptr _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

not

not - logical inverse

Defined in: std/core/bool.s line 61

not(false) -> (true)

This is a compile-time operation on the compiler::false type rather than a runtime boolean.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 9

not - logical inverse

Defined in: std/core/bool.s line 56

not(true) -> (false)

This is a compile-time operation on the compiler::true type rather than a runtime boolean.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 9

not - logical inverse

Defined in: std/core/bool.s line 30

not(bool) -> (bool)

This operates on boolean values at runtime.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 14

Number

nat - an unsigned integer value

Defined in: builtins line 1

nat

Represents values in the range 0 to 2^64-1.

float

Defined in: builtins line 1

float

int - a signed integer value

Defined in: builtins line 1

int

Represents values in the range 2^-63 to 2^63-1.

is_different

is_different

Defined in: std/core/numbers.s line 23

is_different(nat x, nat y) -> (false)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

is_different

Defined in: std/core/numbers.s line 23

is_different(nat x, int y) -> (true)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

is_different

Defined in: std/core/numbers.s line 23

is_different(nat x, float y) -> (true)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

is_different

Defined in: std/core/numbers.s line 23

is_different(int x, nat y) -> (true)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

is_different

Defined in: std/core/numbers.s line 23

is_different(int x, int y) -> (false)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

is_different

Defined in: std/core/numbers.s line 23

is_different(int x, float y) -> (true)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

is_different

Defined in: std/core/numbers.s line 23

is_different(float x, nat y) -> (true)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

is_different

Defined in: std/core/numbers.s line 23

is_different(float x, int y) -> (true)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

is_different

Defined in: std/core/numbers.s line 23

is_different(float x, float y) -> (false)

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

neg

neg - negative of a number

Defined in: std/core/numbers.s line 62

neg(nat) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 11

neg - negative of a number

Defined in: std/core/numbers.s line 62

neg(int) -> (int)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 11

neg - negative of a number

Defined in: std/core/numbers.s line 62

neg(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 11

add

add - add

Defined in: std/core/numbers.s line 67

add(nat x, nat y) -> (nat)

Adds two numbers of the same type. This is an overload for the + operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

add - add

Defined in: std/core/numbers.s line 67

add(int x, int y) -> (int)

Adds two numbers of the same type. This is an overload for the + operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

add - add

Defined in: std/core/numbers.s line 67

add(float x, float y) -> (float)

Adds two numbers of the same type. This is an overload for the + operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

add - pointer addition

Defined in: std/unsafe.s line 66

add(any ptr allocated, nat offset) -> (any ptr {follows any ptr allocated})

Adds a natural number offset to a pointer.

Warning: Its usage in unsafe and guarded under std/unsafe.s.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

add - concatenate two strings

Defined in: std/core/string.s line 458

add(edit arena, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation ensures that consecutively allocated strings, or adding to strings placed at the end of buffers, does not needlessly copy memory. This way, consecutive additions do not copy the previous result before appending to it. For example, consider the following:

import std.core
def main()
    CLI = edit console()
    CHARS = edit arena alloc 10
    s1 = copy 123
    s2 = copy 456
    s3 = s1+s2
    print s3+copy(78)+copy(9)

The snippet fits the result in a contiguous area on the arena’s buffer, with only one copying operation for each character. This does not magically optimize all copying operations, but it does makes most convenient optimizatins when allocating and immediately concatenating.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 164
  • Transpiled C size: 980

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 458

add(edit arena, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation ensures that consecutively allocated strings, or adding to strings placed at the end of buffers, does not needlessly copy memory. This way, consecutive additions do not copy the previous result before appending to it. For example, consider the following:

import std.core
def main()
    CLI = edit console()
    CHARS = edit arena alloc 10
    s1 = copy 123
    s2 = copy 456
    s3 = s1+s2
    print s3+copy(78)+copy(9)

The snippet fits the result in a contiguous area on the arena’s buffer, with only one copying operation for each character. This does not magically optimize all copying operations, but it does makes most convenient optimizatins when allocating and immediately concatenating.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 168
  • Transpiled C size: 986

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 458

add(edit arena, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation ensures that consecutively allocated strings, or adding to strings placed at the end of buffers, does not needlessly copy memory. This way, consecutive additions do not copy the previous result before appending to it. For example, consider the following:

import std.core
def main()
    CLI = edit console()
    CHARS = edit arena alloc 10
    s1 = copy 123
    s2 = copy 456
    s3 = s1+s2
    print s3+copy(78)+copy(9)

The snippet fits the result in a contiguous area on the arena’s buffer, with only one copying operation for each character. This does not magically optimize all copying operations, but it does makes most convenient optimizatins when allocating and immediately concatenating.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 168
  • Transpiled C size: 986

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 458

add(edit arena, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation ensures that consecutively allocated strings, or adding to strings placed at the end of buffers, does not needlessly copy memory. This way, consecutive additions do not copy the previous result before appending to it. For example, consider the following:

import std.core
def main()
    CLI = edit console()
    CHARS = edit arena alloc 10
    s1 = copy 123
    s2 = copy 456
    s3 = s1+s2
    print s3+copy(78)+copy(9)

The snippet fits the result in a contiguous area on the arena’s buffer, with only one copying operation for each character. This does not magically optimize all copying operations, but it does makes most convenient optimizatins when allocating and immediately concatenating.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 172
  • Transpiled C size: 992

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit list, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 104
  • Transpiled C size: 483

Potential errors

  1. division by zero
  2. reallocation failed
  3. cannot resize an unallocated or freed buffer
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit list, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 108
  • Transpiled C size: 489

Potential errors

  1. division by zero
  2. reallocation failed
  3. cannot resize an unallocated or freed buffer
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit list, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 108
  • Transpiled C size: 489

Potential errors

  1. division by zero
  2. reallocation failed
  3. cannot resize an unallocated or freed buffer
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit list, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 112
  • Transpiled C size: 495

Potential errors

  1. division by zero
  2. reallocation failed
  3. cannot resize an unallocated or freed buffer
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit circular, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 104
  • Transpiled C size: 483

Potential errors

  1. arena is out of space
  2. does not fit in circular arena
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit circular, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 108
  • Transpiled C size: 489

Potential errors

  1. arena is out of space
  2. does not fit in circular arena
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit circular, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 108
  • Transpiled C size: 489

Potential errors

  1. arena is out of space
  2. does not fit in circular arena
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit circular, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 112
  • Transpiled C size: 495

Potential errors

  1. arena is out of space
  2. does not fit in circular arena
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit bucket, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 99
  • Transpiled C size: 471

Potential errors

  1. null pointer
  2. allocation failed
  3. reallocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. arena is out of space
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit bucket, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 103
  • Transpiled C size: 477

Potential errors

  1. null pointer
  2. allocation failed
  3. reallocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. arena is out of space
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit bucket, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 103
  • Transpiled C size: 477

Potential errors

  1. null pointer
  2. allocation failed
  3. reallocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. arena is out of space
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(edit bucket, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 107
  • Transpiled C size: 483

Potential errors

  1. null pointer
  2. allocation failed
  3. reallocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. arena is out of space
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers

add - concatenate two strings

Defined in: std/core/string.s line 432

add(new CHARS, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 100
  • Transpiled C size: 492

Potential errors

  1. allocation failed

defered calls

free(mut any ptr) -> ()

add - concatenate two strings

Defined in: std/core/string.s line 432

add(new CHARS, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 104
  • Transpiled C size: 498

Potential errors

  1. allocation failed

defered calls

free(mut any ptr) -> ()

add - concatenate two strings

Defined in: std/core/string.s line 432

add(new CHARS, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 104
  • Transpiled C size: 498

Potential errors

  1. allocation failed

defered calls

free(mut any ptr) -> ()

add - concatenate two strings

Defined in: std/core/string.s line 432

add(new CHARS, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 108
  • Transpiled C size: 504

Potential errors

  1. allocation failed

defered calls

free(mut any ptr) -> ()

add - vector addition

Defined in: std/sci/vec.s line 93

add(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 49

Potential errors

  1. does not fit in circular arena
  2. null pointer
  3. can only place vectors on contiguous buffers
  4. cannot place vectors on buffer offsets

add - vector addition

Defined in: std/sci/vec.s line 93

add(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 49

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. arena is out of space

add - vector addition

Defined in: std/sci/vec.s line 93

add(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 34

Potential errors

  1. allocation failed
  2. null pointer

add - vector addition

Defined in: std/sci/vec.s line 82

add(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 225

Potential errors

  1. does not fit in circular arena
  2. null pointer
  3. can only place vectors on contiguous buffers
  4. cannot place vectors on buffer offsets

add - vector addition

Defined in: std/sci/vec.s line 82

add(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 263

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. does not fit in circular arena

add - vector addition

Defined in: std/sci/vec.s line 82

add(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 225

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. arena is out of space

add - vector addition

Defined in: std/sci/vec.s line 82

add(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 263

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. arena is out of space

add - vector addition

Defined in: std/sci/vec.s line 82

add(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 210

Potential errors

  1. allocation failed
  2. null pointer

add - vector addition

Defined in: std/sci/vec.s line 82

add(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 248

Potential errors

  1. allocation failed
  2. null pointer
  3. different vector sizes

add - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 83

add(nat _x, nat ptr _y) -> (nat)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

add - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 83

add(int _x, int ptr _y) -> (int)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

add - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 83

add(float _x, float ptr _y) -> (float)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

add - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 83

add(nat ptr _x, nat _y) -> (nat)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

add - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 83

add(nat ptr _x, nat ptr _y) -> (nat)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

add - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 83

add(int ptr _x, int _y) -> (int)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

add - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 83

add(int ptr _x, int ptr _y) -> (int)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

add - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 83

add(float ptr _x, float _y) -> (float)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

add - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 83

add(float ptr _x, float ptr _y) -> (float)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

mul

mul - multiply with

Defined in: std/core/numbers.s line 75

mul(nat x, nat y) -> (nat)

Multiplies two numbers of the same type. This is an overload for the * operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

mul - multiply with

Defined in: std/core/numbers.s line 75

mul(int x, int y) -> (int)

Multiplies two numbers of the same type. This is an overload for the * operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

mul - multiply with

Defined in: std/core/numbers.s line 75

mul(float x, float y) -> (float)

Multiplies two numbers of the same type. This is an overload for the * operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

mul - vector multiplication

Defined in: std/sci/vec.s line 129

mul(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 49

Potential errors

  1. does not fit in circular arena
  2. null pointer
  3. can only place vectors on contiguous buffers
  4. cannot place vectors on buffer offsets

mul - vector multiplication

Defined in: std/sci/vec.s line 129

mul(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 49

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. arena is out of space

mul - vector multiplication

Defined in: std/sci/vec.s line 129

mul(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 34

Potential errors

  1. allocation failed
  2. null pointer

mul - vector multiplication

Defined in: std/sci/vec.s line 118

mul(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 225

Potential errors

  1. does not fit in circular arena
  2. null pointer
  3. can only place vectors on contiguous buffers
  4. cannot place vectors on buffer offsets

mul - vector multiplication

Defined in: std/sci/vec.s line 118

mul(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 263

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. does not fit in circular arena

mul - vector multiplication

Defined in: std/sci/vec.s line 118

mul(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 225

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. arena is out of space

mul - vector multiplication

Defined in: std/sci/vec.s line 118

mul(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 263

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. arena is out of space

mul - vector multiplication

Defined in: std/sci/vec.s line 118

mul(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 210

Potential errors

  1. allocation failed
  2. null pointer

mul - vector multiplication

Defined in: std/sci/vec.s line 118

mul(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 248

Potential errors

  1. allocation failed
  2. null pointer
  3. different vector sizes

mul - sparse*dense matrix multiplication

Defined in: std/sci/coo.s line 79

mul(edit arena, coo, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 62
  • Transpiled C size: 521

Potential errors

  1. null pointer
  2. can only place matrices on contiguous buffers
  3. cannot place matrices on buffer offsets
  4. row out of bounds
  5. column out of bounds
  6. inner dimensions must agree
  7. arena is out of space

mul - sparse*dense matrix multiplication

Defined in: std/sci/coo.s line 79

mul(new FLOATS, coo, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 56
  • Transpiled C size: 506

Potential errors

  1. null pointer
  2. row out of bounds
  3. column out of bounds
  4. inner dimensions must agree
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

mul - vector*sparse matrix multiplication

Defined in: std/sci/coo.s line 69

mul(edit circular, vec, coo) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

*Warning: the expression self(v)*m yields wrong values

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 46
  • Transpiled C size: 388

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. does not fit in circular arena
  6. vector length must match matrix rows

mul - vector*sparse matrix multiplication

Defined in: std/sci/coo.s line 69

mul(edit arena, vec, coo) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

*Warning: the expression self(v)*m yields wrong values

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 46
  • Transpiled C size: 388

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. arena is out of space
  6. vector length must match matrix rows

mul - vector*sparse matrix multiplication

Defined in: std/sci/coo.s line 69

mul(new FLOATS, vec, coo) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

*Warning: the expression self(v)*m yields wrong values

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 373

Potential errors

  1. allocation failed
  2. null pointer
  3. out of bounds
  4. vector length must match matrix rows

mul - sparse matrix*vector multiplication

Defined in: std/sci/coo.s line 61

mul(edit circular, coo, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 388

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. does not fit in circular arena
  6. matrix columns must match vector length

mul - sparse matrix*vector multiplication

Defined in: std/sci/coo.s line 61

mul(edit arena, coo, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 388

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. arena is out of space
  6. matrix columns must match vector length

mul - sparse matrix*vector multiplication

Defined in: std/sci/coo.s line 61

mul(new FLOATS, coo, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 373

Potential errors

  1. allocation failed
  2. null pointer
  3. out of bounds
  4. matrix columns must match vector length

mul - matrix-matrix multiplication

Defined in: std/sci/mat.s line 123

mul(edit circular, mat, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Grabs an allocator for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 85
  • Transpiled C size: 599

Potential errors

  1. inner dimensions must agree
  2. null pointer
  3. does not fit in circular arena
  4. can only place matrices on contiguous buffers
  5. cannot place matrices on buffer offsets
  6. row out of bounds
  7. column out of bounds

mul - matrix-matrix multiplication

Defined in: std/sci/mat.s line 123

mul(edit arena, mat, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Grabs an allocator for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 85
  • Transpiled C size: 599

Potential errors

  1. inner dimensions must agree
  2. null pointer
  3. arena is out of space
  4. can only place matrices on contiguous buffers
  5. cannot place matrices on buffer offsets
  6. row out of bounds
  7. column out of bounds

mul - matrix-matrix multiplication

Defined in: std/sci/mat.s line 123

mul(new FLOATS, mat, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Grabs an allocator for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 79
  • Transpiled C size: 584

Potential errors

  1. inner dimensions must agree
  2. allocation failed
  3. null pointer
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. row out of bounds
  7. column out of bounds

defered calls

free(mut any ptr) -> ()

mul - vector-matrix multiplication

Defined in: std/sci/mat.s line 111

mul(edit circular, vec, mat) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs an allocator for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 60
  • Transpiled C size: 440

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. does not fit in circular arena
  6. vector length must match matrix rows

mul - vector-matrix multiplication

Defined in: std/sci/mat.s line 111

mul(edit arena, vec, mat) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs an allocator for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 60
  • Transpiled C size: 440

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. arena is out of space
  6. vector length must match matrix rows

mul - vector-matrix multiplication

Defined in: std/sci/mat.s line 111

mul(new FLOATS, vec, mat) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs an allocator for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 54
  • Transpiled C size: 425

Potential errors

  1. allocation failed
  2. null pointer
  3. out of bounds
  4. vector length must match matrix rows

mul - matrix-vector multiplication

Defined in: std/sci/mat.s line 99

mul(edit circular, mat, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs an allocator for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 60
  • Transpiled C size: 440

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. does not fit in circular arena
  6. matrix columns must match vector length

mul - matrix-vector multiplication

Defined in: std/sci/mat.s line 99

mul(edit arena, mat, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs an allocator for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 60
  • Transpiled C size: 440

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. arena is out of space
  6. matrix columns must match vector length

mul - matrix-vector multiplication

Defined in: std/sci/mat.s line 99

mul(new FLOATS, mat, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs an allocator for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 54
  • Transpiled C size: 425

Potential errors

  1. allocation failed
  2. null pointer
  3. matrix columns must match vector length
  4. out of bounds

mul - sparse*dense matrix multiplication

Defined in: std/sci/coo.s line 79

mul(edit circular, coo, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 62
  • Transpiled C size: 521

Potential errors

  1. null pointer
  2. can only place matrices on contiguous buffers
  3. cannot place matrices on buffer offsets
  4. row out of bounds
  5. column out of bounds
  6. inner dimensions must agree
  7. does not fit in circular arena

mul - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 103

mul(nat _x, nat ptr _y) -> (nat)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

mul - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 103

mul(int _x, int ptr _y) -> (int)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

mul - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 103

mul(float _x, float ptr _y) -> (float)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

mul - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 103

mul(nat ptr _x, nat _y) -> (nat)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

mul - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 103

mul(nat ptr _x, nat ptr _y) -> (nat)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

mul - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 103

mul(int ptr _x, int _y) -> (int)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

mul - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 103

mul(int ptr _x, int ptr _y) -> (int)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

mul - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 103

mul(float ptr _x, float _y) -> (float)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

mul - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 103

mul(float ptr _x, float ptr _y) -> (float)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

div

div - divide by

Defined in: std/core/numbers.s line 83

div(nat x, nat y) -> (nat)

Divides two numbers of the same type. This is an overload for the / operator. Safeguards against division by zero.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 46

Potential errors

  1. division by zero

div - divide by

Defined in: std/core/numbers.s line 83

div(nat x, nat y, "unsafe_assume_nonzero") -> (nat)

Divides two numbers of the same type. This is an overload for the / operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 19

div - divide by

Defined in: std/core/numbers.s line 83

div(int x, int y) -> (int)

Divides two numbers of the same type. This is an overload for the / operator. Safeguards against division by zero.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 46

Potential errors

  1. division by zero

div - divide by

Defined in: std/core/numbers.s line 83

div(int x, int y, "unsafe_assume_nonzero") -> (int)

Divides two numbers of the same type. This is an overload for the / operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 19

div - divide by

Defined in: std/core/numbers.s line 83

div(float x, float y) -> (float)

Divides two numbers of the same type. This is an overload for the / operator. Safeguards against division by zero.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 46

Potential errors

  1. division by zero

div - divide by

Defined in: std/core/numbers.s line 83

div(float x, float y, "unsafe_assume_nonzero") -> (float)

Divides two numbers of the same type. This is an overload for the / operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 19

div - vector division

Defined in: std/sci/vec.s line 167

div(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 226

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. division by zero
  5. does not fit in circular arena

div - vector division

Defined in: std/sci/vec.s line 167

div(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 226

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. division by zero
  5. arena is out of space

div - vector division

Defined in: std/sci/vec.s line 167

div(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 211

Potential errors

  1. allocation failed
  2. null pointer
  3. division by zero

div - vector division

Defined in: std/sci/vec.s line 155

div(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 240

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. division by zero
  5. does not fit in circular arena

div - vector division

Defined in: std/sci/vec.s line 155

div(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 278

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. division by zero
  6. does not fit in circular arena

div - vector division

Defined in: std/sci/vec.s line 155

div(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 240

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. division by zero
  5. arena is out of space

div - vector division

Defined in: std/sci/vec.s line 155

div(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 278

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. division by zero
  6. arena is out of space

div - vector division

Defined in: std/sci/vec.s line 155

div(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 31
  • Transpiled C size: 225

Potential errors

  1. allocation failed
  2. null pointer
  3. division by zero

div - vector division

Defined in: std/sci/vec.s line 155

div(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 35
  • Transpiled C size: 263

Potential errors

  1. allocation failed
  2. null pointer
  3. division by zero
  4. different vector sizes

div - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 113

div(float _x, float ptr _y) -> (float)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer
  2. division by zero

div - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 113

div(nat ptr _x, nat _y) -> (nat)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer
  2. division by zero

div - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 113

div(nat ptr _x, nat ptr _y) -> (nat)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 90

Potential errors

  1. null pointer
  2. division by zero

div - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 113

div(int ptr _x, int _y) -> (int)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer
  2. division by zero

div - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 113

div(int ptr _x, int ptr _y) -> (int)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 90

Potential errors

  1. null pointer
  2. division by zero

div - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 113

div(float ptr _x, float _y) -> (float)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer
  2. division by zero

div - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 113

div(float ptr _x, float ptr _y) -> (float)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 90

Potential errors

  1. null pointer
  2. division by zero

div - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 113

div(nat _x, nat ptr _y) -> (nat)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer
  2. division by zero

div - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 113

div(int _x, int ptr _y) -> (int)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer
  2. division by zero

mod

mod - modulo by

Defined in: std/core/numbers.s line 96

mod(nat x, nat y) -> (nat)

Computes the modulo between two natural numbers. This is an overload for the % operator.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 36

Potential errors

  1. modulo by zero

mod - modulo by

Defined in: std/core/numbers.s line 96

mod(nat x, nat y, "unsafe_assume_nonzero") -> (nat)

Computes the modulo between two natural numbers. This is an overload for the % operator.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

lt

lt - less than

Defined in: std/core/numbers.s line 106

lt(nat x, nat y) -> (bool)

Compares two numbers of the same type. This is an overload for the < operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

lt - less than

Defined in: std/core/numbers.s line 106

lt(int x, int y) -> (bool)

Compares two numbers of the same type. This is an overload for the < operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

lt - less than

Defined in: std/core/numbers.s line 106

lt(float x, float y) -> (bool)

Compares two numbers of the same type. This is an overload for the < operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

lt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 123

lt(nat _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

lt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 123

lt(int _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

lt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 123

lt(float _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

lt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 123

lt(nat ptr _x, nat _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

lt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 123

lt(nat ptr _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

lt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 123

lt(int ptr _x, int _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

lt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 123

lt(int ptr _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

lt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 123

lt(float ptr _x, float _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

lt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 123

lt(float ptr _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

gt

gt - Compares two numbers of the same type. This is an overload for the > operator.

Defined in: std/core/numbers.s line 114

gt(nat x, nat y) -> (bool)

greater than

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

gt - Compares two numbers of the same type. This is an overload for the > operator.

Defined in: std/core/numbers.s line 114

gt(int x, int y) -> (bool)

greater than

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

gt - Compares two numbers of the same type. This is an overload for the > operator.

Defined in: std/core/numbers.s line 114

gt(float x, float y) -> (bool)

greater than

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

gt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 133

gt(nat _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

gt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 133

gt(int _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

gt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 133

gt(float _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

gt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 133

gt(nat ptr _x, nat _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

gt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 133

gt(nat ptr _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

gt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 133

gt(int ptr _x, int _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

gt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 133

gt(int ptr _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

gt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 133

gt(float ptr _x, float _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

gt - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 133

gt(float ptr _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

le

le - less than or equal to

Defined in: std/core/numbers.s line 122

le(nat x, nat y) -> (bool)

Compares two numbers of the same type. This is an overload for the <= operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

le - less than or equal to

Defined in: std/core/numbers.s line 122

le(int x, int y) -> (bool)

Compares two numbers of the same type. This is an overload for the <= operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

le - less than or equal to

Defined in: std/core/numbers.s line 122

le(float x, float y) -> (bool)

Compares two numbers of the same type. This is an overload for the <= operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

le - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 143

le(nat _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

le - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 143

le(int _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

le - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 143

le(float _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

le - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 143

le(nat ptr _x, nat _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

le - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 143

le(nat ptr _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

le - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 143

le(int ptr _x, int _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

le - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 143

le(int ptr _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

le - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 143

le(float ptr _x, float _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

le - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 143

le(float ptr _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

ge

ge - greater than or equal to

Defined in: std/core/numbers.s line 130

ge(nat x, nat y) -> (bool)

Compares two numbers of the same type. This is an overload for the >= operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

ge - greater than or equal to

Defined in: std/core/numbers.s line 130

ge(int x, int y) -> (bool)

Compares two numbers of the same type. This is an overload for the >= operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

ge - greater than or equal to

Defined in: std/core/numbers.s line 130

ge(float x, float y) -> (bool)

Compares two numbers of the same type. This is an overload for the >= operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

ge - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 153

ge(nat _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

ge - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 153

ge(int _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

ge - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 153

ge(float _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

ge - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 153

ge(nat ptr _x, nat _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

ge - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 153

ge(nat ptr _x, nat ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

ge - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 153

ge(int ptr _x, int _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

ge - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 153

ge(int ptr _x, int ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

ge - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 153

ge(float ptr _x, float _y) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

ge - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 153

ge(float ptr _x, float ptr _y) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

sub

sub - subtract by

Defined in: std/core/numbers.s line 150

sub(nat x, nat y, "assume_smaller") -> (nat)

Subtracts two natural numbers without underflow check. This is an overload for the - operator, for example used like below. This overload never fails and instead adds 0xFFFFFFFFFFFFFFFF to the result if it would produce a negative.

0-(1 assume_smaller)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

sub - subtract by

Defined in: std/core/numbers.s line 138

sub(nat x, nat y) -> (nat)

Subtracts two numbers of the same type. This is an overload for the - operator. Natural numbers are safeguarded against acquiring negative results, which would overflow.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 42

Potential errors

  1. nat subtraction would yield a negative

sub - subtract by

Defined in: std/core/numbers.s line 138

sub(int x, int y) -> (int)

Subtracts two numbers of the same type. This is an overload for the - operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 19

sub - subtract by

Defined in: std/core/numbers.s line 138

sub(float x, float y) -> (float)

Subtracts two numbers of the same type. This is an overload for the - operator.

Complexity

  • Level of abstraction: 0 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 19

sub - vector subtraction

Defined in: std/sci/vec.s line 109

sub(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 215

Potential errors

  1. does not fit in circular arena
  2. null pointer
  3. can only place vectors on contiguous buffers
  4. cannot place vectors on buffer offsets

sub - vector subtraction

Defined in: std/sci/vec.s line 109

sub(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 215

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. arena is out of space

sub - vector subtraction

Defined in: std/sci/vec.s line 109

sub(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 27
  • Transpiled C size: 200

Potential errors

  1. allocation failed
  2. null pointer

sub - vector subtraction

Defined in: std/sci/vec.s line 98

sub(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 225

Potential errors

  1. does not fit in circular arena
  2. null pointer
  3. can only place vectors on contiguous buffers
  4. cannot place vectors on buffer offsets

sub - vector subtraction

Defined in: std/sci/vec.s line 98

sub(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 263

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. does not fit in circular arena

sub - vector subtraction

Defined in: std/sci/vec.s line 98

sub(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 225

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. arena is out of space

sub - vector subtraction

Defined in: std/sci/vec.s line 98

sub(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 263

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. arena is out of space

sub - vector subtraction

Defined in: std/sci/vec.s line 98

sub(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 210

Potential errors

  1. allocation failed
  2. null pointer

sub - vector subtraction

Defined in: std/sci/vec.s line 98

sub(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 248

Potential errors

  1. allocation failed
  2. null pointer
  3. different vector sizes

sub - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 93

sub(nat _x, nat ptr _y) -> (nat)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative

sub - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 93

sub(int _x, int ptr _y) -> (int)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

sub - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 93

sub(float _x, float ptr _y) -> (float)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

sub - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 93

sub(nat ptr _x, nat _y) -> (nat)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative

sub - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 93

sub(nat ptr _x, nat ptr _y) -> (nat)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 90

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative

sub - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 93

sub(int ptr _x, int _y) -> (int)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

sub - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 93

sub(int ptr _x, int ptr _y) -> (int)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

sub - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 93

sub(float ptr _x, float _y) -> (float)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 68

Potential errors

  1. null pointer

sub - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 93

sub(float ptr _x, float ptr _y) -> (float)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 79

Potential errors

  1. null pointer

pow

pow - exponentiate by

Defined in: std/core/numbers.s line 161

pow(nat x, nat y) -> (mut nat)

Exponentiates a natural number by another.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 84

pow

Defined in: std/sci/math.s line 89

pow(float x, float y) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 12

pow - vector exponentiation

Defined in: std/sci/vec.s line 146

pow(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 215

Potential errors

  1. does not fit in circular arena
  2. null pointer
  3. can only place vectors on contiguous buffers
  4. cannot place vectors on buffer offsets

pow - vector exponentiation

Defined in: std/sci/vec.s line 146

pow(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 215

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. arena is out of space

pow - vector exponentiation

Defined in: std/sci/vec.s line 146

pow(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 200

Potential errors

  1. allocation failed
  2. null pointer

pow - vector exponentiation

Defined in: std/sci/vec.s line 135

pow(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 225

Potential errors

  1. does not fit in circular arena
  2. null pointer
  3. can only place vectors on contiguous buffers
  4. cannot place vectors on buffer offsets

pow - vector exponentiation

Defined in: std/sci/vec.s line 135

pow(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 263

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. does not fit in circular arena

pow - vector exponentiation

Defined in: std/sci/vec.s line 135

pow(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 225

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. arena is out of space

pow - vector exponentiation

Defined in: std/sci/vec.s line 135

pow(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 263

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. different vector sizes
  5. arena is out of space

pow - vector exponentiation

Defined in: std/sci/vec.s line 135

pow(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 210

Potential errors

  1. allocation failed
  2. null pointer

pow - vector exponentiation

Defined in: std/sci/vec.s line 135

pow(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS allocator effect to store the result.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 248

Potential errors

  1. allocation failed
  2. null pointer
  3. different vector sizes

console

console - references the system console

Defined in: std/core/print.s line 20

console() -> (console {tag})

As a singleton, the console should usually be instantiated in the main() function and then passed to dependent calls, for example via an an effect for convenience. Standard library print functions provide the CLI effect and you can propagate to this by prepending effect edit console CLI to function arguments. The console is a zero-cost abstraction in that it does not transfer any data but relies on singleton safety to synchronize io across threads. Quickly print internals for debugging with unsafe_console().

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

unsafe_console

unsafe_console - references the system console unsafely

Defined in: std/core/print.s line 34

unsafe_console() -> (mut console {tag})

This is convenient for print debugging by writing unsafe_console().print ... without needing to evoke an effect to pass the normally singleton console.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

print

Defined in: std/core/print.s line 60

print(console CLI, float value) -> () with effects CLI

To pre-specified 6 decimal digits. Automatically ends the line too.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 13

Defined in: std/core/print.s line 60

print(console CLI, float value, cstr endl) -> () with effects CLI

To pre-specified 6 decimal digits.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

Defined in: std/core/print.s line 53

print(console CLI, cstr value) -> () with effects CLI

Automatically ends the line too.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 13

Defined in: std/core/print.s line 53

print(console CLI, cstr value, cstr endl) -> () with effects CLI

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

Defined in: std/core/print.s line 42

print(console CLI, "flush") -> () with effects CLI

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 5

Defined in: std/core/print.s line 96

print(console CLI, false) -> () with effects CLI

Automatically ends the line too.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 11

Defined in: std/core/print.s line 96

print(console CLI, false, cstr endl) -> () with effects CLI

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 7

Defined in: std/core/print.s line 89

print(console CLI, true) -> () with effects CLI

Automatically ends the line too.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 11

Defined in: std/core/print.s line 89

print(console CLI, true, cstr endl) -> () with effects CLI

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 7

Defined in: std/core/print.s line 82

print(console CLI, bool value) -> () with effects CLI

Automatically ends the line too.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 31

Defined in: std/core/print.s line 82

print(console CLI, bool value, cstr endl) -> () with effects CLI

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 27

Defined in: std/core/print.s line 75

print(console CLI, nat value) -> () with effects CLI

Automatically ends the line too.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 13

Defined in: std/core/print.s line 75

print(console CLI, nat value, cstr endl) -> () with effects CLI

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

Defined in: std/core/print.s line 68

print(console CLI, int value) -> () with effects CLI

Automatically ends the line too.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 13

Defined in: std/core/print.s line 68

print(console CLI, int value, cstr endl) -> () with effects CLI

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

Defined in: std/core/string.s line 337

print(console CLI, char c) -> () with effects CLI

Ends the line too.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 13

Defined in: std/core/string.s line 337

print(console CLI, char c, cstr endl) -> () with effects CLI

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

Defined in: std/core/string.s line 323

print(console CLI, str) -> () with effects CLI

Ends the line too.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 17

Defined in: std/core/string.s line 323

print(console CLI, str, cstr endl) -> () with effects CLI

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 13

Defined in: std/sci/vec.s line 261

print(console CLI, vec) -> () with effects CLI

Prints as a row, such as [ 1.0 2.0 3.0 ]

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 235

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative

Defined in: std/sci/vec.s line 261

print(console CLI, vec, cstr endl) -> () with effects CLI

Prints as a row, such as [ 1.0 2.0 3.0 ]

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 31
  • Transpiled C size: 231

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative

Defined in: std/sci/mat.s line 137

print(console CLI, mat) -> () with effects CLI

single-row matrices stay on one line; taller ones get top/mid/bottom brackets

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 88
  • Transpiled C size: 840

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative

Defined in: std/sci/mat.s line 137

print(console CLI, mat, cstr endl) -> () with effects CLI

single-row matrices stay on one line; taller ones get top/mid/bottom brackets

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 87
  • Transpiled C size: 836

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative

Defined in: std/sci/coo.s line 95

print(console CLI, coo) -> () with effects CLI

Prints it as coordinate as list: (i, j): v

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 22
  • Transpiled C size: 182

Defined in: std/sci/coo.s line 95

print(console CLI, coo, cstr endl) -> () with effects CLI

Prints it as coordinate as list: (i, j): v

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 178

nn

nn - no new line

Defined in: std/core/print.s line 46

nn(nat) -> (nat value, cstr)

Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without automatically adding a new line.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

nn - no new line

Defined in: std/core/print.s line 46

nn(int) -> (int value, cstr)

Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without automatically adding a new line.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

nn - no new line

Defined in: std/core/print.s line 46

nn(float) -> (float value, cstr)

Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without automatically adding a new line.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

nn - no new line

Defined in: std/core/print.s line 46

nn(cstr) -> (cstr value, cstr)

Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without automatically adding a new line.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

nn - no new line

Defined in: std/core/string.s line 425

nn(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str, cstr)

Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without a new line.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 7

nn - no new line

Defined in: std/sci/vec.s line 254

nn(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (vec, cstr)

Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without a new line.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 7

supports_ansi

supports_ansi

Defined in: std/core/print.s line 103

supports_ansi(console {tag}) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 9

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [supports_ansi()]

colors

colors

Defined in: std/core/print.s line 108

colors(console {tag}) -> (colors {tag, console CLI, bool initialized})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 13

defered calls


set

set

Defined in: std/core/print.s line 181

set(colors, "reset_underline") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 179

set(colors, "reset_bold") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 177

set(colors, "reset_bg") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 175

set(colors, "reset_color") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 173

set(colors, "reset") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 171

set(colors, "strikethrough") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 169

set(colors, "reverse") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 167

set(colors, "blink") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 165

set(colors, "underline") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 163

set(colors, "italic") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 161

set(colors, "dim") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 159

set(colors, "bold") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 157

set(colors, "bg_black") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 155

set(colors, "bg_white") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 153

set(colors, "bg_cyan") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 151

set(colors, "bg_magenta") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 149

set(colors, "bg_blue") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 147

set(colors, "bg_yellow") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 145

set(colors, "bg_green") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 143

set(colors, "bg_red") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 141

set(colors, "bright_white") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 139

set(colors, "bright_cyan") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 137

set(colors, "bright_magenta") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 135

set(colors, "bright_blue") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 133

set(colors, "bright_yellow") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 131

set(colors, "bright_green") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 129

set(colors, "bright_red") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 127

set(colors, "black") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 125

set(colors, "white") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 123

set(colors, "cyan") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 121

set(colors, "magenta") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 119

set(colors, "blue") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 117

set(colors, "yellow") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 115

set(colors, "green") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

set

Defined in: std/core/print.s line 113

set(colors, "red") -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 11

exists

exists - checks that a pointer exists

Defined in: std/core/convert.s line 44

exists(any ptr) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 9

exists - checks whether a cstr is not zero-initialized

Defined in: std/core/string.s line 32

exists(cstr) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 9

exists

Defined in: std/graphics.s line 155

exists(Texture {tag, nat,float,float,nat,nat[]}) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 31

bits

bits - converts a character to its bit representation

Defined in: std/core/convert.s line 189

bits(char) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

bits - converts unsigned numbers to bits

Defined in: std/core/convert.s line 185

bits(nat32) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

bits - converts unsigned numbers to bits

Defined in: std/core/convert.s line 185

bits(nat16) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

bits - converts unsigned numbers to bits

Defined in: std/core/convert.s line 185

bits(nat8) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 19

bits - bit representation

Defined in: std/core/convert.s line 62

bits(float) -> (bits {tag, nat value})

Retrieves the bit representation of a number of shift arithmetics and bitwise operations.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 26

bits - bit representation

Defined in: std/core/convert.s line 55

bits(int) -> (bits {tag, nat value})

Retrieves the bit representation of a number of shift arithmetics and bitwise operations.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 15

bits - bit representation

Defined in: std/core/convert.s line 49

bits(nat) -> (bits {tag, nat value})

Retrieves the bit representation of a number of shift arithmetics and bitwise operations.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

lshift

lshift - left shift

Defined in: std/core/convert.s line 88

lshift(bits, nat y) -> (bits {tag, nat value})

Reminder that bits store 64 bits and thus this shift should be casted to lower-bit numbers (e.g., nat16) to truncate leading ones.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 19

rshift

rshift - right shift

Defined in: std/core/convert.s line 95

rshift(bits, nat y) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 19

xor

xor - bitwise xor

Defined in: std/core/convert.s line 100

xor(bits, bits) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 19

band

band - bitwise and

Defined in: std/core/convert.s line 105

band(bits, bits) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 19

bor

bor - bitwise or

Defined in: std/core/convert.s line 110

bor(bits, bits) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 19

bnot

bnot - bitwise negation

Defined in: std/core/convert.s line 115

bnot(bits {tag, nat value}) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 16

tochar

tochar

Defined in: std/core/convert.s line 128

tochar(nat8) -> (char)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

slice

slice - extract a range of bits

Defined in: std/core/convert.s line 193

slice(bits, nat from, nat to) -> (bits {tag, nat value})

The extracted range is shifted down so that from becomes bit 0.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 196

Potential errors

  1. slice start cannot be greater than slice end
  2. cannot slice beyond 64 bits
  3. nat subtraction would yield a negative

slice - a buffer subregion of an arena

Defined in: std/core/allocators.s line 235

slice(edit arena, nat length) -> (mut any[] {follows any ptr surface.buf.unsafe_ptr})

This allocates a region of a given number of elements within an arena and returns a buffer interface wrapping it. It is an alternative to allocating buffers on the heap.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 44
  • Transpiled C size: 184

Potential errors

  1. nat value too large to pack in nat32
  2. arena is out of space

slice - slice a string based on a prefix and postfix (those are not included in the found substring)

Defined in: std/core/string.s line 418

slice(str, cstr _from, cstr _to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 210

Potential errors

  1. null pointer
  2. out of bounds
  3. slice out of string bounds
  4. not found

slice - slice a string based on a prefix and postfix (those are not included in the found substring)

Defined in: std/core/string.s line 418

slice(cstr _s, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 216

Potential errors

  1. null pointer
  2. out of bounds
  3. slice out of string bounds
  4. not found

slice - slice a string based on a prefix and postfix (those are not included in the found substring)

Defined in: std/core/string.s line 418

slice(cstr _s, str, cstr _to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 210

Potential errors

  1. null pointer
  2. out of bounds
  3. slice out of string bounds
  4. not found

slice - slice a string based on a prefix and postfix (those are not included in the found substring)

Defined in: std/core/string.s line 418

slice(cstr _s, cstr _from, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 210

Potential errors

  1. null pointer
  2. out of bounds
  3. slice out of string bounds
  4. not found

slice - slice a string based on a prefix and postfix (those are not included in the found substring)

Defined in: std/core/string.s line 418

slice(cstr _s, cstr _from, cstr _to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 204

Potential errors

  1. null pointer
  2. out of bounds
  3. slice out of string bounds
  4. not found

slice - get a substring view into a string

Defined in: std/core/string.s line 344

slice(str, nat from, nat to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

This operation does not perform any additional allocations or memory moves and is thus convenient for parsing code. Explicitly copy the result to move it away from volatile memory, such as circular buffers.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 286

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

slice - get a substring view into a string

Defined in: std/core/string.s line 344

slice(cstr _s, nat from, nat to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

This operation does not perform any additional allocations or memory moves and is thus convenient for parsing code. Explicitly copy the result to move it away from volatile memory, such as circular buffers.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 280

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

slice - slice a string based on a prefix and postfix (those are not included in the found substring)

Defined in: std/core/string.s line 418

slice(str, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 46
  • Transpiled C size: 222

Potential errors

  1. null pointer
  2. out of bounds
  3. slice out of string bounds
  4. not found

slice - slice a string based on a prefix and postfix (those are not included in the found substring)

Defined in: std/core/string.s line 418

slice(str, str, cstr _to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 216

Potential errors

  1. null pointer
  2. out of bounds
  3. slice out of string bounds
  4. not found

slice - slice a string based on a prefix and postfix (those are not included in the found substring)

Defined in: std/core/string.s line 418

slice(str, cstr _from, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 216

Potential errors

  1. null pointer
  2. out of bounds
  3. slice out of string bounds
  4. not found

mask

mask - overwrite a range of bits

Defined in: std/core/convert.s line 203

mask(bits, nat from, nat to, bits) -> (bits {tag, nat value})

The provided value must fit entirely inside the selected bit range. Bit 0 of other is written at position from.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 46
  • Transpiled C size: 269

Potential errors

  1. value does not fit in bit slice
  2. cannot slice beyond 64 bits
  3. slice start cannot be greater than or equal to slice end
  4. nat subtraction would yield a negative

of

of - yields a pair of nats based on an interval specification

Defined in: std/core/range.s line 34

of(nat from, "len", nat length) -> (nat from, nat)

Represents the range [from, from+length] where ‘from’ and ‘length’ are the arguments.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 13

of - yields a pair of nats based on an interval specification

Defined in: std/core/range.s line 29

of(nat from, "upto", nat to) -> (nat from, nat)

Represents the range [from, to] where ‘from’ and ‘to’ are the arguments.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 17

of - yields a pair of nats based on an interval specification

Defined in: std/core/range.s line 24

of(nat from, "to", nat to) -> (nat from, nat to)

Represents the range [from, to) where ‘from’ and ‘to’ are the arguments.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

of - yields a pair of nats based on an interval specification

Defined in: std/core/range.s line 19

of(nat) -> (nat from, nat to)

Represents the range [0, to) where ‘to’ its its arguments.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

range

range - constructs a range

Defined in: std/core/range.s line 39

range(nat _from, nat to) -> (edit range {tag, mut nat from, nat to})

Endpoints are natural numbers (unsigned integers). This is handy for several kinds of iteration. When iterating over ranges, it matters whether they are constant or not in whether the first element is modified to track iteration progress or not. Also use ’of’ to construct descriptive ranges. Example:

import std.core
def main()
    CLI = edit console()
    r = range of(0 to 3)
    for i in r: print i
    print r.from

In this example, the final print retains value 0 because the range is constant, which evokes the constant range ‘get’ iterator. However, if the range was mutable, the starting position would be modified via the ‘mutget’ iterator to consume its elements. In most usage scenarios this does not matter, as the range would be a temporary creation.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 25

mutget

mutget - next range number

Defined in: std/core/range.s line 60

mutget(edit range {tag, mut nat from, nat to}) -> (nat)

This increments the range from position and returns the previous one.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 48

Potential errors

  1. iteration end

mutget - next range number

Defined in: std/core/range.s line 60

mutget(edit range, nat skipped) -> (nat)

This increments the range from position and returns the previous one.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 48

Potential errors

  1. iteration end

mutget - get a list element pointer

Defined in: std/core/allocators.s line 145

mutget(edit list, nat pos) -> (mut any ptr {follows any ptr self.buf.unsafe_ptr})

Complexity

  • Level of abstraction: 2 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 34

Potential errors

  1. out of bounds

mutget - get a list element pointer

Defined in: std/core/allocators.s line 145

mutget(edit list, nat pos) -> (mut any ptr {follows any ptr self.buf.unsafe_ptr})

Complexity

  • Level of abstraction: 2 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 34

Potential errors

  1. out of bounds

mutget - get a list element pointer

Defined in: std/core/allocators.s line 145

mutget(edit circular, nat pos) -> (mut any ptr {follows any ptr self.buf.unsafe_ptr})

Complexity

  • Level of abstraction: 2 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 34

Potential errors

  1. out of bounds

mutget - get a mutable list element pointer

Defined in: std/core/allocators.s line 109

mutget(edit arena, nat pos) -> (mut any ptr {follows any ptr l.buf.unsafe_ptr})

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 57

Potential errors

  1. out of bounds

mutget - get a mutable list element pointer

Defined in: std/core/allocators.s line 109

mutget(edit arena, nat pos, "unsafe_assume_inbounds") -> (mut any ptr {follows any ptr l.buf.unsafe_ptr})
Warning: This version disables internal bound checks, assuming that proper bounds are guaranteed by its caller.

Complexity

  • Level of abstraction: 2 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 23

mutget - mutable pointer to buffer element

Defined in: std/core/array.s line 83

mutget(edit any[], nat i) -> (mut any ptr {follows any ptr buffer.unsafe_ptr})

This uses pointer arithmetics to index the buffer, basically performing the operation i*buffer.unsafe_align+buffer.unsafe_offset. Fresh buffers have zero offset and alignment equal to element size, but more complicated situations arise in situations where sub-buffers are retrieved or sliced.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 72

Potential errors

  1. out of bounds

mutget - mutable pointer to buffer element

Defined in: std/core/array.s line 83

mutget(edit any[], nat i, "unsafe_assume_inbounds") -> (mut any ptr {follows any ptr buffer.unsafe_ptr})

This uses pointer arithmetics to index the buffer, basically performing the operation i*buffer.unsafe_align+buffer.unsafe_offset. Fresh buffers have zero offset and alignment equal to element size, but more complicated situations arise in situations where sub-buffers are retrieved or sliced.

Warning: This version disables internal bound checks, assuming that proper bounds are guaranteed by its caller.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 49

mutget

Defined in: std/io.s line 26

mutget(edit circular, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 46

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. end of file

mutget

Defined in: std/io.s line 26

mutget(edit circular, edit terminal, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 26

mutget(edit circular, edit write, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 26

mutget(edit circular, edit write, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 26

mutget(edit circular, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 26

mutget(edit circular, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 26

mutget(edit arena, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 46

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. end of file

mutget

Defined in: std/io.s line 26

mutget(edit arena, edit terminal, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 26

mutget(edit arena, edit write, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 26

mutget(edit arena, edit write, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 26

mutget(edit arena, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 26

mutget(edit arena, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 47

Potential errors

  1. null pointer
  2. not open file
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. end of file

mutget

Defined in: std/io.s line 23

mutget(edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 2 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 32

Potential errors

  1. not open dir
  2. end of dir

mutget - get a mutable hash map entry

Defined in: std/map.s line 49

mutget(edit robinhood_nat_entry[], edit any[], nat key) -> (mut any ptr {follows any ptr values.unsafe_ptr})

Implemented for string or cstr keys but buffer of any values.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 65

Potential errors

  1. string buffer is full
  2. null pointer
  3. modulo by zero
  4. out of bounds
  5. nat subtraction would yield a negative

mutget - get a mutable hash map entry

Defined in: std/map.s line 39

mutget(edit robinhood_str_entry[], edit any[], str) -> (mut any ptr {follows any ptr values.unsafe_ptr})

Implemented for string or cstr keys but buffer of any values.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 22
  • Transpiled C size: 94

Potential errors

  1. string buffer is full
  2. null pointer
  3. modulo by zero
  4. out of bounds
  5. nat subtraction would yield a negative

mutget - get a mutable hash map entry

Defined in: std/map.s line 39

mutget(edit robinhood_str_entry[], edit any[], cstr key) -> (mut any ptr {follows any ptr values.unsafe_ptr})

Implemented for string or cstr keys but buffer of any values.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 18
  • Transpiled C size: 88

Potential errors

  1. string buffer is full
  2. null pointer
  3. modulo by zero
  4. out of bounds
  5. nat subtraction would yield a negative

mutget - modify a vector element at given position

Defined in: std/sci/vec.s line 61

mutget(edit vec, nat i) -> (mut float ptr)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 60

Potential errors

  1. out of bounds

mutget - modify a vector element at given position

Defined in: std/sci/vec.s line 61

mutget(edit vec, nat i, "unsafe_assume_inbounds") -> (mut float ptr)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 37

mutget - mutable reference to a sparse element

Defined in: std/sci/coo.s line 52

mutget(edit coo, nat k) -> (mut sparse_element ptr)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 50

Potential errors

  1. out of bounds

mutget - mutable reference to a sparse element

Defined in: std/sci/coo.s line 52

mutget(edit coo, nat k, "unsafe_assume_inbounds") -> (mut sparse_element ptr)
Warning: This version disables internal bound checks, assuming that proper bounds are guaranteed by its caller.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 27

mutget - mutable reference to matrix element (i,j)

Defined in: std/sci/mat.s line 59

mutget(edit mat, nat i, nat j) -> (mut float ptr)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 103

Potential errors

  1. row out of bounds
  2. column out of bounds

get

get - assert that a number plus range start lies in the range

Defined in: std/core/range.s line 68

get(range, nat _pos) -> (nat)

The item itself is returned. This lets the range be used as an iterator per a pattern like for i in range 10 ....

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 40

Potential errors

  1. iteration end

get - get a list element pointer

Defined in: std/core/allocators.s line 138

get(list, nat pos) -> (any ptr {follows any ptr self.buf.unsafe_ptr})

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 53

Potential errors

  1. out of bounds

get - get a list element pointer

Defined in: std/core/allocators.s line 138

get(list, nat pos) -> (any ptr {follows any ptr self.buf.unsafe_ptr})

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 53

Potential errors

  1. out of bounds

get - get a list element pointer

Defined in: std/core/allocators.s line 138

get(circular, nat pos) -> (any ptr {follows any ptr self.buf.unsafe_ptr})

Complexity

  • Level of abstraction: 2 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 30

Potential errors

  1. out of bounds

get - get a list element pointer

Defined in: std/core/allocators.s line 99

get(arena, nat pos) -> (any ptr {follows any ptr l.buf.unsafe_ptr})

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 53

Potential errors

  1. out of bounds

get - get a list element pointer

Defined in: std/core/allocators.s line 99

get(arena, nat pos, "unsafe_assume_inbounds") -> (any ptr {follows any ptr l.buf.unsafe_ptr})
Warning: This version disables internal bound checks, assuming that proper bounds are guaranteed by its caller.

Complexity

  • Level of abstraction: 2 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 19

get - immutable pointer to buffer element

Defined in: std/core/array.s line 96

get(any[], nat i) -> (any ptr {follows any ptr buffer.unsafe_ptr})

This uses pointer arithmetics to index the buffer, basically performing the operation i*buffer.unsafe_align+buffer.unsafe_offset. Fresh buffers have zero offset and alignment equal to element size, but more complicated situations arise in situations where sub-buffers are retrieved or sliced.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 72

Potential errors

  1. out of bounds

get - immutable pointer to buffer element

Defined in: std/core/array.s line 96

get(any[], nat i, "unsafe_assume_inbounds") -> (any ptr {follows any ptr buffer.unsafe_ptr})

This uses pointer arithmetics to index the buffer, basically performing the operation i*buffer.unsafe_align+buffer.unsafe_offset. Fresh buffers have zero offset and alignment equal to element size, but more complicated situations arise in situations where sub-buffers are retrieved or sliced.

Warning: This version disables internal bound checks, assuming that proper bounds are guaranteed by its caller.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 49

get - a character in a string

Defined in: std/core/string.s line 330

get(str, nat i) -> (char ptr)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 46

Potential errors

  1. out of bounds

get - a character in a string

Defined in: std/core/string.s line 330

get(str, nat i, "unsafe_assume_inbounds") -> (char ptr)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 23

get - get a hash map entry

Defined in: std/map.s line 34

get(robinhood_str_entry[], any[], cstr key) -> (any ptr {follows any ptr values.unsafe_ptr})

Implemented for string or cstr keys but buffer of any values.

Complexity

  • Level of abstraction: 1 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 18
  • Transpiled C size: 80

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds
  4. nat subtraction would yield a negative
  5. index not found

get - get a hash map entry

Defined in: std/map.s line 44

get(robinhood_nat_entry[], any[], nat key) -> (any ptr {follows any ptr values.unsafe_ptr})

Implemented for string or cstr keys but buffer of any values.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 57

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds
  4. nat subtraction would yield a negative
  5. index not found

get - get a hash map entry

Defined in: std/map.s line 34

get(robinhood_str_entry[], any[], str) -> (any ptr {follows any ptr values.unsafe_ptr})

Implemented for string or cstr keys but buffer of any values.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 22
  • Transpiled C size: 86

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds
  4. nat subtraction would yield a negative
  5. index not found

get - a get request

Defined in: std/net/fetch.s line 88

get(edit circular, str) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 81

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

get - a get request

Defined in: std/net/fetch.s line 88

get(edit arena, cstr url) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 22
  • Transpiled C size: 75

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

get - a get request

Defined in: std/net/fetch.s line 88

get(edit arena, str) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 81

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

get - a get request

Defined in: std/net/fetch.s line 88

get(new CHARS, cstr url) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 17
  • Transpiled C size: 60

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

get - a get request

Defined in: std/net/fetch.s line 88

get(new CHARS, str) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 66

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

get - a get request

Defined in: std/net/fetch.s line 88

get(edit circular, cstr url) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 22
  • Transpiled C size: 75

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

get - get a vector element at given position

Defined in: std/sci/vec.s line 67

get(vec, nat i) -> (float ptr)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 60

Potential errors

  1. out of bounds

get - get a vector element at given position

Defined in: std/sci/vec.s line 67

get(vec, nat i, "unsafe_assume_inbounds") -> (float ptr)
Warning: This version disables internal bound checks, assuming that proper bounds are guaranteed by its caller.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 37

get - get a sparse element

Defined in: std/sci/coo.s line 43

get(coo, nat k) -> (sparse_element ptr)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 50

Potential errors

  1. out of bounds

get - get a sparse element

Defined in: std/sci/coo.s line 43

get(coo, nat k, "unsafe_assume_inbounds") -> (sparse_element ptr)
Warning: This version disables internal bound checks, assuming that proper bounds are guaranteed by its caller.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 27

get - reference to matrix element (i,j)

Defined in: std/sci/mat.s line 65

get(mat, nat i, nat j) -> (float ptr)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 17
  • Transpiled C size: 103

Potential errors

  1. row out of bounds
  2. column out of bounds

get - reference to matrix element (i,j)

Defined in: std/sci/mat.s line 65

get(mat, nat i, nat j, "unsafe_assume_inbounds") -> (float ptr)
Warning: This version disables internal bound checks, assuming that proper bounds are guaranteed by its caller.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 57

KB

KB - kilobytes to bytes

Defined in: std/core/units.s line 19

KB(nat) -> (nat)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 17

MB

MB - megabytes to bytes

Defined in: std/core/units.s line 23

MB(nat) -> (nat)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 31

GB

GB - gigabytes to bytes

Defined in: std/core/units.s line 27

GB(nat) -> (nat)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 45

alloc

alloc - allocate memory

Defined in: std/unsafe.s line 25

alloc(nat) -> (mut any ptr)

Allocates a memory of the provided size in bytes.

Warning: Its usage in unsafe and guarded under std/unsafe.s.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 39

Potential errors

  1. allocation failed

alloc

Defined in: std/core/string.s line 26

alloc(new CHARS, nat length) -> (mut allocated {tag, mut char[], mut nat pos}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 167

Potential errors

  1. allocation failed

defered calls

free(mut any ptr) -> ()

alloc - list allocation

Defined in: std/core/allocators.s line 219

alloc(edit list {tag, mut any[], mut nat length}) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})

Creates room for one element.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 214

Potential errors

  1. reallocation failed
  2. division by zero
  3. cannot resize an unallocated or freed buffer

alloc - list allocation

Defined in: std/core/allocators.s line 219

alloc(edit list, nat length) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 206

Potential errors

  1. reallocation failed
  2. division by zero
  3. cannot resize an unallocated or freed buffer

alloc - list allocation

Defined in: std/core/allocators.s line 219

alloc(edit list {tag, mut any[], mut nat length}) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})

Creates room for one element.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 214

Potential errors

  1. reallocation failed
  2. division by zero
  3. cannot resize an unallocated or freed buffer

alloc - list allocation

Defined in: std/core/allocators.s line 219

alloc(edit list, nat length) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 206

Potential errors

  1. reallocation failed
  2. division by zero
  3. cannot resize an unallocated or freed buffer

alloc - circular arena allocation

Defined in: std/core/allocators.s line 205

alloc(edit circular {tag, edit any[], mut nat pos}) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})

Creates room for one element.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 165

Potential errors

  1. does not fit in circular arena

alloc - circular arena allocation

Defined in: std/core/allocators.s line 205

alloc(edit circular, nat length) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 27
  • Transpiled C size: 157

Potential errors

  1. does not fit in circular arena

alloc - allocates a buffer

Defined in: std/core/allocators.s line 179

alloc(edit any[], edit bucket) -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions. This version allocates a buffer of ONE element.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 29
  • Transpiled C size: 220

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. reallocation failed

alloc - allocates a buffer

Defined in: std/core/allocators.s line 179

alloc(edit any[], edit bucket, "dirty") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions. This version allocates a buffer of ONE element.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 31
  • Transpiled C size: 239

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. reallocation failed

alloc - allocates a buffer

Defined in: std/core/allocators.s line 179

alloc(edit any[], edit bucket, "unsafe_first") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions. This version allocates a buffer of ONE element.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 27
  • Transpiled C size: 180

Potential errors

  1. reallocation failed
  2. allocation failed
  3. null pointer
  4. cannot allocate a buffer of unsized type

alloc - allocates a buffer

Defined in: std/core/allocators.s line 179

alloc(edit any[], edit bucket, nat size) -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 212

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. reallocation failed

alloc - allocates a buffer

Defined in: std/core/allocators.s line 179

alloc(edit any[], edit bucket, nat size, "dirty") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 231

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. reallocation failed

alloc - allocates a buffer

Defined in: std/core/allocators.s line 179

alloc(edit any[], edit bucket, nat size, "unsafe_first") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 172

Potential errors

  1. reallocation failed
  2. allocation failed
  3. null pointer
  4. cannot allocate a buffer of unsized type

alloc - arena allocation

Defined in: std/core/allocators.s line 149

alloc(edit arena {tag, edit any[], mut nat pos}) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})

Creates room for one element.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 116

Potential errors

  1. arena is out of space

alloc - arena allocation

Defined in: std/core/allocators.s line 149

alloc(edit arena, nat length) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 23
  • Transpiled C size: 108

Potential errors

  1. arena is out of space

alloc - allocate a char[] buffer

Defined in: std/core/array.s line 55

alloc(nat) -> (mut char[])

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 23
  • Transpiled C size: 123

Potential errors

  1. allocation failed

defered calls

free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[]) -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made. This version allocates a buffer of ONE element.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 217

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], "unsafe_leaky") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made. This version allocates a buffer of ONE element.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 27
  • Transpiled C size: 190

Potential errors

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], "dirty") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made. This version allocates a buffer of ONE element.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 236

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], "dirty", "unsafe_leaky") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made. This version allocates a buffer of ONE element.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 29
  • Transpiled C size: 209

Potential errors

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], "unsafe_first") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made. This version allocates a buffer of ONE element.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 177

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type

defered calls

free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], "unsafe_first", "unsafe_leaky") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made. This version allocates a buffer of ONE element.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 25
  • Transpiled C size: 150

Potential errors

  1. allocation failed

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], nat size) -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 27
  • Transpiled C size: 209

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], nat size, "unsafe_leaky") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 182

Potential errors

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], nat size, "dirty") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 29
  • Transpiled C size: 228

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], nat size, "dirty", "unsafe_leaky") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 201

Potential errors

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], nat size, "unsafe_first") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 25
  • Transpiled C size: 169

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type

defered calls

free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 23

alloc(edit any[], nat size, "unsafe_first", "unsafe_leaky") -> (edit any[])

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. Consider freeing the buffer first with del buffer to allocate again, or use buffer.resize new_size once a first non-zero allocation has been made.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 142

Potential errors

  1. allocation failed

alloc

Defined in: std/core/string.s line 132

alloc(edit bucket, nat length) -> (edit allocated {tag, edit char[], nat pos})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 97

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. reallocation failed

alloc

Defined in: std/tag.s line 40

alloc(cstr) -> (mut char[])

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 98
  • Transpiled C size: 627

Potential errors

  1. null pointer
  2. allocation failed
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. arena is out of space
  6. empty input name
  7. cannot tag a structural type
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

alloc

Defined in: std/tag.s line 40

alloc(cstr surface, cstr obj) -> (mut char[])

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 112
  • Transpiled C size: 755

Potential errors

  1. null pointer
  2. allocation failed
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. arena is out of space
  6. empty input name
  7. cannot tag a structural type
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers
  11. tag surface cannot be structural type

defered calls

free(mut any ptr) -> ()

resize

resize - resize the buffer

Defined in: std/core/array.s line 60

resize(edit any[], nat size) -> (edit any[])

For stability of data structures, this does nothing if the previous size is the same or less. If old size was zero, an error is created instead of allocating so that this does not leak resources.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 18
  • Transpiled C size: 163

Potential errors

  1. reallocation failed
  2. cannot resize an unallocated or freed buffer

resize - resize the buffer

Defined in: std/core/array.s line 60

resize(edit any[], nat size, "unsafe") -> (edit any[])

For stability of data structures, this does nothing if the previous size is the same or less. If old size was zero, an error is created instead of allocating so that this does not leak resources.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 101

Potential errors

  1. reallocation failed

last

last - mutable pointer to the last buffer element

Defined in: std/core/array.s line 77

last(edit any[]) -> (mut any ptr {follows any ptr buffer.unsafe_ptr})

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 111

Potential errors

  1. out of bounds

len

len

Defined in: std/core/allocators.s line 135

len(list {tag, any[], nat length}) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

len

Defined in: std/core/allocators.s line 135

len(list {tag, any[], nat length}) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

len - allocated arena size

Defined in: std/core/allocators.s line 84

len(arena {tag, any[], nat pos}) -> (nat)

This is not the total arena size, but rather the number of elements actively in use.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

len - the number of buffer elements

Defined in: std/core/array.s line 109

len(any[]) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

len - string length

Defined in: std/core/string.s line 105

len(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

len - vectot length

Defined in: std/sci/vec.s line 57

len(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 3

new

new - allocations on new memory

Defined in: std/core/allocators.s line 22

new() -> (new {tag})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 3

bucket_contents

bucket_contents

Defined in: std/core/allocators.s line 26

bucket_contents() -> (edit bucket_contents {tag, mut any ptr elements {follows any ptr ..}, mut nat size, mut nat allocated})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 64

Potential errors

  1. allocation failed

bucket

bucket - grouped allocations on new memory

Defined in: std/core/allocators.s line 33

bucket() -> (edit bucket {tag, mut bucket_contents ptr unsafe_ptr})

This is similar to ’new’ but moves all allocated memory together, releasing it only when there is no further use for any of its contents. Do note that this operation is typically the lazy way out, as it acquires and releases memory using one extra layer of indirection compared to structures like arenas. On the other hand, it’s pretty versatile for holding conditional results. Example:

import std.core
def conditional(bool case)
    CHARS = edit bucket()
    if case  s = copy 123
    else     s = copy 345
    return (s, CHARS) # this would not be possible with 'CHARS = new()'
def main()
    CLI = edit console()
    print conditional true
    print conditional false

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 70

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

of(nat) -> (nat from, nat to)
range(nat _from, nat to) -> (edit range {tag, mut nat from, nat to})
mutget(edit range, nat skipped) -> (nat)
ptr
mul(nat x, nat y) -> (nat)
add(any ptr allocated, nat offset) -> (any ptr {follows any ptr allocated})
dereference_ptr(any ptr) -> (any ptr)
free(mut any ptr) -> ()
free(mut any ptr) -> ()
free(mut any ptr) -> ()

arena

arena

Defined in: std/core/string.s line 23

arena("char__t9t") -> (edit arena {tag, edit char[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena - a buffer and mutable position pair

Defined in: std/core/allocators.s line 75

arena(edit any[]) -> (edit arena {tag, edit any[] {follows any ptr buf.unsafe_ptr}, mut nat pos})

The position starts from 0. This structure is often used to track the size of allocated data within the buffer. Contrary to circular buffers, arenas are not freed automatically and therefore eventually run out of space. However, they come with data integrity guarantees.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 39

arena - a buffer and mutable position pair

Defined in: std/core/allocators.s line 63

arena(edit any[], nat _pos) -> (edit arena {tag, edit any[], mut nat pos})

This structure is often used to track the size of allocated data within the buffer. Contrary to circular buffers, arenas are not freed automatically and therefore eventually run out of space. However, they come with data integrity guarantees. Attach a garbage collector to an arena per gc arena alloc 4 (or construct it with another allocator).

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 11

arena

Defined in: std/sci/vec.s line 23

arena("float__t4174t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t4108t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t3821t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t655t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t616t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t614t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t612t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t4t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 281

arena(edit vec {tag, mut float ptr unsafe_ptr, nat pos, nat length}) -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 120

allocated

allocated

Defined in: std/core/allocators.s line 90

allocated(edit any[], nat pos) -> (edit allocated {tag, edit any[], nat pos})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

status

status - convert to a nameless buffer and position pair

Defined in: std/core/allocators.s line 93

status(allocated {tag, any[], nat pos}) -> (any[] {follows any ptr self.buf.unsafe_ptr}, nat)

This unpacking is used to pass an arena’s state or allocated memory data as part of structural input.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 23

status - convert to a nameless buffer and position pair

Defined in: std/core/allocators.s line 93

status(arena {tag, any[], nat pos}) -> (any[] {follows any ptr self.buf.unsafe_ptr}, nat)

This unpacking is used to pass an arena’s state or allocated memory data as part of structural input.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 23

circular

circular

Defined in: std/core/string.s line 24

circular("char__t9t") -> (edit circular {tag, edit char[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular - circular buffer

Defined in: std/core/allocators.s line 119

circular(edit any[]) -> (edit circular {tag, edit any[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 15

circular

Defined in: std/sci/vec.s line 24

circular("float__t4174t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t4108t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t3821t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t655t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t616t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t614t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t612t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t4t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

list

list

Defined in: std/core/string.s line 25

list("char__t9t") -> (edit list {tag, mut char[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

list - list buffer management

Defined in: std/core/allocators.s line 124

list(edit any[], "external") -> (edit list {tag, mut any[] {follows any ptr _buf.unsafe_ptr}, mut nat length})

List defined over a mutable buf that is automatically managed and resized. A capacity is maintained so that resizes are not performed too frequently.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 47

list - list buffer management

Defined in: std/core/allocators.s line 124

list(edit any[]) -> (edit list {tag, mut any[] {follows any ptr _buf.unsafe_ptr}, mut nat length})

List defined over a mutable buf that is automatically managed and resized. A capacity is maintained so that resizes are not performed too frequently.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 91

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

list

Defined in: std/sci/vec.s line 25

list("float__t4174t") -> (edit list {tag, mut float[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

list

Defined in: std/sci/vec.s line 25

list("float__t4108t") -> (edit list {tag, mut float[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

list

Defined in: std/sci/vec.s line 25

list("float__t3821t") -> (edit list {tag, mut float[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

list

Defined in: std/sci/vec.s line 25

list("float__t655t") -> (edit list {tag, mut float[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

list

Defined in: std/sci/vec.s line 25

list("float__t616t") -> (edit list {tag, mut float[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

list

Defined in: std/sci/vec.s line 25

list("float__t614t") -> (edit list {tag, mut float[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

list

Defined in: std/sci/vec.s line 25

list("float__t612t") -> (edit list {tag, mut float[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

list

Defined in: std/sci/vec.s line 25

list("float__t4t") -> (edit list {tag, mut float[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

unsafe_alloc

unsafe_alloc - bucket allocation

Defined in: std/core/allocators.s line 160

unsafe_alloc(edit bucket {tag, mut bucket_contents ptr unsafe_ptr}) -> (mut any ptr {follows any ptr ..})

Creates room for one element.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 337

Potential errors

  1. allocation failed
  2. null pointer
  3. reallocation failed

unsafe_alloc - bucket allocation

Defined in: std/core/allocators.s line 160

unsafe_alloc(edit bucket, nat bytes) -> (mut any ptr {follows any ptr ..})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 44
  • Transpiled C size: 329

Potential errors

  1. allocation failed
  2. null pointer
  3. reallocation failed

at

at - get a mutable pointer to the last buffer element

Defined in: std/core/allocators.s line 231

at(edit allocated {tag, edit any[], nat pos}) -> (mut any ptr {follows any ptr surface.buf.unsafe_ptr})

Complexity

  • Level of abstraction: 2 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 34

Potential errors

  1. out of bounds

at - find or add an item in a robinhood_entry list

Defined in: std/hash.s line 87

at(edit robinhood_nat_entry[], nat _k) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 54
  • Transpiled C size: 718

Potential errors

  1. string buffer is full
  2. null pointer
  3. modulo by zero
  4. out of bounds
  5. nat subtraction would yield a negative

at - find or add an item in a robinhood_entry list

Defined in: std/hash.s line 87

at(edit robinhood_str_entry[], str) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 102
  • Transpiled C size: 1051

Potential errors

  1. string buffer is full
  2. null pointer
  3. modulo by zero
  4. out of bounds
  5. nat subtraction would yield a negative

at - find or add an item in a robinhood_entry list

Defined in: std/hash.s line 87

at(edit robinhood_str_entry[], cstr _k) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 98
  • Transpiled C size: 1045

Potential errors

  1. string buffer is full
  2. null pointer
  3. modulo by zero
  4. out of bounds
  5. nat subtraction would yield a negative

at

Defined in: std/sci/vec.s line 79

at(vec, nat i) -> (float)

Complexity

  • Level of abstraction: 2 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 41

Potential errors

  1. null pointer

at

Defined in: std/sci/vec.s line 76

at(float number, nat i) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

char_allocator

list

Defined in: std/core/string.s line 25

list("char__t9t") -> (edit list {tag, mut char[], mut nat length})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 59

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

circular

Defined in: std/core/string.s line 24

circular("char__t9t") -> (edit circular {tag, edit char[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/core/string.s line 23

arena("char__t9t") -> (edit arena {tag, edit char[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

bucket - grouped allocations on new memory

Defined in: std/core/allocators.s line 33

bucket() -> (edit bucket {tag, mut bucket_contents ptr unsafe_ptr})

This is similar to ’new’ but moves all allocated memory together, releasing it only when there is no further use for any of its contents. Do note that this operation is typically the lazy way out, as it acquires and releases memory using one extra layer of indirection compared to structures like arenas. On the other hand, it’s pretty versatile for holding conditional results. Example:

import std.core
def conditional(bool case)
    CHARS = edit bucket()
    if case  s = copy 123
    else     s = copy 345
    return (s, CHARS) # this would not be possible with 'CHARS = new()'
def main()
    CLI = edit console()
    print conditional true
    print conditional false

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 70

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

of(nat) -> (nat from, nat to)
range(nat _from, nat to) -> (edit range {tag, mut nat from, nat to})
mutget(edit range, nat skipped) -> (nat)
ptr
mul(nat x, nat y) -> (nat)
add(any ptr allocated, nat offset) -> (any ptr {follows any ptr allocated})
dereference_ptr(any ptr) -> (any ptr)
free(mut any ptr) -> ()
free(mut any ptr) -> ()
free(mut any ptr) -> ()

new - allocations on new memory

Defined in: std/core/allocators.s line 22

new() -> (new {tag})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 3

strdat

strdat - string data without the buffer storage

Defined in: std/core/string.s line 37

strdat(nat pos, nat length, char first) -> (nat pos, nat length, char first)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

strdat

Defined in: std/mini.s line 22

strdat(nat _pos, nat _length) -> (nat16 pos, nat16 length)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 49

Potential errors

  1. nat value too large to pack in nat16

str

str - a string residing on a buffer

Defined in: std/core/string.s line 69

str(char[], nat pos, "len", nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 18
  • Transpiled C size: 118

Potential errors

  1. can only define strings on contiguous buffers
  2. null pointer
  3. can only define strings on non-offset buffers
  4. out of bounds

str - tautology function for strings

Defined in: std/core/string.s line 65

str(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 57

str(char[]) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 165

Potential errors

  1. null pointer
  2. out of bounds
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 57

str(char[], nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 147

Potential errors

  1. null pointer
  2. out of bounds
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on a buffer

Defined in: std/core/string.s line 50

str(char[], nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 100

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 45

str(char ptr unsafe_ptr, nat pos, nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 43

str - a string residing on a buffer

Defined in: std/core/string.s line 41

str(char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

str - convert to string

Defined in: std/core/string.s line 93

str(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Defines an implicit constant buffer using the cstr’s memory data. Subsequent comparisons no longer use the underlying pointer value.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 169

str - a string residing on a buffer

Defined in: std/core/string.s line 86

str(char[], nat endpos, "from", nat pos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 62

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 77

str(char[], nat pos, "to", nat endpos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 143

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

str - reads a string from the console

Defined in: std/core/convertstr.s line 113

str(edit arena, console console) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The read string is placed on an arena while consuming only the necessarily minimum size.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 47
  • Transpiled C size: 279

Potential errors

  1. read string does not fit on buffer
  2. null pointer
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. unexpected end of console read

str - reads a string from the console

Defined in: std/core/convertstr.s line 113

str(new CHARS, console console) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The read string is placed onto memory that keeps being reallocated to accommodate its size. The resulting memory will consume exactly the required size in bytes.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 79
  • Transpiled C size: 486

Potential errors

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. allocation failed
  5. reallocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. cannot resize an unallocated or freed buffer
  9. out of bounds
  10. can only define strings on contiguous buffers
  11. can only define strings on non-offset buffers
  12. unexpected end of console read

defered calls

free(mut any ptr) -> ()

str - create a compact str

Defined in: std/mini.s line 35

str(cstr) -> (str {tag, char ptr unsafe_ptr, nat16 dat.pos, nat16 dat.length})

The created str variation should be used only for storng and retrieving data with ‘unpack’ for memory efficiency.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 51

Potential errors

  1. nat value too large to pack in nat16

str - create a compact str

Defined in: std/mini.s line 27

str(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat16 dat.pos, nat16 dat.length})

The created str variation should be used only for storng and retrieving data with ‘unpack’ for memory efficiency.

Complexity

  • Level of abstraction: 2 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 39

Potential errors

  1. nat value too large to pack in nat16

str - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 59

str(cstr ptr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 44

Potential errors

  1. null pointer

str - overloads an operator while dereferencing pointer data

Defined in: std/ptrpeek.s line 59

str(str ptr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 86

Potential errors

  1. null pointer

copy

copy - copy a string

Defined in: std/core/string.s line 143

copy(edit list, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 157

Potential errors

  1. reallocation failed
  2. division by zero
  3. cannot resize an unallocated or freed buffer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

copy - copy a string

Defined in: std/core/string.s line 143

copy(edit list, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 163

Potential errors

  1. reallocation failed
  2. division by zero
  3. cannot resize an unallocated or freed buffer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

copy - copy a string

Defined in: std/core/string.s line 143

copy(edit circular, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 157

Potential errors

  1. does not fit in circular arena
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers

copy - copy a string

Defined in: std/core/string.s line 143

copy(edit circular, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 163

Potential errors

  1. does not fit in circular arena
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers

copy - copy a string

Defined in: std/core/string.s line 143

copy(edit arena, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 157

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. arena is out of space

copy - copy a string

Defined in: std/core/string.s line 143

copy(edit arena, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 163

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. arena is out of space

copy - copy a string

Defined in: std/core/string.s line 143

copy(edit bucket, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 145

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. reallocation failed
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

copy - copy a string

Defined in: std/core/string.s line 143

copy(edit bucket, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 151

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. reallocation failed
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

copy - copy a string

Defined in: std/core/string.s line 143

copy(new CHARS, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 142

Potential errors

  1. allocation failed
  2. can only define strings on non-offset buffers
  3. can only define strings on contiguous buffers

defered calls

free(mut any ptr) -> ()

copy - copy a string

Defined in: std/core/string.s line 143

copy(new CHARS, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 148

Potential errors

  1. allocation failed
  2. can only define strings on non-offset buffers
  3. can only define strings on contiguous buffers

defered calls

free(mut any ptr) -> ()

copy

Defined in: std/core/string.s line 135

copy(edit list, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 131

Potential errors

  1. reallocation failed
  2. division by zero
  3. cannot resize an unallocated or freed buffer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

copy

Defined in: std/core/string.s line 135

copy(edit circular, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 131

Potential errors

  1. does not fit in circular arena
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers

copy

Defined in: std/core/string.s line 135

copy(edit arena, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 131

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. arena is out of space

copy

Defined in: std/core/string.s line 135

copy(edit bucket, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 25
  • Transpiled C size: 119

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. reallocation failed
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

copy

Defined in: std/core/string.s line 135

copy(new CHARS, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 116

Potential errors

  1. allocation failed
  2. can only define strings on non-offset buffers
  3. can only define strings on contiguous buffers

defered calls

free(mut any ptr) -> ()

copy - convert a number to a string

Defined in: std/core/string.s line 571

copy(edit list, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 134
  • Transpiled C size: 1210

Potential errors

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. cannot convert negative float to nat
  5. reallocation failed
  6. cannot resize an unallocated or freed buffer
  7. out of bounds
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

copy - convert a number to a string

Defined in: std/core/string.s line 571

copy(edit circular, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 134
  • Transpiled C size: 1210

Potential errors

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. cannot convert negative float to nat
  5. out of bounds
  6. does not fit in circular arena
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers

copy - convert a number to a string

Defined in: std/core/string.s line 571

copy(edit arena, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 134
  • Transpiled C size: 1210

Potential errors

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. cannot convert negative float to nat
  5. out of bounds
  6. arena is out of space
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers

copy - convert a number to a string

Defined in: std/core/string.s line 571

copy(edit bucket, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 129
  • Transpiled C size: 1198

Potential errors

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. cannot convert negative float to nat
  5. allocation failed
  6. reallocation failed
  7. cannot allocate a buffer of unsized type
  8. cannot resize buffers with alloc; it promises no data reallocation
  9. out of bounds
  10. can only define strings on contiguous buffers
  11. can only define strings on non-offset buffers

copy - convert a number to a string

Defined in: std/core/string.s line 571

copy(new CHARS, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 128
  • Transpiled C size: 1195

Potential errors

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. cannot convert negative float to nat
  5. allocation failed
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

copy - convert a number to a string

Defined in: std/core/string.s line 510

copy(edit list, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on a character memory surface effect CHARS. Example:

CHARS = edit list char[]
s = copy 123

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 79
  • Transpiled C size: 477

Potential errors

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. reallocation failed
  5. cannot resize an unallocated or freed buffer
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers

copy - convert a number to a string

Defined in: std/core/string.s line 510

copy(edit circular, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on a character memory surface effect CHARS. Example:

CHARS = edit circular alloc 10
s = copy 123

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 79
  • Transpiled C size: 477

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. does not fit in circular arena
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

copy - convert a number to a string

Defined in: std/core/string.s line 510

copy(edit arena, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on a character memory surface effect CHARS. Example:

CHARS = edit arena alloc 10
s = copy 123

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 79
  • Transpiled C size: 477

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

copy - convert a number to a string

Defined in: std/core/string.s line 510

copy(edit bucket, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on a character memory surface effect CHARS. Example:

s = copy 123

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 74
  • Transpiled C size: 465

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. reallocation failed
  5. cannot allocate a buffer of unsized type
  6. cannot resize buffers with alloc; it promises no data reallocation
  7. out of bounds
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

copy - convert a number to a string

Defined in: std/core/string.s line 510

copy(new CHARS, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The result is placed on a character memory surface effect CHARS. Example:

CHARS = new()
s = copy 123

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 73
  • Transpiled C size: 462

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

copy - copy a vector

Defined in: std/sci/vec.s line 272

copy(edit circular, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 205

Potential errors

  1. does not fit in circular arena
  2. null pointer
  3. can only place vectors on contiguous buffers
  4. cannot place vectors on buffer offsets

copy - copy a vector

Defined in: std/sci/vec.s line 272

copy(edit arena, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 205

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. arena is out of space

copy - copy a vector

Defined in: std/sci/vec.s line 272

copy(new FLOATS, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Grabs a FLOATS for the result as an effect.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 190

Potential errors

  1. allocation failed
  2. null pointer

copy_null_terminated

copy_null_terminated - copy a string while adding null termination

Defined in: std/core/string.s line 306

copy_null_terminated(edit arena, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Constructs the copy on the buffer at a given position and returns it. The position is mutated to indicate where the string ends (e.g., to copy more strings). This operation may fail if the string does not fit the current allocation - prefer copying on a list mut char[] instead.

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 35
  • Transpiled C size: 205

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. string buffer out of memory

copy_null_terminated - copy a string while adding null termination

Defined in: std/core/string.s line 306

copy_null_terminated(edit arena, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Constructs the copy on the buffer at a given position and returns it. The position is mutated to indicate where the string ends (e.g., to copy more strings). This operation may fail if the string does not fit the current allocation - prefer copying on a list mut char[] instead.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 211

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. string buffer out of memory

copy_null_terminated - create null terminated string

Defined in: std/core/string.s line 161

copy_null_terminated(new CHARS, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

Copies a string to a new buffer while ensuring null termination. This is mainly useful for supporting ‘cstr unsafe_temp’.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 168

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

unsafe_temp

unsafe_temp - tautology function for cstr

Defined in: std/core/string.s line 212

unsafe_temp(cstr) -> (cstr cstr, str)

This is mainly used as a stt-input counterpart for converting str|cstr to cstr.

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 36

unsafe_temp - convert a string to a temporary null-terminated (cstr,str) pair

Defined in: std/core/string.s line 173

unsafe_temp(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (unsafe_temp {tag, cstr cstr, str})

This function’s return is meant to be passed to operating system calls, or return from compt with the pattern ‘cstr unsafetemp stringvalue’. It will become invalid once the calling site ends. It also does not admit proper cstr equality comparisons via pointer values that reflect contents; it will always compare equal only to itself. An optimization that safely checks the last element and one position beyond the buffer’s contents for null termination is also employed. Modifying the string buffer in any capacity invalidates the null termination property, so in general do not manipulate strings while this is used in code; use it only for its intended purposes.

Warning: This is unsafe, unless ‘cstr unsafe_temp’ is the last call before passing data to ‘compt’ or ‘macro’.
Info: This is safe to run during ‘compt’ or ‘macro’ in that the latter will fail gracefully.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 75

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

unsafe_temp - convert a string to a temporary null-terminated (cstr,str) pair

Defined in: std/core/string.s line 173

unsafe_temp(str, str) -> (unsafe_temp {tag, cstr cstr, str})

This function’s return is meant to be passed to operating system calls, or return from compt with the pattern ‘cstr unsafetemp stringvalue’. It will become invalid once the calling site ends. It also does not admit proper cstr equality comparisons via pointer values that reflect contents; it will always compare equal only to itself. An optimization that safely checks the last element and one position beyond the buffer’s contents for null termination is also employed. Modifying the string buffer in any capacity invalidates the null termination property, so in general do not manipulate strings while this is used in code; use it only for its intended purposes.

Warning: This is unsafe, unless ‘cstr unsafe_temp’ is the last call before passing data to ‘compt’ or ‘macro’.
Info: This is safe to run during ‘compt’ or ‘macro’ in that the latter will fail gracefully.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 48
  • Transpiled C size: 244

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

endpos

endpos - the end position of a string

Defined in: std/core/string.s line 224

endpos(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (nat)

This position is computed relative to its start in its enclosing buffer.

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 13

revalidate

revalidate - re-obtains the string’s first charcater

Defined in: std/core/string.s line 230

revalidate(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

This operation should be rarely used, if at all. It basically re-retrieves the first character of the string from its supporting memory surface. Normal bug-free code can continue to operate properly even without this operation, but if memory gets corrupted you can use this operation to obtain a string that properly matches the underlying memory for its new data. Here is an example:

CHARS = edit arena alloc 8
s1 = copy 123      # place '123' on the arena
CHARS.pos = 0      # manually reset the arena
copy 456           # place different data on the arena
print s1.dat.first # prints 1 (wrong cached first character)
print s1           # prints 456
s2 = revalidate s1
print s2.dat.first # prints 2

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 24

starts_with

starts_with - check whether a string starts with a particular substring sequence

Defined in: std/core/string.s line 358

starts_with(str, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 213

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

starts_with - check whether a string starts with a particular substring sequence

Defined in: std/core/string.s line 358

starts_with(str, cstr _needle) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 207

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

starts_with - check whether a string starts with a particular substring sequence

Defined in: std/core/string.s line 358

starts_with(cstr _stack, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 207

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

starts_with - check whether a string starts with a particular substring sequence

Defined in: std/core/string.s line 358

starts_with(cstr _stack, cstr _needle) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 201

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

ends_with

ends_with - check whether a string ends with a particular substring sequence

Defined in: std/core/string.s line 366

ends_with(str, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 47
  • Transpiled C size: 223

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

ends_with - check whether a string ends with a particular substring sequence

Defined in: std/core/string.s line 366

ends_with(str, cstr _needle) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 217

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

ends_with - check whether a string ends with a particular substring sequence

Defined in: std/core/string.s line 366

ends_with(cstr _stack, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 217

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

ends_with - check whether a string ends with a particular substring sequence

Defined in: std/core/string.s line 366

ends_with(cstr _stack, cstr _needle) -> (bool)

Complexity

  • Level of abstraction: 1 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 211

Potential errors

  1. null pointer
  2. slice out of string bounds
  3. out of bounds

contains

contains - check whether a string contains a needle substring

Defined in: std/core/string.s line 384

contains(str, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 60
  • Transpiled C size: 357

contains - check whether a string contains a needle substring

Defined in: std/core/string.s line 384

contains(str, cstr _needle) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 56
  • Transpiled C size: 351

contains - check whether a string contains a needle substring

Defined in: std/core/string.s line 384

contains(cstr _stack, str) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 56
  • Transpiled C size: 351

contains - check whether a string contains a needle substring

Defined in: std/core/string.s line 384

contains(cstr _stack, cstr _needle) -> (bool)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 52
  • Transpiled C size: 345

contains - check whether a string contains a needle character

Defined in: std/core/string.s line 376

contains(str, char needle) -> (bool)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 256

Potential errors

  1. null pointer
  2. out of bounds

contains - check whether a string contains a needle character

Defined in: std/core/string.s line 376

contains(cstr _stack, char needle) -> (bool)

Complexity

  • Level of abstraction: 0 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 29
  • Transpiled C size: 250

Potential errors

  1. null pointer
  2. out of bounds

find

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(str, str) -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 62
  • Transpiled C size: 361

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(str, str, "end_pos") -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 67
  • Transpiled C size: 424

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(str, str, nat _skip) -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 69
  • Transpiled C size: 420

Potential errors

  1. not found
  2. nat subtraction would yield a negative

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(str, str, nat _skip, "end_pos") -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 74
  • Transpiled C size: 483

Potential errors

  1. not found
  2. nat subtraction would yield a negative

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(str, cstr _needle) -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 58
  • Transpiled C size: 355

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(str, cstr _needle, "end_pos") -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 63
  • Transpiled C size: 418

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(str, cstr _needle, nat _skip) -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 65
  • Transpiled C size: 414

Potential errors

  1. not found
  2. nat subtraction would yield a negative

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(str, cstr _needle, nat _skip, "end_pos") -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 70
  • Transpiled C size: 477

Potential errors

  1. not found
  2. nat subtraction would yield a negative

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(cstr _stack, str) -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 58
  • Transpiled C size: 355

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(cstr _stack, str, "end_pos") -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 63
  • Transpiled C size: 418

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(cstr _stack, str, nat _skip) -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 65
  • Transpiled C size: 414

Potential errors

  1. not found
  2. nat subtraction would yield a negative

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(cstr _stack, str, nat _skip, "end_pos") -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 70
  • Transpiled C size: 477

Potential errors

  1. not found
  2. nat subtraction would yield a negative

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(cstr _stack, cstr _needle) -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 54
  • Transpiled C size: 349

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(cstr _stack, cstr _needle, "end_pos") -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 59
  • Transpiled C size: 412

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(cstr _stack, cstr _needle, nat _skip) -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 61
  • Transpiled C size: 408

Potential errors

  1. not found
  2. nat subtraction would yield a negative

find - find within a string a needle substring’s first ocurence

Defined in: std/core/string.s line 397

find(cstr _stack, cstr _needle, nat _skip, "end_pos") -> (nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 66
  • Transpiled C size: 471

Potential errors

  1. not found
  2. nat subtraction would yield a negative

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 69

find(nat[], nat _k) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 436

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds
  4. nat subtraction would yield a negative
  5. index not found

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 69

find(str[], str) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 79
  • Transpiled C size: 622

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds
  4. nat subtraction would yield a negative
  5. index not found

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 69

find(str[], cstr _k) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 75
  • Transpiled C size: 616

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds
  4. nat subtraction would yield a negative
  5. index not found

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 69

find(robinhood_nat_entry[], nat _k) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 46
  • Transpiled C size: 470

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds
  4. nat subtraction would yield a negative
  5. index not found

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 69

find(robinhood_str_entry[], str) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 82
  • Transpiled C size: 656

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds
  4. nat subtraction would yield a negative
  5. index not found

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 69

find(robinhood_str_entry[], cstr _k) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 78
  • Transpiled C size: 650

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds
  4. nat subtraction would yield a negative
  5. index not found

empty

empty - checks that a string does not have any character

Defined in: std/core/string.s line 504

empty(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (bool)

Prefer this check because its cstr-checking counterpar is faster than casting to a string.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 31

empty - checks that a cstr does not have any characters

Defined in: std/core/string.s line 496

empty(cstr) -> (bool)

There are two conditions checked: a) that the cstr is an emptry pair of brackets, b) that the cstr is zero-initialized, corresponding to a null memory address. This function is faster than ‘0==len str c’, as there is no need to actually traverse the character contents.

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 59

is_number

is_number

Defined in: std/core/convertstr.s line 31

is_number(char) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 29

ok

ok - checks that an error code is an error

Defined in: std/core/error.s line 31

ok(last_error) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 11

printf

printf - prints a formatted string

Defined in: std/core/format.s line 4

printf(cstr) -> (mut char[])

This splits the provided string into subsegments and bracketed expressions. Ignoring empty substrings, the same function call is made for all substrings and expressions. Example, where the default applied call is print nn:

import std.core
def main()
    CLI = edit console()
    macro<printf> "hello {1+1} word\n"

This variation outputs an empty buffer.

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 165
  • Transpiled C size: 1234

Potential errors

  1. null pointer
  2. imbalanced brackets
  3. allocation failed
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

printf - emmits string formatting code

Defined in: std/core/format.s line 4

printf(cstr func, cstr args) -> (mut char[])

This splits the provided string into subsegments and bracketed expressions. Ignoring empty substrings, the same function call is made for all substrings and expressions. The results are placed on a buffer; this makes no allocation in case of blank types, but otherwise this pattern can be used to apply the same conceptual transformation on heterogeneous data to yield the same output. Printing like above is the main intended use, but consider the logic of the following example too:

import std.core
import std.format::F
def inc(nat x)
    return float(x+1)
def inc(float x)
    return x+1.0
def main()
    CLI = edit console()
    v = macro<printf>("inc", "{1}{5.0}")
    print v[0] # 2.0
    print v[1] # 6.0

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 164
  • Transpiled C size: 1230

Potential errors

  1. null pointer
  2. imbalanced brackets
  3. allocation failed
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

rotl

rotl - rotate and shift operation needed for xoshiro sequences

Defined in: std/rand.s line 26

rotl(nat x, nat k) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 27

splitmix64

splitmix64 - time seed

Defined in: std/rand.s line 56

splitmix64("time") -> (nat)

Computes the seed of a splitmix64 sequence using the clock as the source of entropy.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 62

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [time.time_ns()]

splitmix64 - next random number

Defined in: std/rand.s line 34

splitmix64(mut nat) -> (mut nat)

Computes the next number of a splitmix64 random sequence using the mutable unsigned int argument as state to be updated. This is NOT cryptographically secure and also has small period of 2^64 so usage is not recommended for long-running sequences. It is, however, faster than computing a next Rand state with next. If you do not provide a seed, a number obtained from the current time is provided. That can only be the start of a sequence, and marked as a leaking resource to prevent time-based randomization (which is not random).

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 65

Rand

Rand - random number generator

Defined in: std/rand.s line 79

Rand() -> (edit Rand {tag, mut nat s0, mut nat s1, mut nat s2, mut nat s3})

Xoshiro256plus random numbers from https://prng.di.unimi.it/ These and are NOT cryptographically secure. This a structural type for storing the progress of random number generators on four nat state fields. This version defaults to a time-based seed. Its period is 2^256-1.

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 26

Rand - random number generator

Defined in: std/rand.s line 66

Rand(nat) -> (edit Rand {tag, mut nat s0, mut nat s1, mut nat s2, mut nat s3})

Xoshiro256plus random numbers from https://prng.di.unimi.it/ These and are NOT cryptographically secure. This a type for storing the progress of random number generators on four nat state fields. The version is seed-initalized. Its period is 2^256-1.

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 79

next

next - next random number

Defined in: std/rand.s line 87

next(mut Rand {tag, mut nat s0, mut nat s1, mut nat s2, mut nat s3}) -> (float)

Computes the next random number of a Rand sequence.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 79

next

Defined in: std/map.s line 54

next(robinhood_nat_entry[], mut nat pos) -> (mut nat)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 346

Potential errors

  1. null pointer
  2. out of bounds

next

Defined in: std/map.s line 54

next(robinhood_str_entry[], mut nat pos) -> (mut str {tag, mut char ptr unsafe_ptr, mut nat dat.pos, mut nat dat.length, mut char dat.first})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 62
  • Transpiled C size: 556

Potential errors

  1. null pointer
  2. out of bounds

Hashable

nat - an unsigned integer value

Defined in: builtins line 1

nat

Represents values in the range 0 to 2^64-1.

float

Defined in: builtins line 1

float

cstr - constant string

Defined in: builtins line 1

cstr

nat - retrieved unsigned number from lesser-bit unsigned number

Defined in: std/core/convert.s line 170

nat(nat32) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

nat - retrieved unsigned number from lesser-bit unsigned number

Defined in: std/core/convert.s line 170

nat(nat16) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

nat - retrieved unsigned number from lesser-bit unsigned number

Defined in: std/core/convert.s line 170

nat(nat8) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 7

float - cast to float

Defined in: std/core/convert.s line 81

float(bits {tag, nat value}) -> (float)

Converts a bit representation to the corresponding float number.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 18

nat - cast to nat

Defined in: std/core/convert.s line 70

nat(bits {tag, nat value}) -> (nat)

Converts a bit representation to the corresponding natural number.

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

nat - cast to nat

Defined in: std/core/convert.s line 35

nat(nat) -> (nat)

Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 7

nat - cast to nat

Defined in: std/core/convert.s line 35

nat(int) -> (nat)

Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 42

Potential errors

  1. cannot convert negative int to nat

nat - cast to nat

Defined in: std/core/convert.s line 35

nat(float) -> (nat)

Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 42

Potential errors

  1. cannot convert negative float to nat

float - cast to float

Defined in: std/core/convert.s line 20

float(nat) -> (float)

May lose information because floats are not exact representation of all integers.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

float - cast to float

Defined in: std/core/convert.s line 20

float(int) -> (float)

May lose information because floats are not exact representation of all integers.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

float - cast to float

Defined in: std/core/convert.s line 20

float(float) -> (float)

Serves as a tautology function for code that parses on multiple number types.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 7

str - a string residing on a buffer

Defined in: std/core/string.s line 69

str(char[], nat pos, "len", nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 18
  • Transpiled C size: 118

Potential errors

  1. can only define strings on contiguous buffers
  2. null pointer
  3. can only define strings on non-offset buffers
  4. out of bounds

str - tautology function for strings

Defined in: std/core/string.s line 65

str(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 57

str(char[]) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 165

Potential errors

  1. null pointer
  2. out of bounds
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 57

str(char[], nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 147

Potential errors

  1. null pointer
  2. out of bounds
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on a buffer

Defined in: std/core/string.s line 50

str(char[], nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 100

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 45

str(char ptr unsafe_ptr, nat pos, nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 43

str - a string residing on a buffer

Defined in: std/core/string.s line 41

str(char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 218

cstr(cstr cstr, str) -> (cstr)

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 3

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 218

cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 218

cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

str - convert to string

Defined in: std/core/string.s line 93

str(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Defines an implicit constant buffer using the cstr’s memory data. Subsequent comparisons no longer use the underlying pointer value.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 169

str - a string residing on a buffer

Defined in: std/core/string.s line 86

str(char[], nat endpos, "from", nat pos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 62

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 77

str(char[], nat pos, "to", nat endpos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 143

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

hash

hash

Defined in: std/hash.s line 29

hash(nat k, nat size) -> (nat)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 35
  • Transpiled C size: 200

Potential errors

  1. modulo by zero

hash

Defined in: std/hash.s line 23

hash(str, nat size) -> (nat)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 262

Potential errors

  1. null pointer
  2. modulo by zero
  3. out of bounds

to_hash_base

to_hash_base

Defined in: std/hash.s line 43

to_hash_base(nat) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

to_hash_base

Defined in: std/hash.s line 43

to_hash_base(int) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

to_hash_base

Defined in: std/hash.s line 43

to_hash_base(float) -> (bits {tag, nat value})

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 11

to_hash_base

Defined in: std/hash.s line 40

to_hash_base(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 20

to_hash_base

Defined in: std/hash.s line 40

to_hash_base(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 26

robinhood_str_entry

robinhood_str_entry

Defined in: std/hash.s line 46

robinhood_str_entry(str, nat cost) -> (str, nat cost)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 3

robinhood_nat_entry

robinhood_nat_entry

Defined in: std/hash.s line 49

robinhood_nat_entry(nat s, nat cost) -> (nat s, nat cost)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

robinhood_entry

robinhood_nat_entry

Defined in: std/hash.s line 49

robinhood_nat_entry(nat s, nat cost) -> (nat s, nat cost)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

robinhood_str_entry

Defined in: std/hash.s line 46

robinhood_str_entry(str, nat cost) -> (str, nat cost)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 3

raw

raw

Defined in: std/hash.s line 60

raw(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 1 to 7 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 20

raw

Defined in: std/hash.s line 57

raw(nat) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 3

raw

Defined in: std/hash.s line 57

raw(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

raw

Defined in: std/hash.s line 54

raw(nat s, nat cost) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

raw

Defined in: std/hash.s line 54

raw(str, nat cost) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 3

is_zero

is_zero

Defined in: std/hash.s line 66

is_zero(nat) -> (bool)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 17

is_zero

Defined in: std/hash.s line 63

is_zero(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (bool)

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 31

strmap

strmap - a string map

Defined in: std/map.s line 20

strmap(edit any[]) -> (mut robinhood_str_entry[], edit any[])

Maps string indexes to the buffer provided using a robinhood scheme. Map size is static and cannot be adjusted after initialization.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 104

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

natmap

natmap - a natural number map

Defined in: std/map.s line 27

natmap(edit any[]) -> (mut robinhood_nat_entry[], edit any[])

Maps number indexes to the buffer provided using a robinhood scheme. Map size is static and cannot be adjusted after initialization.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 104

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

unpack

unpack

Defined in: std/mini.s line 47

unpack(char[], nat16 dat.pos, nat16 dat.length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 19
  • Transpiled C size: 95

Potential errors

  1. string does not fit on buffer

unpack - unpack a compact str

Defined in: std/mini.s line 41

unpack(str {tag, char ptr unsafe_ptr, nat16 dat.pos, nat16 dat.length}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The created compact str is unpacked into its ’nat’-using representation that is more efficient for computations in 64-bit architectures.

Complexity

  • Level of abstraction: 1 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 40

post

post - a post request

Defined in: std/net/fetch.s line 92

post(edit circular, cstr url, cstr _body) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 123

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit circular, cstr url, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 119

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit circular, cstr url, str) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 140

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit circular, cstr url, str, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 136

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit circular, str, cstr _body) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 129

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit circular, str, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 125

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit circular, str, str) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 146

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit circular, str, str, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 142

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit arena, cstr url, cstr _body) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 123

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit arena, cstr url, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 119

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit arena, cstr url, str) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 140

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit arena, cstr url, str, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 136

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit arena, str, cstr _body) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 129

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit arena, str, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 125

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit arena, str, str) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 146

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(edit arena, str, str, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 42
  • Transpiled C size: 142

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

post - a post request

Defined in: std/net/fetch.s line 92

post(new CHARS, cstr url, cstr _body) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 29
  • Transpiled C size: 108

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

post - a post request

Defined in: std/net/fetch.s line 92

post(new CHARS, cstr url, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 104

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

post - a post request

Defined in: std/net/fetch.s line 92

post(new CHARS, cstr url, str) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 125

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

post - a post request

Defined in: std/net/fetch.s line 92

post(new CHARS, cstr url, str, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 121

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

post - a post request

Defined in: std/net/fetch.s line 92

post(new CHARS, str, cstr _body) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 114

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

post - a post request

Defined in: std/net/fetch.s line 92

post(new CHARS, str, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 110

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

post - a post request

Defined in: std/net/fetch.s line 92

post(new CHARS, str, str) -> (nat status, str) with effects CHARS

The default application/json content type is used.

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 131

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

post - a post request

Defined in: std/net/fetch.s line 92

post(new CHARS, str, str, cstr content_type) -> (nat status, str) with effects CHARS

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 127

Potential errors

  1. curl initialization failed
  2. out of memory while reading response
  3. null pointer
  4. nat subtraction would yield a negative
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

abs

abs

Defined in: std/sci/math.s line 20

abs(float) -> (float)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 38

abs

Defined in: std/sci/math.s line 27

abs(int) -> (int)

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 46

sqrt

sqrt

Defined in: std/sci/math.s line 34

sqrt(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

sin

sin

Defined in: std/sci/math.s line 39

sin(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

cos

cos

Defined in: std/sci/math.s line 44

cos(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

log

log

Defined in: std/sci/math.s line 49

log(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

tan

tan

Defined in: std/sci/math.s line 54

tan(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

floor

floor

Defined in: std/sci/math.s line 59

floor(float) -> (int)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

asin

asin

Defined in: std/sci/math.s line 64

asin(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

acos

acos

Defined in: std/sci/math.s line 69

acos(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

atan

atan

Defined in: std/sci/math.s line 79

atan(float x, float y) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 12

atan

Defined in: std/sci/math.s line 74

atan(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

exp

exp

Defined in: std/sci/math.s line 84

exp(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

isnan

isnan

Defined in: std/sci/math.s line 94

isnan(float) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 14

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [math.isnan(x)]

isinf

isinf

Defined in: std/sci/math.s line 100

isinf(float) -> (bool)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 14

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [math.isinf(x)]

vec

vec - vector type declaration

Defined in: std/sci/unsafe.s line 19

vec(float ptr unsafe_ptr, nat pos, nat length) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})

Warning: directly calling this constructor without safety checks is unsafe.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 15

vec - vector allocation

Defined in: std/sci/vec.s line 48

vec(edit circular, nat length) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 204

Potential errors

  1. does not fit in circular arena
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets

vec - vector allocation

Defined in: std/sci/vec.s line 48

vec(edit circular, nat length, "dirty") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 157

Potential errors

  1. does not fit in circular arena
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets

vec - vector allocation

Defined in: std/sci/vec.s line 48

vec(edit arena, nat length) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 204

Potential errors

  1. can only place vectors on contiguous buffers
  2. cannot place vectors on buffer offsets
  3. arena is out of space

vec - vector allocation

Defined in: std/sci/vec.s line 48

vec(edit arena, nat length, "dirty") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 157

Potential errors

  1. can only place vectors on contiguous buffers
  2. cannot place vectors on buffer offsets
  3. arena is out of space

vec - treat a float buffer as a vector

Defined in: std/sci/vec.s line 36

vec(edit float[]) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 17
  • Transpiled C size: 109

Potential errors

  1. can only place vectors on contiguous buffers
  2. cannot place vectors on buffer offsets

vec - vector on a new buffer

Defined in: std/sci/vec.s line 28

vec(new FLOATS, nat length) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Has the provided length. Requires a ’new()’ allocator to denote that the vector will be placed on a new buffer.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 123

Potential errors

  1. allocation failed

vec - vector on a new buffer

Defined in: std/sci/vec.s line 28

vec(new FLOATS, nat length, "dirty") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

Has the provided length. Requires a ’new()’ allocator to denote that the vector will be placed on a new buffer.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 96

Potential errors

  1. allocation failed

vec - view a matrix as a vector

Defined in: std/sci/mat.s line 86

vec(mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride}) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 31

mat

mat - matrix type declaration

Defined in: std/sci/unsafe.s line 24

mat(float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})

Warning: directly calling this constructor without safety checks is unsafe.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 23

mat - matrix on a fresh buffer

Defined in: std/sci/mat.s line 30

mat(new FLOATS, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 157

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

mat - matrix on a fresh buffer

Defined in: std/sci/mat.s line 30

mat(new FLOATS, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 29
  • Transpiled C size: 116

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

mat - view a vector as a matrix on the same memory

Defined in: std/sci/mat.s line 75

mat(vec, "col") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})

A ‘type “row"’ or ‘type “col"’ marker is needed to indicate the new matrix’s orientation.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 17
  • Transpiled C size: 91

mat - view a vector as a matrix on the same memory

Defined in: std/sci/mat.s line 75

mat(vec, "row") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})

A ‘type “row"’ or ‘type “col"’ marker is needed to indicate the new matrix’s orientation.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 87

mat - matrix on an existing float[] buffer

Defined in: std/sci/mat.s line 53

mat(edit float[], nat rows) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 167

Potential errors

  1. division by zero
  2. arena is out of space
  3. can only place matrices on contiguous buffers
  4. cannot place matrices on buffer offsets
  5. buffer size not divisible by vector rows

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 37

mat(edit circular, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 228

Potential errors

  1. does not fit in circular arena
  2. can only place matrices on contiguous buffers
  3. cannot place matrices on buffer offsets

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 37

mat(edit circular, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 181

Potential errors

  1. does not fit in circular arena
  2. can only place matrices on contiguous buffers
  3. cannot place matrices on buffer offsets

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 37

mat(edit arena, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 228

Potential errors

  1. can only place matrices on contiguous buffers
  2. cannot place matrices on buffer offsets
  3. arena is out of space

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 37

mat(edit arena, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 181

Potential errors

  1. can only place matrices on contiguous buffers
  2. cannot place matrices on buffer offsets
  3. arena is out of space

sparse_element

sparse_element

Defined in: std/sci/unsafe.s line 29

sparse_element(nat row, nat col, float value) -> (nat row, nat col, float value)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

coo

coo - coo sparse matrix type declaration

Defined in: std/sci/unsafe.s line 32

coo(sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})

Warning: directly calling this constructor without safety checks is unsafe.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 19

coo

Defined in: std/sci/coo.s line 40

coo(sparse_element[], nat rows, nat cols) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 40

coo - allocate a sparse matrix

Defined in: std/sci/coo.s line 34

coo(nat rows, nat cols, nat nnz) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})

This creates a new buffer of sparse elements for convenience.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 23
  • Transpiled C size: 97

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

float_allocator

new - allocations on new memory

Defined in: std/core/allocators.s line 22

new() -> (new {tag})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 3

circular

Defined in: std/sci/vec.s line 24

circular("float__t4174t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t4108t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t3821t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t655t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t616t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t614t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t612t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

circular

Defined in: std/sci/vec.s line 24

circular("float__t4t") -> (edit circular {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t4174t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t4108t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t3821t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t655t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t616t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t614t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t612t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

arena

Defined in: std/sci/vec.s line 23

arena("float__t4t") -> (edit arena {tag, edit float[], mut nat pos})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 48

constvec

constvec - treat an immutable float buffer as an immutable vector

Defined in: std/sci/vec.s line 42

constvec(float[]) -> (vec {tag, float ptr unsafe_ptr, nat pos, nat length})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 17
  • Transpiled C size: 109

Potential errors

  1. can only place vectors on contiguous buffers
  2. cannot place vectors on buffer offsets

reduce

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "mul", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 292

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "mul", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 242

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "mul", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 240

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "mul") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 196

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "add", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 292

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "add", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 242

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "add", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 240

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "add") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 196

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 228

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 178

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec, "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 176

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, vec) -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 132

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 300

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 250

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 248

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 204

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "add", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 300

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "add", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 250

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "add", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 36
  • Transpiled C size: 248

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "add") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 204

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 35
  • Transpiled C size: 236

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 186

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 184

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 28
  • Transpiled C size: 140

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "mul", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 56
  • Transpiled C size: 501

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "mul", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 53
  • Transpiled C size: 451

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "mul", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 53
  • Transpiled C size: 449

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "mul") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 49
  • Transpiled C size: 405

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "add", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 56
  • Transpiled C size: 501

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "add", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 53
  • Transpiled C size: 451

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "add", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 53
  • Transpiled C size: 449

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "add") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 49
  • Transpiled C size: 405

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 52
  • Transpiled C size: 437

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 49
  • Transpiled C size: 387

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec, "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 49
  • Transpiled C size: 385

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "rel", vec) -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 341

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "mul", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 48
  • Transpiled C size: 391

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "mul", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 341

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "mul", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 339

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "add", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 48
  • Transpiled C size: 391

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "add", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 341

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "mul") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 295

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "add", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 339

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "add") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 295

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 44
  • Transpiled C size: 327

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 277

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec, "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 275

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "sub", vec) -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 231

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "mul", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 47
  • Transpiled C size: 391

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "mul", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 44
  • Transpiled C size: 341

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "mul", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 44
  • Transpiled C size: 339

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "mul") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 295

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "add", "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 48
  • Transpiled C size: 391

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "add", "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 341

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "add", "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 45
  • Transpiled C size: 339

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "add") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 295

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "l2") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 44
  • Transpiled C size: 327

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "sqr") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 277

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec, "abs") -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 41
  • Transpiled C size: 275

Potential errors

  1. null pointer
  2. out of bounds

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 176

reduce(vec, "mul", vec) -> (float)

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 231

Potential errors

  1. null pointer
  2. out of bounds

dot

dot - dot product

Defined in: std/sci/vec.s line 212

dot(vec, vec) -> (float)

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 32

Potential errors

  1. null pointer
  2. out of bounds

sum

sum - sum

Defined in: std/sci/vec.s line 216

sum(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)

Complexity

  • Level of abstraction: 2 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 15

sum - sum of all elements

Defined in: std/sci/coo.s line 125

sum(coo, "all") -> (mut float)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 19
  • Transpiled C size: 158

sum - sum of each column

Defined in: std/sci/coo.s line 117

sum(edit circular, coo, "col") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

result[j] = sum of all stored values in column j

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 306

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. does not fit in circular arena

sum - sum of each column

Defined in: std/sci/coo.s line 117

sum(edit arena, coo, "col") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

result[j] = sum of all stored values in column j

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 306

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. arena is out of space

sum - sum of each column

Defined in: std/sci/coo.s line 117

sum(new FLOATS, coo, "col") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

result[j] = sum of all stored values in column j

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 291

Potential errors

  1. allocation failed
  2. null pointer
  3. out of bounds

sum - sum of each row

Defined in: std/sci/coo.s line 109

sum(edit circular, coo, "row") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

result[i] = sum of all stored values in row i

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 306

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. does not fit in circular arena

sum - sum of each row

Defined in: std/sci/coo.s line 109

sum(edit arena, coo, "row") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

result[i] = sum of all stored values in row i

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 38
  • Transpiled C size: 306

Potential errors

  1. null pointer
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets
  4. out of bounds
  5. arena is out of space

sum - sum of each row

Defined in: std/sci/coo.s line 109

sum(new FLOATS, coo, "row") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS

result[i] = sum of all stored values in row i

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 291

Potential errors

  1. allocation failed
  2. null pointer
  3. out of bounds

mean

mean

Defined in: std/sci/stats.s line 32

mean(accumulator {tag, float sums, float square_sums, nat count}) -> (float)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 32

Potential errors

  1. division by zero

mean - mean value

Defined in: std/sci/vec.s line 220

mean(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 56

Potential errors

  1. division by zero

min

min - minimum value

Defined in: std/sci/vec.s line 224

min(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (mut float)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 179

Potential errors

  1. null pointer
  2. out of bounds

max

max - maximum value

Defined in: std/sci/vec.s line 231

max(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (mut float)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 179

Potential errors

  1. null pointer
  2. out of bounds

var

var - variance

Defined in: std/sci/vec.s line 239

var(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 25
  • Transpiled C size: 250

Potential errors

  1. null pointer
  2. division by zero

std

std

Defined in: std/sci/stats.s line 35

std(accumulator {tag, float sums, float square_sums, nat count}) -> (float)

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 87

Potential errors

  1. division by zero

std - standard deviation

Defined in: std/sci/vec.s line 250

std(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 34

Potential errors

  1. null pointer
  2. division by zero

self

self

Defined in: std/sci/vec.s line 288

self(mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) -> (edit arena, mut vec)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 28

accumulator

accumulator

Defined in: std/sci/stats.s line 21

accumulator() -> (edit accumulator {tag, mut float sums, mut float square_sums, mut nat count})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 39

append

append

Defined in: std/sci/stats.s line 27

append(edit accumulator, float value) -> ()

Complexity

  • Level of abstraction: 1 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 56

pearson

pearson - pearson correlation between the values of two vectors

Defined in: std/sci/stats.s line 40

pearson(vec, vec) -> (float)

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 76
  • Transpiled C size: 638

Potential errors

  1. null pointer
  2. division by zero
  3. vectors must have the same length
  4. at least two values required
  5. undefined for constant vectors

rows

rows - number of rows

Defined in: std/sci/mat.s line 22

rows(mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride}) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 3

rows - number of rows

Defined in: std/sci/coo.s line 22

rows(coo {tag, sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz}) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

cols

cols - number of columns

Defined in: std/sci/mat.s line 26

cols(mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride}) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 3

cols - number of columns

Defined in: std/sci/coo.s line 26

cols(coo {tag, sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz}) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

constmat

constmat - immutable matrix on an immutable float[] buffer

Defined in: std/sci/mat.s line 47

constmat(float[], nat rows) -> (mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 167

Potential errors

  1. division by zero
  2. arena is out of space
  3. can only place matrices on contiguous buffers
  4. cannot place matrices on buffer offsets
  5. buffer size not divisible by vector rows

mutvec

mutvec - view a matrix as a vector

Defined in: std/sci/mat.s line 90

mutvec(mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride}) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 11
  • Transpiled C size: 31

row

row - view matrix row as a vector

Defined in: std/sci/mat.s line 94

row(mat, nat i) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 14
  • Transpiled C size: 64

Potential errors

  1. row out of bounds

nnz

nnz - number of stored non-zero entries

Defined in: std/sci/coo.s line 30

nnz(coo {tag, sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz}) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

todense

todense - convert to dense mat

Defined in: std/sci/coo.s line 88

todense(edit circular, coo) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 276

Potential errors

  1. null pointer
  2. does not fit in circular arena
  3. can only place matrices on contiguous buffers
  4. cannot place matrices on buffer offsets
  5. row out of bounds
  6. column out of bounds

todense - convert to dense mat

Defined in: std/sci/coo.s line 88

todense(edit arena, coo) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 276

Potential errors

  1. null pointer
  2. arena is out of space
  3. can only place matrices on contiguous buffers
  4. cannot place matrices on buffer offsets
  5. row out of bounds
  6. column out of bounds

todense - convert to dense mat

Defined in: std/sci/coo.s line 88

todense(new FLOATS, coo) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 261

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. row out of bounds
  6. column out of bounds

defered calls

free(mut any ptr) -> ()

matrix

coo - coo sparse matrix type declaration

Defined in: std/sci/unsafe.s line 32

coo(sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})

Warning: directly calling this constructor without safety checks is unsafe.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 19

mat - matrix type declaration

Defined in: std/sci/unsafe.s line 24

mat(float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})

Warning: directly calling this constructor without safety checks is unsafe.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 12
  • Transpiled C size: 23

mat - matrix on a fresh buffer

Defined in: std/sci/mat.s line 30

mat(new FLOATS, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 32
  • Transpiled C size: 157

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

mat - matrix on a fresh buffer

Defined in: std/sci/mat.s line 30

mat(new FLOATS, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 29
  • Transpiled C size: 116

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

coo

Defined in: std/sci/coo.s line 40

coo(sparse_element[], nat rows, nat cols) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 40

coo - allocate a sparse matrix

Defined in: std/sci/coo.s line 34

coo(nat rows, nat cols, nat nnz) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})

This creates a new buffer of sparse elements for convenience.

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 23
  • Transpiled C size: 97

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

mat - view a vector as a matrix on the same memory

Defined in: std/sci/mat.s line 75

mat(vec, "col") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})

A ‘type “row"’ or ‘type “col"’ marker is needed to indicate the new matrix’s orientation.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 17
  • Transpiled C size: 91

mat - view a vector as a matrix on the same memory

Defined in: std/sci/mat.s line 75

mat(vec, "row") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})

A ‘type “row"’ or ‘type “col"’ marker is needed to indicate the new matrix’s orientation.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 87

mat - matrix on an existing float[] buffer

Defined in: std/sci/mat.s line 53

mat(edit float[], nat rows) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 26
  • Transpiled C size: 167

Potential errors

  1. division by zero
  2. arena is out of space
  3. can only place matrices on contiguous buffers
  4. cannot place matrices on buffer offsets
  5. buffer size not divisible by vector rows

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 37

mat(edit circular, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 228

Potential errors

  1. does not fit in circular arena
  2. can only place matrices on contiguous buffers
  3. cannot place matrices on buffer offsets

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 37

mat(edit circular, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 181

Potential errors

  1. does not fit in circular arena
  2. can only place matrices on contiguous buffers
  3. cannot place matrices on buffer offsets

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 37

mat(edit arena, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 43
  • Transpiled C size: 228

Potential errors

  1. can only place matrices on contiguous buffers
  2. cannot place matrices on buffer offsets
  3. arena is out of space

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 37

mat(edit arena, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 181

Potential errors

  1. can only place matrices on contiguous buffers
  2. cannot place matrices on buffer offsets
  3. arena is out of space

tagged

tagged - blank tag structure

Defined in: std/tag.s line 20

tagged(cstr) -> (tagged {tag, cstr value})

Ensures that ‘tag ptr’ has a unique type and allocates at least a cstr’s (a pointer’s) worth of storage so that tag checking is always valid.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

unsafe_match

unsafe_match

Defined in: std/tag.s line 26

unsafe_match(tagged ptr obj, cstr name, any ptr type) -> (mut any ptr {follows any ptr type})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 98

Potential errors

  1. null pointer
  2. does not match

unsafe_defer_free

unsafe_defer_free

Defined in: std/tag.s line 31

unsafe_defer_free(mut tagged ptr) -> (mut tagged ptr)

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 3

defered calls

free(mut any ptr) -> ()

tagged_alloc

tagged_alloc

Defined in: std/tag.s line 36

tagged_alloc(edit arena, nat size) -> (mut char ptr)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 120

Potential errors

  1. out of bounds
  2. arena is out of space

match

match

Defined in: std/tag.s line 63

match(cstr obj, cstr type_name) -> (mut char[])

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 73
  • Transpiled C size: 433

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

match

Defined in: std/pipe.s line 123

match(cstr obj, cstr type_name) -> (mut char[])

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 73
  • Transpiled C size: 433

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation
  4. arena is out of space
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

pipe

pipe - blank pipe structure

Defined in: std/pipe.s line 21

pipe(cstr) -> (pipe {tag, cstr value})

Ensures that ‘pipe ptr’ has a unique type and allocates at least a cstr’s (a pointer’s) + sizeof(mutex_t) worth of storage so that tag checking and mutex checking are always valid.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

mutex_size

mutex_size

Defined in: std/pipe.s line 28

mutex_size() -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 10

unsafe_pipe_lock

unsafe_pipe_lock

Defined in: std/pipe.s line 32

unsafe_pipe_lock(pipe ptr) -> ()

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 27

unsafe_pipe_unlock

unsafe_pipe_unlock

Defined in: std/pipe.s line 36

unsafe_pipe_unlock(pipe ptr) -> ()

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 27

with

with - gain ownership of a pipe

Defined in: std/pipe.s line 40

with(pipe ptr) -> (with {tag, pipe ptr obj})

This blocks other threads from accessing its data.

Complexity

  • Level of abstraction: 1 to 3 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 8

defered calls

unsafe_pipe_unlock(pipe ptr) -> ()

system_thread

system_thread

Defined in: std/pipe.s line 48

system_thread(any ptr) -> (system_thread {tag, any ptr unsafe_ptr})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

unsafe_spawn

unsafe_spawn

Defined in: std/pipe.s line 51

unsafe_spawn((pipe ptr) -> () func, pipe ptr input) -> (system_thread {tag, any ptr unsafe_ptr {follows any ptr _unsafe_ptr}})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 31

join

join

Defined in: std/pipe.s line 56

join(system_thread {tag, any ptr unsafe_ptr}) -> ()

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 19

cpu

cpu

Defined in: std/pipe.s line 60

cpu(nat) -> (cpu {tag, nat cores})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

growing_thread_pool

growing_thread_pool

Defined in: std/pipe.s line 63

growing_thread_pool(cpu {tag, nat cores}) -> (edit growing_thread_pool {tag, cpu, mut arena, mut bool joined})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 53
  • Transpiled C size: 140

Potential errors

  1. allocation failed
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()
not(bool) -> (bool)
len(any[]) -> (nat)
of(nat) -> (nat from, nat to)
range(nat _from, nat to) -> (edit range {tag, mut nat from, nat to})
mutget(edit range, nat skipped) -> (nat)
mutget(edit any[], nat i) -> (mut any ptr {follows any ptr buffer.unsafe_ptr})
join(system_thread {tag, any ptr unsafe_ptr}) -> ()

thread

thread

Defined in: std/pipe.s line 73

thread(edit growing_thread_pool, (pipe ptr) -> () func, pipe ptr input) -> (mut system_thread {tag, mut any ptr unsafe_ptr {follows any ptr ..unsafe_ptr}}) with effects THREADS

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 27
  • Transpiled C size: 120

Potential errors

  1. null pointer
  2. out of bounds
  3. arena is out of space

unsafe_pipe_match

unsafe_pipe_match

Defined in: std/pipe.s line 78

unsafe_pipe_match(with, cstr name, any ptr type) -> (mut any ptr {follows any ptr type})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 114

Potential errors

  1. null pointer
  2. does not match

unsafe_pipe_defer_free

unsafe_pipe_defer_free

Defined in: std/pipe.s line 83

unsafe_pipe_defer_free(mut pipe ptr) -> (mut pipe ptr)

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 3

defered calls

free(mut any ptr) -> ()

unsafe_pipe_mutax_init

unsafe_pipe_mutax_init

Defined in: std/pipe.s line 88

unsafe_pipe_mutax_init(mut pipe ptr) -> (mut pipe ptr)

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 30

defered calls

add(any ptr allocated, nat offset) -> (any ptr {follows any ptr allocated})

pipe_alloc

pipe_alloc

Defined in: std/pipe.s line 96

pipe_alloc(edit arena, nat size) -> (mut char ptr)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 30
  • Transpiled C size: 120

Potential errors

  1. out of bounds
  2. arena is out of space

shared

shared

Defined in: std/pipe.s line 100

shared(cstr) -> (mut char[])

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 98
  • Transpiled C size: 627

Potential errors

  1. null pointer
  2. allocation failed
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. arena is out of space
  6. empty input name
  7. cannot tag a structural type
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

shared

Defined in: std/pipe.s line 100

shared(cstr surface, cstr obj) -> (mut char[])

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 112
  • Transpiled C size: 755

Potential errors

  1. null pointer
  2. allocation failed
  3. cannot allocate a buffer of unsized type
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. arena is out of space
  6. empty input name
  7. cannot tag a structural type
  8. out of bounds
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers
  11. tag surface cannot be structural type

defered calls

free(mut any ptr) -> ()

unsafe_blob

unsafe_blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 19

unsafe_blob(any ptr unsafe_ptr, 64) -> (unsafe_blob {tag, any ptr unsafe_ptr, 64})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

unsafe_blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 19

unsafe_blob(any ptr unsafe_ptr, 32) -> (unsafe_blob {tag, any ptr unsafe_ptr, 32})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

unsafe_blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 19

unsafe_blob(any ptr unsafe_ptr, 16) -> (unsafe_blob {tag, any ptr unsafe_ptr, 16})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

unsafe_blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 19

unsafe_blob(any ptr unsafe_ptr, 8) -> (unsafe_blob {tag, any ptr unsafe_ptr, 8})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

unsafe_blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 19

unsafe_blob(any ptr unsafe_ptr, 4) -> (unsafe_blob {tag, any ptr unsafe_ptr, 4})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

unsafe_blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 19

unsafe_blob(any ptr unsafe_ptr, 2) -> (unsafe_blob {tag, any ptr unsafe_ptr, 2})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

unsafe_blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 19

unsafe_blob(any ptr unsafe_ptr, 1) -> (unsafe_blob {tag, any ptr unsafe_ptr, 1})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 3

blob

blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 23

blob(64) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 64})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 21

blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 23

blob(32) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 32})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 21

blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 23

blob(16) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 16})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 21

blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 23

blob(8) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 8})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 21

blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 23

blob(4) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 4})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 21

blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 23

blob(2) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 2})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 21

blob - a pointer to an in-memory blob of data fixed size

Defined in: std/blob.s line 23

blob(1) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 1})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 21

blob - macro for creating a blob given a data pointer

Defined in: std/blob.s line 53

blob(cstr) -> (mut char[])

Complexity

  • Level of abstraction: 1 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 56
  • Transpiled C size: 320

Potential errors

  1. allocation failed
  2. arena is out of space
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

as

as - reinterpret a blob of data as a character array

Defined in: std/blob.s line 28

as(unsafe_blob, char[]) -> (char[])

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 160

Potential errors

  1. cannot cast a blob onto an already allocated array
  2. nat value too large to pack in nat32

as - reinterpret a blob of data as a character array

Defined in: std/blob.s line 28

as(unsafe_blob, char[]) -> (char[])

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 160

Potential errors

  1. cannot cast a blob onto an already allocated array
  2. nat value too large to pack in nat32

as - reinterpret a blob of data as a character array

Defined in: std/blob.s line 28

as(unsafe_blob, char[]) -> (char[])

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 160

Potential errors

  1. cannot cast a blob onto an already allocated array
  2. nat value too large to pack in nat32

as - reinterpret a blob of data as a character array

Defined in: std/blob.s line 28

as(unsafe_blob, char[]) -> (char[])

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 160

Potential errors

  1. cannot cast a blob onto an already allocated array
  2. nat value too large to pack in nat32

as - reinterpret a blob of data as a character array

Defined in: std/blob.s line 28

as(unsafe_blob, char[]) -> (char[])

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 160

Potential errors

  1. cannot cast a blob onto an already allocated array
  2. nat value too large to pack in nat32

as - reinterpret a blob of data as a character array

Defined in: std/blob.s line 28

as(unsafe_blob, char[]) -> (char[])

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 160

Potential errors

  1. cannot cast a blob onto an already allocated array
  2. nat value too large to pack in nat32

as - reinterpret a blob of data as a character array

Defined in: std/blob.s line 28

as(unsafe_blob, char[]) -> (char[])

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 24
  • Transpiled C size: 160

Potential errors

  1. cannot cast a blob onto an already allocated array
  2. nat value too large to pack in nat32

find_compatible_size

find_compatible_size - macro for determining blob sizes that are lesser than the data structure

Defined in: std/blob.s line 39

find_compatible_size(nat) -> (mut char[])

Complexity

  • Level of abstraction: 1 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 96
  • Transpiled C size: 685

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. out of bounds
  5. arena is out of space
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers

defered calls

free(mut any ptr) -> ()

realloc

realloc - reallocate memory

Defined in: std/unsafe.s line 34

realloc(any ptr allocated, nat bytes) -> (any ptr {follows any ptr allocated})

Reallocates an allocated memory pointer, potentially invalidating the original one without any safety. As a stopgap measure against unforeseen complications, this function is set to invalidate all pointers in the calling context and parrent contexts, BESIDES calling function mutable arguments and calling function outputs, as those have the intent of immediate reuse.

Warning: Its usage in unsafe and guarded under std/unsafe.s.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 71

Potential errors

  1. reallocation failed

realloc - reallocate memory

Defined in: std/unsafe.s line 34

realloc(any ptr allocated, nat bytes, "super_unsafe") -> (any ptr {follows any ptr allocated})

Reallocates an allocated memory pointer, potentially invalidating the original one without any safety. As a stopgap measure against unforeseen complications, this function is set to invalidate all pointers in the calling context and parrent contexts, BESIDES calling function mutable arguments and calling function outputs, as those have the intent of immediate reuse.

Warning: Its usage in unsafe and guarded under std/unsafe.s.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 8
  • Transpiled C size: 71

Potential errors

  1. reallocation failed

free

free - free memory

Defined in: std/unsafe.s line 52

free(mut any ptr) -> ()

Frees allocated memory.

Warning: Its usage in unsafe and guarded under std/unsafe.s.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 15

zero

zero - set memory to zero

Defined in: std/unsafe.s line 59

zero(any ptr allocated, nat from, nat to) -> ()

Memsets a memory region to zero.

Warning: Its usage in unsafe and guarded under std/unsafe.s.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 9

dereference_ptr

dereference_ptr - dereference a pointer pointing to a pointer

Defined in: std/unsafe.s line 74

dereference_ptr(any ptr) -> (any ptr)

Pointers directly pointing to pointers induce both indirection and unsafety to the degree that idiomatic code just cannot do without massive safety violations that the unsafety-inducing model is not equipped to bypass without invalidating the type system or derefencing mechanisms. This function performs a well-controlled indirection instead that does not leave any safety tracking residues AT ALL when called. To make absolutely sure that using this is properly understood the result is an immutable pointer, which often needs to be pass through unsafe_mut, for example to be freed.

Warning: Its usage in unsafe and guarded under std/unsafe.s.

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 23

color

color

Defined in: std/graphics.s line 21

color(nat _r, nat _g, nat _b) -> (nat8 r, nat8 g, nat8 b, nat8 a)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 14
  • Transpiled C size: 103

Potential errors

  1. nat value too large to pack in nat8

color

Defined in: std/graphics.s line 21

color(nat _r, nat _g, nat _b, nat _a) -> (nat8 r, nat8 g, nat8 b, nat8 a)

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 95

Potential errors

  1. nat value too large to pack in nat8

position

position

Defined in: std/graphics.s line 30

position(float x, float y) -> (float x, float y)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

size

size

Defined in: std/graphics.s line 33

size(float width, float height) -> (float width, float height)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

unsafe_open_window

unsafe_open_window

Defined in: std/graphics.s line 36

unsafe_open_window(float size.width, float size.height, cstr title, cstr font_path) -> ()

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 131

Potential errors

  1. failed to open window
Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: (pyray.set_trace_log_level(pyray.LOG_NONE), pyray.init_window(int($size__width),int($size__height),$title),pyray.set_target_fps(60),memory.set_global('font', pyray.load_font_ex($font_path,128,None,0) if $font_path else pyray.get_font_default()))

window

window

Defined in: std/graphics.s line 51

window(float size.width, float size.height, cstr title, cstr font_path) -> (edit window {tag, float size.width, float size.height, cstr title, mut bool ready})

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 37

Potential errors

  1. failed to open window

is_open

is_open

Defined in: std/graphics.s line 75

is_open(edit window {tag, float size.width, float size.height, cstr title, mut bool ready}) -> (bool) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 17

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [not pyray.window_should_close()]

unsafe_begin_drawing

unsafe_begin_drawing

Defined in: std/graphics.s line 80

unsafe_begin_drawing() -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 0
  • Transpiled C size: 4

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.begin_drawing()

unsafe_end_drawing

unsafe_end_drawing

Defined in: std/graphics.s line 84

unsafe_end_drawing() -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 4

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.end_drawing()

draw

draw

Defined in: std/graphics.s line 90

draw(edit window {tag, float size.width, float size.height, cstr title, mut bool ready}) -> (bool) with effects WINDOW

Complexity

  • Level of abstraction: 1 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 28

Potential errors

  1. already drawing on window

defered calls

unsafe_end_drawing() -> ()

clear

clear

Defined in: std/graphics.s line 99

clear(edit window, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 16

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.clear_background(pyray.Color($color__r,$color__g,$color__b,$color__a))

text

text

Defined in: std/graphics.s line 129

text(edit window, str, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 53

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_text_pro(memory.globals['font'].font,str($txt),pyray.Vector2($pos__x,$pos__y),pyray.Vector2($origin__x,$origin__y),$rotation,$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))

text

Defined in: std/graphics.s line 129

text(edit window, str, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 53

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_text_pro(memory.globals['font'].font,str($txt),pyray.Vector2($pos__x,$pos__y),pyray.Vector2($origin__x,$origin__y),$rotation,$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))

text

Defined in: std/graphics.s line 116

text(edit window, str, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 42

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_text_ex(memory.globals['font'],str($txt),pyray.Vector2($pos__x,$pos__y),$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))

text

Defined in: std/graphics.s line 116

text(edit window, str, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 17
  • Transpiled C size: 42

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_text_ex(memory.globals['font'],str($txt),pyray.Vector2($pos__x,$pos__y),$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))

text

Defined in: std/graphics.s line 103

text(edit window, cstr txt, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 35

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_text_ex(memory.globals['font'],$txt,pyray.Vector2($pos__x,$pos__y),$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))

sleep

sleep

Defined in: std/graphics.s line 144

sleep(nat) -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 13

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: time.sleep($seconds*0.001)

sleep - sleeps for a provided number of seconds

Defined in: std/time.s line 3

sleep(float secs, "skip_on_negative") -> ()

Other sleep functions may exist in the standard library, but this requires no extra linkage.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 32

Potential errors

  1. can only sleep for non-negative seconds

sleep - sleeps for a provided number of seconds

Defined in: std/time.s line 3

sleep(float) -> ()

Other sleep functions may exist in the standard library, but this requires no extra linkage.

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 32

Potential errors

  1. can only sleep for non-negative seconds

TextureData

TextureData

Defined in: std/graphics.s line 148

TextureData(nat id, float size.width, float size.height, nat mipmaps, nat format) -> (nat id, float size.width, float size.height, nat mipmaps, nat format)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

Texture

Texture

Defined in: std/graphics.s line 151

Texture(nat id, float size.width, float size.height, nat mipmaps, nat format) -> (Texture {tag, nat,float,float,nat,nat[]})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 22
  • Transpiled C size: 136

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

open

open

Defined in: std/graphics.s line 158

open(cstr) -> (Texture {tag, nat,float,float,nat,nat[]})

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 14
  • Transpiled C size: 87

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation

defered calls

free(mut any ptr) -> ()

texture

texture

Defined in: std/graphics.s line 220

texture(edit window, Texture, float pos.x, float pos.y, float size.width, float size.height, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 40
  • Transpiled C size: 258

Potential errors

  1. null pointer
  2. out of bounds

texture

Defined in: std/graphics.s line 207

texture(edit window, Texture, float pos.x, float pos.y, float scale, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 39
  • Transpiled C size: 262

Potential errors

  1. null pointer
  2. out of bounds

texture

Defined in: std/graphics.s line 193

texture(edit window, Texture, float pos.x, float pos.y, float size.width, float size.height, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float rotation) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 44
  • Transpiled C size: 285

Potential errors

  1. null pointer
  2. division by zero
  3. out of bounds

texture

Defined in: std/graphics.s line 181

texture(edit window, Texture, float pos.x, float pos.y, float scale, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float rotation) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 37
  • Transpiled C size: 219

Potential errors

  1. null pointer
  2. out of bounds

texture

Defined in: std/graphics.s line 171

texture(edit window, Texture, float pos.x, float pos.y, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 34
  • Transpiled C size: 201

Potential errors

  1. null pointer
  2. out of bounds

circ

circ

Defined in: std/graphics.s line 320

circ(edit window, float pos.x, float pos.y, float radius, "line", nat thickness, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 105

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_ring(pyray.Vector2($pos__x,$pos__y),max(0,$radius-$thickness),$radius,0,360,64,pyray.Color($color__r,$color__g,$color__b,$color__a))

circ

Defined in: std/graphics.s line 233

circ(edit window, float pos.x, float pos.y, float radius, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 13
  • Transpiled C size: 36

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_circle_v(pyray.Vector2($pos__x,$pos__y),$radius,pyray.Color($color__r,$color__g,$color__b,$color__a))

ellipse

ellipse

Defined in: std/graphics.s line 253

ellipse(edit window, float pos.x, float pos.y, float radius.x, float radius.y, "line", nat thickness, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 36

ellipse

Defined in: std/graphics.s line 243

ellipse(edit window, float pos.x, float pos.y, float radius.x, float radius.y, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 14
  • Transpiled C size: 41

line

line

Defined in: std/graphics.s line 263

line(edit window, float p1.x, float p1.y, float p2.x, float p2.y, float thickness, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 14
  • Transpiled C size: 51

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_line_ex(pyray.Vector2($p1__x,$p1__y),pyray.Vector2($p2__x,$p2__y),$thickness,pyray.Color($color__r,$color__g,$color__b,$color__a))

rect

rect

Defined in: std/graphics.s line 288

rect(edit window, float pos.x, float pos.y, float size.width, float size.height, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 18
  • Transpiled C size: 58

rect

Defined in: std/graphics.s line 284

rect(edit window, float pos.x, float pos.y, float size.width, float size.height, "line", nat thickness, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 46

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_rectangle_lines_ex(pyray.Rectangle($pos__x,$pos__y,$size__width,$size__height),$thickness,pyray.Color($color__r,$color__g,$color__b,$color__a))

rect

Defined in: std/graphics.s line 274

rect(edit window, float pos.x, float pos.y, float size.width, float size.height, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 14
  • Transpiled C size: 24

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_rectangle(int($pos__x),int($pos__y),int($size__width),int($size__height),pyray.Color($color__r,$color__g,$color__b,$color__a))

tri

tri

Defined in: std/graphics.s line 309

tri(edit window, float p1.x, float p1.y, float p2.x, float p2.y, float p3.x, float p3.y, "line", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 61

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_triangle_lines(pyray.Vector2($p1__x,$p1__y),pyray.Vector2($p2__x,$p2__y),pyray.Vector2($p3__x,$p3__y),pyray.Color($color__r,$color__g,$color__b,$color__a))

tri

Defined in: std/graphics.s line 298

tri(edit window, float p1.x, float p1.y, float p2.x, float p2.y, float p3.x, float p3.y, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 61

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: pyray.draw_triangle(pyray.Vector2($p1__x,$p1__y),pyray.Vector2($p2__x,$p2__y),pyray.Vector2($p3__x,$p3__y),pyray.Color($color__r,$color__g,$color__b,$color__a))

dt

dt

Defined in: std/graphics.s line 338

dt(window {tag, float size.width, float size.height, cstr title, bool ready}) -> (float) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 9

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [pyray.get_frame_time()]

uptime

uptime

Defined in: std/graphics.s line 343

uptime(window {tag, float size.width, float size.height, cstr title, bool ready}) -> (float) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 9

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [pyray.get_time()]

key_down

key_down

Defined in: std/graphics.s line 348

key_down(window, nat key) -> (bool) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 10

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [pyray.is_key_down($key)]

key_pressed

key_pressed

Defined in: std/graphics.s line 353

key_pressed(edit window, nat key) -> (bool) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 10

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [pyray.is_key_pressed($key)]

key_released

key_released

Defined in: std/graphics.s line 358

key_released(edit window, nat key) -> (bool) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 10

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [pyray.is_key_released($key)]

mouse_pos

mouse_pos

Defined in: std/graphics.s line 363

mouse_pos(window {tag, float size.width, float size.height, cstr title, bool ready}) -> (float x, float y) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 9
  • Transpiled C size: 28

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [(lambda p=pyray.get_mouse_position():(p.x,p.y))()]

mouse_down

mouse_down

Defined in: std/graphics.s line 371

mouse_down(window, nat button) -> (bool) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 10

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [pyray.is_mouse_button_down($button)]

mouse_pressed

mouse_pressed

Defined in: std/graphics.s line 376

mouse_pressed(edit window, nat button) -> (bool) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 10

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [pyray.is_mouse_button_pressed($button)]

mouse_wheel

mouse_wheel

Defined in: std/graphics.s line 381

mouse_wheel(window {tag, float size.width, float size.height, cstr title, bool ready}) -> (float) with effects WINDOW

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 9

Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [pyray.get_mouse_wheel_move()]

KEY_NULL

Defined in: std/graphics.s line 386

() -> (0)

KEY_APOSTROPHE

Defined in: std/graphics.s line 387

() -> (39)

KEY_COMMA

Defined in: std/graphics.s line 388

() -> (44)

KEY_MINUS

Defined in: std/graphics.s line 389

() -> (45)

KEY_PERIOD

Defined in: std/graphics.s line 390

() -> (46)

KEY_SLASH

Defined in: std/graphics.s line 391

() -> (47)

KEY_ZERO

Defined in: std/graphics.s line 392

() -> (48)

KEY_ONE

Defined in: std/graphics.s line 393

() -> (49)

KEY_TWO

Defined in: std/graphics.s line 394

() -> (50)

KEY_THREE

Defined in: std/graphics.s line 395

() -> (51)

KEY_FOUR

Defined in: std/graphics.s line 396

() -> (52)

KEY_FIVE

Defined in: std/graphics.s line 397

() -> (53)

KEY_SIX

Defined in: std/graphics.s line 398

() -> (54)

KEY_SEVEN

Defined in: std/graphics.s line 399

() -> (55)

KEY_EIGHT

Defined in: std/graphics.s line 400

() -> (56)

KEY_NINE

Defined in: std/graphics.s line 401

() -> (57)

KEY_SEMICOLON

Defined in: std/graphics.s line 402

() -> (59)

KEY_EQUAL

Defined in: std/graphics.s line 403

() -> (61)

KEY_A

Defined in: std/graphics.s line 404

() -> (65)

KEY_B

Defined in: std/graphics.s line 405

() -> (66)

KEY_C

Defined in: std/graphics.s line 406

() -> (67)

KEY_D

Defined in: std/graphics.s line 407

() -> (68)

KEY_E

Defined in: std/graphics.s line 408

() -> (69)

KEY_F

Defined in: std/graphics.s line 409

() -> (70)

KEY_G

Defined in: std/graphics.s line 410

() -> (71)

KEY_H

Defined in: std/graphics.s line 411

() -> (72)

KEY_I

Defined in: std/graphics.s line 412

() -> (73)

KEY_J

Defined in: std/graphics.s line 413

() -> (74)

KEY_K

Defined in: std/graphics.s line 414

() -> (75)

KEY_L

Defined in: std/graphics.s line 415

() -> (76)

KEY_M

Defined in: std/graphics.s line 416

() -> (77)

KEY_N

Defined in: std/graphics.s line 417

() -> (78)

KEY_O

Defined in: std/graphics.s line 418

() -> (79)

KEY_P

Defined in: std/graphics.s line 419

() -> (80)

KEY_Q

Defined in: std/graphics.s line 420

() -> (81)

KEY_R

Defined in: std/graphics.s line 421

() -> (82)

KEY_S

Defined in: std/graphics.s line 422

() -> (83)

KEY_T

Defined in: std/graphics.s line 423

() -> (84)

KEY_U

Defined in: std/graphics.s line 424

() -> (85)

KEY_V

Defined in: std/graphics.s line 425

() -> (86)

KEY_W

Defined in: std/graphics.s line 426

() -> (87)

KEY_X

Defined in: std/graphics.s line 427

() -> (88)

KEY_Y

Defined in: std/graphics.s line 428

() -> (89)

KEY_Z

Defined in: std/graphics.s line 429

() -> (90)

KEY_LEFT_BRACKET

Defined in: std/graphics.s line 430

() -> (91)

KEY_BACKSLASH

Defined in: std/graphics.s line 431

() -> (92)

KEY_RIGHT_BRACKET

Defined in: std/graphics.s line 432

() -> (93)

KEY_GRAVE

Defined in: std/graphics.s line 433

() -> (96)

KEY_SPACE

Defined in: std/graphics.s line 434

() -> (32)

KEY_ESCAPE

Defined in: std/graphics.s line 435

() -> (256)

KEY_ENTER

Defined in: std/graphics.s line 436

() -> (257)

KEY_TAB

Defined in: std/graphics.s line 437

() -> (258)

KEY_BACKSPACE

Defined in: std/graphics.s line 438

() -> (259)

KEY_INSERT

Defined in: std/graphics.s line 439

() -> (260)

KEY_DELETE

Defined in: std/graphics.s line 440

() -> (261)

KEY_RIGHT

Defined in: std/graphics.s line 441

() -> (262)

KEY_LEFT

Defined in: std/graphics.s line 442

() -> (263)

KEY_DOWN

Defined in: std/graphics.s line 443

() -> (264)

KEY_UP

Defined in: std/graphics.s line 444

() -> (265)

KEY_PAGE_UP

Defined in: std/graphics.s line 445

() -> (266)

KEY_PAGE_DOWN

Defined in: std/graphics.s line 446

() -> (267)

KEY_HOME

Defined in: std/graphics.s line 447

() -> (268)

KEY_END

Defined in: std/graphics.s line 448

() -> (269)

KEY_CAPS_LOCK

Defined in: std/graphics.s line 449

() -> (280)

KEY_SCROLL_LOCK

Defined in: std/graphics.s line 450

() -> (281)

KEY_NUM_LOCK

Defined in: std/graphics.s line 451

() -> (282)

KEY_PRINT_SCREEN

Defined in: std/graphics.s line 452

() -> (283)

KEY_PAUSE

Defined in: std/graphics.s line 453

() -> (284)

KEY_F1

Defined in: std/graphics.s line 454

() -> (290)

KEY_F2

Defined in: std/graphics.s line 455

() -> (291)

KEY_F3

Defined in: std/graphics.s line 456

() -> (292)

KEY_F4

Defined in: std/graphics.s line 457

() -> (293)

KEY_F5

Defined in: std/graphics.s line 458

() -> (294)

KEY_F6

Defined in: std/graphics.s line 459

() -> (295)

KEY_F7

Defined in: std/graphics.s line 460

() -> (296)

KEY_F8

Defined in: std/graphics.s line 461

() -> (297)

KEY_F9

Defined in: std/graphics.s line 462

() -> (298)

KEY_F10

Defined in: std/graphics.s line 463

() -> (299)

KEY_F11

Defined in: std/graphics.s line 464

() -> (300)

KEY_F12

Defined in: std/graphics.s line 465

() -> (301)

KEY_LEFT_SHIFT

Defined in: std/graphics.s line 466

() -> (340)

KEY_LEFT_CONTROL

Defined in: std/graphics.s line 467

() -> (341)

KEY_LEFT_ALT

Defined in: std/graphics.s line 468

() -> (342)

KEY_LEFT_SUPER

Defined in: std/graphics.s line 469

() -> (343)

KEY_RIGHT_SHIFT

Defined in: std/graphics.s line 470

() -> (344)

KEY_RIGHT_CONTROL

Defined in: std/graphics.s line 471

() -> (345)

KEY_RIGHT_ALT

Defined in: std/graphics.s line 472

() -> (346)

KEY_RIGHT_SUPER

Defined in: std/graphics.s line 473

() -> (347)

KEY_KB_MENU

Defined in: std/graphics.s line 474

() -> (348)

KEY_KP_0

Defined in: std/graphics.s line 475

() -> (320)

KEY_KP_1

Defined in: std/graphics.s line 476

() -> (321)

KEY_KP_2

Defined in: std/graphics.s line 477

() -> (322)

KEY_KP_3

Defined in: std/graphics.s line 478

() -> (323)

KEY_KP_4

Defined in: std/graphics.s line 479

() -> (324)

KEY_KP_5

Defined in: std/graphics.s line 480

() -> (325)

KEY_KP_6

Defined in: std/graphics.s line 481

() -> (326)

KEY_KP_7

Defined in: std/graphics.s line 482

() -> (327)

KEY_KP_8

Defined in: std/graphics.s line 483

() -> (328)

KEY_KP_9

Defined in: std/graphics.s line 484

() -> (329)

KEY_KP_DECIMAL

Defined in: std/graphics.s line 485

() -> (330)

KEY_KP_DIVIDE

Defined in: std/graphics.s line 486

() -> (331)

KEY_KP_MULTIPLY

Defined in: std/graphics.s line 487

() -> (332)

KEY_KP_SUBTRACT

Defined in: std/graphics.s line 488

() -> (333)

KEY_KP_ADD

Defined in: std/graphics.s line 489

() -> (334)

KEY_KP_ENTER

Defined in: std/graphics.s line 490

() -> (335)

KEY_KP_EQUAL

Defined in: std/graphics.s line 491

() -> (336)

KEY_BACK

Defined in: std/graphics.s line 492

() -> (4)

KEY_MENU

Defined in: std/graphics.s line 493

() -> (5)

KEY_VOLUME_UP

Defined in: std/graphics.s line 494

() -> (24)

KEY_VOLUME_DOWN

Defined in: std/graphics.s line 495

() -> (25)

NumberOrPtr

nat - an unsigned integer value

Defined in: builtins line 1

nat

Represents values in the range 0 to 2^64-1.

float

Defined in: builtins line 1

float

int - a signed integer value

Defined in: builtins line 1

int

Represents values in the range 2^-63 to 2^63-1.

nat ptr

Defined in: std/ptrpeek.s line 20

nat ptr() -> (mut nat ptr)

int ptr

Defined in: std/ptrpeek.s line 20

int ptr() -> (mut int ptr)

float ptr

Defined in: std/ptrpeek.s line 20

float ptr() -> (mut float ptr)

to_number

to_number

Defined in: std/ptrpeek.s line 21

to_number(nat) -> (nat)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

to_number

Defined in: std/ptrpeek.s line 21

to_number(int) -> (int)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

to_number

Defined in: std/ptrpeek.s line 21

to_number(float) -> (float)

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 3

to_number

Defined in: std/ptrpeek.s line 21

to_number(nat ptr) -> (nat)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 27

Potential errors

  1. null pointer

to_number

Defined in: std/ptrpeek.s line 21

to_number(int ptr) -> (int)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 27

Potential errors

  1. null pointer

to_number

Defined in: std/ptrpeek.s line 21

to_number(float ptr) -> (float)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 3
  • Transpiled C size: 27

Potential errors

  1. null pointer

already_defined

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat x, nat y) -> (true)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat x, int y) -> (true)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat x, float y) -> (true)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat x, nat ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat x, int ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat x, float ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int x, nat y) -> (true)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int x, int y) -> (true)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int x, float y) -> (true)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int x, nat ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int x, int ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int x, float ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float x, nat y) -> (true)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float x, int y) -> (true)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float x, float y) -> (true)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float x, nat ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float x, int ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float x, float ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat ptr x, nat y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat ptr x, int y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat ptr x, float y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat ptr x, nat ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat ptr x, int ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(nat ptr x, float ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int ptr x, nat y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int ptr x, int y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int ptr x, float y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int ptr x, nat ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int ptr x, int ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(int ptr x, float ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float ptr x, nat y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float ptr x, int y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float ptr x, float y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float ptr x, nat ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float ptr x, int ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

already_defined

Defined in: std/ptrpeek.s line 27

already_defined(float ptr x, float ptr y) -> (false)

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 4
  • Transpiled C size: 9

String

cstr - constant string

Defined in: builtins line 1

cstr

str - a string residing on a buffer

Defined in: std/core/string.s line 69

str(char[], nat pos, "len", nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 18
  • Transpiled C size: 118

Potential errors

  1. can only define strings on contiguous buffers
  2. null pointer
  3. can only define strings on non-offset buffers
  4. out of bounds

str - tautology function for strings

Defined in: std/core/string.s line 65

str(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 57

str(char[]) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 21
  • Transpiled C size: 165

Potential errors

  1. null pointer
  2. out of bounds
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 57

str(char[], nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 147

Potential errors

  1. null pointer
  2. out of bounds
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on a buffer

Defined in: std/core/string.s line 50

str(char[], nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 4 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 100

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 45

str(char ptr unsafe_ptr, nat pos, nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 10
  • Transpiled C size: 43

str - a string residing on a buffer

Defined in: std/core/string.s line 41

str(char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 3

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 218

cstr(cstr cstr, str) -> (cstr)

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 6
  • Transpiled C size: 3

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 218

cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 218

cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 7
  • Transpiled C size: 3

str - convert to string

Defined in: std/core/string.s line 93

str(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

Defines an implicit constant buffer using the cstr’s memory data. Subsequent comparisons no longer use the underlying pointer value.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 33
  • Transpiled C size: 169

str - a string residing on a buffer

Defined in: std/core/string.s line 86

str(char[], nat endpos, "from", nat pos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.

Complexity

  • Level of abstraction: 1 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 15
  • Transpiled C size: 62

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 77

str(char[], nat pos, "to", nat endpos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})

The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.

Complexity

  • Level of abstraction: 1 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 20
  • Transpiled C size: 143

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative
  3. out of bounds
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

cstr - a cstr description of an error code

Defined in: std/core/error.s line 19

cstr(last_error) -> (cstr)

Error codes should not be compared numerically against given numbers, as their numbering changes for different programs. Instead, they should be converted to a cstr string with this function, which can then be compared. This comparison is also one numerical comparison, as care is taken for all cstr to point to the same memory location.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 10

str - reads a string from the console

Defined in: std/core/convertstr.s line 113

str(edit arena, console console) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The read string is placed on an arena while consuming only the necessarily minimum size.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 47
  • Transpiled C size: 279

Potential errors

  1. read string does not fit on buffer
  2. null pointer
  3. nat subtraction would yield a negative
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. unexpected end of console read

str - reads a string from the console

Defined in: std/core/convertstr.s line 113

str(new CHARS, console console) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS

The read string is placed onto memory that keeps being reallocated to accommodate its size. The resulting memory will consume exactly the required size in bytes.

Complexity

  • Level of abstraction: 0 to 6 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 79
  • Transpiled C size: 486

Potential errors

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. allocation failed
  5. reallocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation
  8. cannot resize an unallocated or freed buffer
  9. out of bounds
  10. can only define strings on contiguous buffers
  11. can only define strings on non-offset buffers
  12. unexpected end of console read

defered calls

free(mut any ptr) -> ()

run

run

Defined in: std/test.s line 5

run(console CLI, str) -> (cstr) with effects CLI

Complexity

  • Level of abstraction: 0 to 8 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 23
  • Transpiled C size: 156

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. failed to start process
  7. process terminated with unhandled non-zero exit code

run

Defined in: std/test.s line 5

run(console CLI, cstr command) -> (cstr) with effects CLI

Complexity

  • Level of abstraction: 0 to 5 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 19
  • Transpiled C size: 150

Potential errors

  1. failed to start process
  2. process terminated with unhandled non-zero exit code

print_marker

Defined in: std/test.s line 12

print_marker(colors, "pending") -> () with effects colors

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 22
  • Transpiled C size: 96

Defined in: std/test.s line 12

print_marker(colors, "failure") -> () with effects colors

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 22
  • Transpiled C size: 96

Defined in: std/test.s line 12

print_marker(colors, "success") -> () with effects colors

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 22
  • Transpiled C size: 96

restore_stdout

restore_stdout

Defined in: std/test.s line 28

restore_stdout(int) -> ()

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 17

stdout_to_err

stdout_to_err - temporarily redirect stdout to stderr

Defined in: std/test.s line 33

stdout_to_err(console {tag}) -> (int) with effects CLI

Complexity

  • Level of abstraction: 0 to 1 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 22

defered calls

restore_stdout(int) -> ()

assert

assert - assert a condition given a corresponding message

Defined in: std/test.s line 43

assert(console CLI, bool condition, cstr text) -> () with effects CLI

This outputs to stderr, so that asserts are printed even if stout is suppressed during the ‘test’ function.

Complexity

  • Level of abstraction: 0 to 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 25
  • Transpiled C size: 115

Potential errors

  1. assert failed

test

test - prints and tests a system command

Defined in: std/test.s line 65

test(colors, str) -> (bool) with effects colors

Returns whether the command succeeded or not. A completion assert is performed at the end.

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 25
  • Transpiled C size: 128

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. failed to start process
  7. process terminated with unhandled non-zero exit code

test - prints and tests a system command

Defined in: std/test.s line 65

test(colors, str, bool should_fail) -> (bool) with effects colors

Returns whether the command succeeded or not. A completion assert is performed at the end.

Complexity

  • Level of abstraction: 0 to 9 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 29
  • Transpiled C size: 165

Potential errors

  1. allocation failed
  2. cannot allocate a buffer of unsized type
  3. cannot resize buffers with alloc; it promises no data reallocation
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. failed to start process
  7. process terminated with unhandled non-zero exit code

time

time - number of seconds since the program start

Defined in: std/time.s line 12

time() -> (float)

Other time measurement functions may exist in the standard library, but this requires no extra linkage.

Complexity

  • Level of abstraction: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 1
  • Transpiled C size: 9