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 of range next get KB MB GB alloc resize last mutget len new arena allocated status circular list at slice char_allocator strdat str copy copy_null_terminated unsafe_temp endpos revalidate starts_with ends_with contains find empty is_number rotl splitmix64 Rand 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 realloc free zero 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

cstr

cstr - constant string

Defined in: builtins line 1

cstr() -> (cstr)

cstr - extract the cstr from unsafe_temp string

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

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 207

cstr(unsafe_temp) -> (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 207

cstr(unsafe_temp) -> (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(catch) -> (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() -> (int)

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

int - cast to int

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

int(bits) -> (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 29

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 29

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 29

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 - reads an integer from the console

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

int(console) -> (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. null pointer
  2. unexpected end of console read
  3. user input was not a float
  4. out of bounds

int - converts a string to an integer

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

int(str) -> (int)

Complexity

  • Level of abstraction: 0 to 5 (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 149

int(cstr) -> (int)

Complexity

  • Level of abstraction: 0 to 7 (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

nat

nat - an unsigned integer value

Defined in: builtins line 1

nat() -> (nat)

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

nat

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

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

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

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 - cast to nat

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

nat(bits) -> (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 51

nat(char) -> (nat)

Converting a character to a natural number considers its bit representation interpreted as an unsigned number.

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 40

nat(nat) -> (nat)

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

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 40

nat(int) -> (nat)

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

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 40

nat(float) -> (nat)

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

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 - reads an unsigned integer from the console

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

nat(console) -> (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

nat - converts a string to an unsigned integer

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

nat(str) -> (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: 328

Potential errors

  1. null pointer
  2. invalid nat conversion from non-number string
  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 172

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: 322

Potential errors

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

nat32

nat32 - a 32-bit unsigned integer value

Defined in: builtins line 1

nat32() -> (nat32)

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

nat32

Defined in: std/core/allocators.s line 152

nat32(nat) -> (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 bits

Defined in: std/mini.s line 38

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() -> (nat16)

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

nat16 - convert unsigned number to 16 bits

Defined in: std/mini.s line 30

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() -> (nat8)

Represents values in the range 0 to 255.

nat8 - convert unsigned number to 8 bits

Defined in: std/mini.s line 22

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)

float - cast to float

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

float(bits) -> (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 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 15

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 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 15

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 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 15

float - reads a float from the console

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

float(console) -> (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. null pointer
  2. unexpected end of console read
  3. user input was not a float
  4. out of bounds

float - converts a string to a float

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

float(str) -> (float)

Complexity

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

Potential errors

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

float - converts a string to a float

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

float(cstr) -> (float)

Complexity

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

Potential errors

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

bool

bool - boolean value

Defined in: builtins line 1

bool() -> (bool)

Can only be true or false.

err

err

Defined by the compiler

err() -> (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() -> (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: 0 to 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 2
  • Transpiled C size: 14

char - treat as character

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

char(str) -> (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) -> (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/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(catch x, catch 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/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/string.s line 283

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

Complexity

  • Level of abstraction: 1 to 7 (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 277

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

Complexity

  • Level of abstraction: 1 to 7 (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 250

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 are 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 241

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(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 8 (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 8 (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 8 (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 8 (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 8 (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 8 (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

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

neq

neq - not equal

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

neq(catch x, catch 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/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/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 289

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 289

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

Negates the outcome of equality checks between cstr and strings.

Complexity

  • Level of abstraction: 1 to 8 (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 289

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

Negates the outcome of equality checks between cstr and strings.

Complexity

  • Level of abstraction: 1 to 8 (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 289

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 9 (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 9 (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 9 (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 9 (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 9 (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 9 (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() -> (nat)

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

float

Defined in: builtins line 1

float() -> (float)

int - a signed integer value

Defined in: builtins line 1

int() -> (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 65

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 446

add(edit arena, cstr _s1, cstr _s2) -> (str) 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:

CHARS = edit arena alloc 10
s1 = copy 123
s2 = copy 456
s3 = s1+s2
result = 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 446

add(edit arena, cstr _s1, str) -> (str) 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:

CHARS = edit arena alloc 10
s1 = copy 123
s2 = copy 456
s3 = s1+s2
result = 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 446

add(edit arena, str, cstr _s2) -> (str) 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:

CHARS = edit arena alloc 10
s1 = copy 123
s2 = copy 456
s3 = s1+s2
result = 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 446

add(edit arena, str, str) -> (str) 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:

CHARS = edit arena alloc 10
s1 = copy 123
s2 = copy 456
s3 = s1+s2
result = 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 420

add(edit list, cstr _s1, cstr _s2) -> (str) 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 420

add(edit list, cstr _s1, str) -> (str) 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 420

add(edit list, str, cstr _s2) -> (str) 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 420

add(edit list, str, str) -> (str) 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 420

add(edit circular, cstr _s1, cstr _s2) -> (str) 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 420

add(edit circular, cstr _s1, str) -> (str) 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 420

add(edit circular, str, cstr _s2) -> (str) 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 420

add(edit circular, str, str) -> (str) 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 420

add(new CHARS, cstr _s1, cstr _s2) -> (str) 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 420

add(new CHARS, cstr _s1, str) -> (str) 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 420

add(new CHARS, str, cstr _s2) -> (str) 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 420

add(new CHARS, str, str) -> (str) 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) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. can only place vectors on contiguous buffers

add - vector addition

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

add(edit arena, float v1, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers

add - vector addition

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

add(new FLOATS, float v1, vec) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

add - vector addition

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

add(edit circular, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. can only place vectors on contiguous buffers

add - vector addition

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

add(edit circular, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. does not fit in circular arena
  5. can only place vectors on contiguous buffers

add - vector addition

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

add(edit arena, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers

add - vector addition

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

add(edit arena, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. arena is out of space
  5. can only place vectors on contiguous buffers

add - vector addition

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

add(new FLOATS, vec, float v2) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

add - vector addition

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

add(new FLOATS, vec, vec) -> (mut vec) 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. different vector sizes
  2. allocation failed
  3. null pointer

Defered calls

free(mut any ptr) -> ()

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) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. can only place vectors on contiguous buffers

mul - vector multiplication

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

mul(edit arena, float v1, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers

mul - vector multiplication

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

mul(new FLOATS, float v1, vec) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

mul - vector multiplication

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

mul(edit circular, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. can only place vectors on contiguous buffers

mul - vector multiplication

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

mul(edit circular, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. does not fit in circular arena
  5. can only place vectors on contiguous buffers

mul - vector multiplication

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

mul(edit arena, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers

mul - vector multiplication

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

mul(edit arena, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. arena is out of space
  5. can only place vectors on contiguous buffers

mul - vector multiplication

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

mul(new FLOATS, vec, float v2) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

mul - vector multiplication

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

mul(new FLOATS, vec, vec) -> (mut vec) 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. different vector sizes
  2. allocation failed
  3. null pointer

Defered calls

free(mut any ptr) -> ()

mul - matrix-vector multiplication

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

mul(new FLOATS, mat, vec) -> (mut vec) 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: 423

Potential errors

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

Defered calls

free(mut any ptr) -> ()

mul - sparse*dense matrix multiplication

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

mul(edit circular, coo, mat) -> (mut mat) 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: 520

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 - sparse*dense matrix multiplication

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

mul(edit arena, coo, mat) -> (mut mat) 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: 520

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) 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: 505

Potential errors

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

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) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. vector length must match matrix rows
  5. out of bounds
  6. can only place vectors on contiguous buffers

mul - vector*sparse matrix multiplication

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

mul(edit arena, vec, coo) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. vector length must match matrix rows
  5. out of bounds
  6. can only place vectors on contiguous buffers

mul - vector*sparse matrix multiplication

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

mul(new FLOATS, vec, coo) -> (mut vec) 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. null pointer
  2. allocation failed
  3. vector length must match matrix rows
  4. out of bounds

Defered calls

free(mut any ptr) -> ()

mul - sparse matrix*vector multiplication

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

mul(edit circular, coo, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. matrix columns must match vector length
  5. out of bounds
  6. can only place vectors on contiguous buffers

mul - sparse matrix*vector multiplication

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

mul(edit arena, coo, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. matrix columns must match vector length
  5. out of bounds
  6. can only place vectors on contiguous buffers

mul - sparse matrix*vector multiplication

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

mul(new FLOATS, coo, vec) -> (mut vec) 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. null pointer
  2. matrix columns must match vector length
  3. allocation failed
  4. out of bounds

Defered calls

free(mut any ptr) -> ()

mul - matrix-matrix multiplication

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

mul(edit circular, mat, mat) -> (mut mat) 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: 596

Potential errors

  1. does not fit in circular arena
  2. null pointer
  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
  7. inner dimensions must agree

mul - matrix-matrix multiplication

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

mul(edit arena, mat, mat) -> (mut mat) 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: 596

Potential errors

  1. arena is out of space
  2. null pointer
  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
  7. inner dimensions must agree

mul - matrix-matrix multiplication

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

mul(new FLOATS, mat, mat) -> (mut mat) 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: 581

Potential errors

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

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) 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: 438

Potential errors

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

mul - vector-matrix multiplication

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

mul(edit arena, vec, mat) -> (mut vec) 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: 438

Potential errors

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

mul - vector-matrix multiplication

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

mul(new FLOATS, vec, mat) -> (mut vec) 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: 423

Potential errors

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

Defered calls

free(mut any ptr) -> ()

mul - matrix-vector multiplication

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

mul(edit circular, mat, vec) -> (mut vec) 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: 438

Potential errors

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

mul - matrix-vector multiplication

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

mul(edit arena, mat, vec) -> (mut vec) 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: 438

Potential errors

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

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) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. division by zero
  5. can only place vectors on contiguous buffers

div - vector division

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

div(edit arena, float v1, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. division by zero
  5. can only place vectors on contiguous buffers

div - vector division

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

div(new FLOATS, float v1, vec) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

div - vector division

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

div(edit circular, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. division by zero
  5. can only place vectors on contiguous buffers

div - vector division

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

div(edit circular, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. does not fit in circular arena
  5. division by zero
  6. can only place vectors on contiguous buffers

div - vector division

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

div(edit arena, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. division by zero
  5. can only place vectors on contiguous buffers

div - vector division

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

div(edit arena, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. arena is out of space
  5. division by zero
  6. can only place vectors on contiguous buffers

div - vector division

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

div(new FLOATS, vec, float v2) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

div - vector division

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

div(new FLOATS, vec, vec) -> (mut vec) 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. different vector sizes
  2. allocation failed
  3. null pointer
  4. division by zero

Defered calls

free(mut any ptr) -> ()

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(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 - 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 - 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) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. can only place vectors on contiguous buffers

sub - vector subtraction

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

sub(edit arena, float v1, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers

sub - vector subtraction

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

sub(new FLOATS, float v1, vec) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

sub - vector subtraction

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

sub(edit circular, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. can only place vectors on contiguous buffers

sub - vector subtraction

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

sub(edit circular, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. does not fit in circular arena
  5. can only place vectors on contiguous buffers

sub - vector subtraction

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

sub(edit arena, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers

sub - vector subtraction

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

sub(edit arena, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. arena is out of space
  5. can only place vectors on contiguous buffers

sub - vector subtraction

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

sub(new FLOATS, vec, float v2) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

sub - vector subtraction

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

sub(new FLOATS, vec, vec) -> (mut vec) 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. different vector sizes
  2. allocation failed
  3. null pointer

Defered calls

free(mut any ptr) -> ()

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) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. can only place vectors on contiguous buffers

pow - vector exponentiation

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

pow(edit arena, float v1, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers

pow - vector exponentiation

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

pow(new FLOATS, float v1, vec) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

pow - vector exponentiation

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

pow(edit circular, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. can only place vectors on contiguous buffers

pow - vector exponentiation

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

pow(edit circular, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. does not fit in circular arena
  5. can only place vectors on contiguous buffers

pow - vector exponentiation

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

pow(edit arena, vec, float v2) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers

pow - vector exponentiation

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

pow(edit arena, vec, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. different vector sizes
  3. null pointer
  4. arena is out of space
  5. can only place vectors on contiguous buffers

pow - vector exponentiation

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

pow(new FLOATS, vec, float v2) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

pow - vector exponentiation

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

pow(new FLOATS, vec, vec) -> (mut vec) 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. different vector sizes
  2. allocation failed
  3. null pointer

Defered calls

free(mut any ptr) -> ()

console

console - references the system console

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

console() -> (console)

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 35

unsafe_console() -> (mut console)

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 97

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 97

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 90

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 90

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 83

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 83

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 76

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 76

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 69

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 69

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/print.s line 61

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 61

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 54

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 54

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 43

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/string.s line 325

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 325

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 311

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 311

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: 234

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: 230

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

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: 838

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: 834

Potential errors

  1. null pointer
  2. nat subtraction would yield a negative

nn

nn - no new line

Defined in: std/core/print.s line 47

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 47

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 47

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 47

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 413

nn(str) -> (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) -> (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 104

supports_ansi(console) -> (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 109

colors(console) -> (colors)

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 182

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 180

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 178

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 176

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 174

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 172

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 170

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 168

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 166

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 164

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 162

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 160

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 158

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 156

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 154

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 152

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 150

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 148

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 146

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 144

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 142

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 140

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 138

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 136

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 134

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 132

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 130

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 128

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 126

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 124

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 122

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 120

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 118

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 116

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 114

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 58

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 153

exists(Texture) -> (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 - bit representation

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

bits(float) -> (bits)

Retrives 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 69

bits(int) -> (bits)

Retrives 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 63

bits(nat) -> (bits)

Retrives 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 102

lshift(bits, nat y) -> (bits)

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 107

rshift(bits, nat y) -> (bits)

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 112

xor(bits, bits) -> (bits)

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 117

band(bits, bits) -> (bits)

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 122

bor(bits, bits) -> (bits)

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

of

of - yields a pair of nats

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

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

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

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

of(nat) -> (nat, 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: 2
  • Transpiled C size: 7

range

range - constructs a range

Defined in: std/core/range.s line 39

range(nat _from, nat to) -> (edit range)

Endpoints are natural numbers (unsigned integers). This is handy for several kinds of iteration.

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

next

next - next range number

Defined in: std/core/range.s line 45

next(edit range) -> (nat)

This increments the r.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

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)

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

next - Computes the next random number of a Rand sequence.

Defined in: std/rand.s line 88

next(mut Rand) -> (float)

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

get

get - immutable pointer to buffer element

Defined in: std/core/array.s line 100

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 100

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 - assert that a number plus range start lies in the range

Defined in: std/core/range.s line 54

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 100

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 100

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 100

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 61

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 61

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 - a character in a string

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

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 318

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 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. nat subtraction would yield a negative
  4. index not found
  5. out of bounds

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. nat subtraction would yield a negative
  4. index not found
  5. out of bounds

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. nat subtraction would yield a negative
  4. index not found
  5. out of bounds

get

Defined in: std/io.s line 26

get(edit circular, edit open, nat) -> (str) 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. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. end of file
  6. out of bounds

get

Defined in: std/io.s line 26

get(edit circular, edit terminal, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 26

get(edit circular, edit write, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 26

get(edit circular, edit write, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 26

get(edit circular, edit open, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 26

get(edit circular, edit open, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 26

get(edit arena, edit open, nat) -> (str) 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. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. end of file
  6. out of bounds

get

Defined in: std/io.s line 26

get(edit arena, edit terminal, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 26

get(edit arena, edit write, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 26

get(edit arena, edit write, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 26

get(edit arena, edit open, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 26

get(edit arena, edit open, nat) -> (str) 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. not open file
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file
  7. out of bounds

get

Defined in: std/io.s line 23

get(edit open, nat) -> (str)

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

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. null pointer
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. curl initialization failed
  6. out of memory while reading response
  7. out of bounds

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. curl initialization failed
  6. out of memory while reading response
  7. out of bounds

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. curl initialization failed
  6. out of memory while reading response
  7. out of bounds

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

Defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

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 - 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

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

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 a char[] buffer

Defined in: std/core/array.s line 59

alloc(nat) -> (edit char[])

Complexity

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

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 28

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: 27
  • 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 28

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: 26
  • Transpiled C size: 190

Potential errors

  1. allocation failed
  2. 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 28

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: 29
  • 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 28

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: 28
  • Transpiled C size: 209

Potential errors

  1. allocation failed
  2. 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 28

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: 25
  • 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 28

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: 24
  • Transpiled C size: 150

Potential errors

  1. allocation failed

Defered calls

free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 28

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: 26
  • 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 28

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: 25
  • Transpiled C size: 182

Potential errors

  1. allocation failed
  2. 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 28

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: 28
  • 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 28

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: 27
  • Transpiled C size: 201

Potential errors

  1. allocation failed
  2. 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 28

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: 24
  • 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 28

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: 23
  • Transpiled C size: 142

Potential errors

  1. allocation failed

Defered calls

free(mut any ptr) -> ()

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) 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 136

alloc(edit list) -> (edit allocated)

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 136

alloc(edit list, nat length) -> (edit allocated)

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 136

alloc(edit list) -> (edit allocated)

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 136

alloc(edit list, nat length) -> (edit allocated)

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 122

alloc(edit circular) -> (edit allocated)

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 122

alloc(edit circular, nat length) -> (edit allocated)

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 - arena allocation

Defined in: std/core/allocators.s line 111

alloc(edit arena) -> (edit allocated)

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 111

alloc(edit arena, nat length) -> (edit allocated)

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

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. out of bounds
  6. arena is out of space
  7. empty input name
  8. cannot tag a structural type
  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. out of bounds
  6. arena is out of space
  7. empty input name
  8. cannot tag a structural type
  9. tag surface cannot be structural type
  10. can only define strings on contiguous buffers
  11. can only define strings on non-offset buffers

Defered calls

free(mut any ptr) -> ()

resize

resize - resize the buffer

Defined in: std/core/array.s line 63

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 63

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 81

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

mutget

mutget - mutable pointer to buffer element

Defined in: std/core/array.s line 87

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 87

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 - get a list element pointer

Defined in: std/core/allocators.s line 107

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 107

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 107

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 71

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 71

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 - 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. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. string buffer is full
  5. out of bounds

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. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. string buffer is full
  5. out of bounds

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. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. string buffer is full
  5. out of bounds

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 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

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

len

len - string length

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

len(str) -> (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

Defined in: std/core/allocators.s line 97

len(list) -> (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 97

len(list) -> (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 46

len(arena) -> (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 113

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 - vectot length

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

len(vec) -> (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 bufs

Defined in: std/core/allocators.s line 21

new() -> (new)

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

arena

arena

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

arena("char__t9t") -> (edit arena)

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 37

arena(edit any[]) -> (edit arena)

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 25

arena(edit any[], nat _pos) -> (edit arena)

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__t661t") -> (edit arena)

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__t619t") -> (edit arena)

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__t615t") -> (edit arena)

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__t611t") -> (edit arena)

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)

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__t3595t") -> (edit arena)

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__t3529t") -> (edit arena)

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__t3250t") -> (edit arena)

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) -> (edit arena)

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 52

allocated(edit any[], nat pos) -> (edit allocated)

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 55

status(allocated) -> (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 55

status(arena) -> (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)

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 81

circular(edit any[]) -> (edit circular)

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__t3595t") -> (edit circular)

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__t3529t") -> (edit circular)

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__t3250t") -> (edit circular)

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__t661t") -> (edit circular)

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__t619t") -> (edit circular)

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__t615t") -> (edit circular)

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__t611t") -> (edit circular)

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)

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)

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 86

list(edit any[], "external") -> (edit list)

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 86

list(edit any[]) -> (edit list)

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__t3595t") -> (edit list)

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__t3529t") -> (edit list)

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__t3250t") -> (edit list)

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__t661t") -> (edit list)

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__t619t") -> (edit list)

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__t615t") -> (edit list)

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__t611t") -> (edit list)

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)

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) -> ()

at

at - get a mutable pointer to the last buffer element

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

at(edit allocated) -> (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 88

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: 721

Potential errors

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. string buffer is full
  5. out of bounds

at - find or add an item in a robinhood_entry list

Defined in: std/hash.s line 88

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: 1054

Potential errors

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. string buffer is full
  5. out of bounds

at - find or add an item in a robinhood_entry list

Defined in: std/hash.s line 88

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: 1048

Potential errors

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. string buffer is full
  5. out of bounds

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

slice

slice - a buffer subregion of an arena

Defined in: std/core/allocators.s line 156

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: 173

Potential errors

  1. 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 406

slice(str, str, str) -> (str)

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. slice out of string bounds
  3. not found
  4. 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 406

slice(str, str, cstr _to) -> (str)

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. slice out of string bounds
  3. not found
  4. 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 406

slice(str, cstr _from, str) -> (str)

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. slice out of string bounds
  3. not found
  4. 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 406

slice(str, cstr _from, cstr _to) -> (str)

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. slice out of string bounds
  3. not found
  4. 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 406

slice(cstr _s, str, str) -> (str)

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. slice out of string bounds
  3. not found
  4. 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 406

slice(cstr _s, str, cstr _to) -> (str)

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. slice out of string bounds
  3. not found
  4. 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 406

slice(cstr _s, cstr _from, str) -> (str)

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. slice out of string bounds
  3. not found
  4. 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 406

slice(cstr _s, cstr _from, cstr _to) -> (str)

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. slice out of string bounds
  3. not found
  4. out of bounds

slice - get a substring view into a string

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

slice(str, nat from, nat to) -> (str)

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 332

slice(cstr _s, nat from, nat to) -> (str)

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

char_allocator

list

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

list("char__t9t") -> (edit list)

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)

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)

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

new - allocations on new bufs

Defined in: std/core/allocators.s line 21

new() -> (new)

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 57

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 - convert to string

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

str(cstr) -> (str)

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)

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. can only define strings on non-offset buffers
  3. can only define strings on contiguous buffers
  4. nat subtraction would yield a negative
  5. out of bounds

str - a string residing on a buffer

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

str(char[], nat pos, "to", nat endpos) -> (str)

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. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. out of bounds

str - a string residing on a buffer

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

str(char[], nat pos, "len", nat length) -> (str)

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 non-offset buffers
  2. null pointer
  3. can only define strings on contiguous buffers
  4. out of bounds

str - tautology function for strings

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

str(str) -> (str)

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)

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. can only define strings on contiguous buffers
  3. string does not fit on buffer
  4. can only define strings on non-offset buffers
  5. out of bounds

str - a string residing on the full breadth of a buffer

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

str(char[], nat length) -> (str)

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. can only define strings on contiguous buffers
  3. string does not fit on buffer
  4. can only define strings on non-offset buffers
  5. out of bounds

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)

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)

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)

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 - reads a string from the console

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

str(new CHARS, console console) -> (str) 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 - reads a string from the console

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

str(edit arena, console console) -> (str) 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. 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. unexpected end of console read
  7. read string does not fit on buffer

str - create a compact str

Defined in: std/mini.s line 70

str(cstr) -> (str)

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 62

str(str) -> (str)

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)

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)

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 132

copy(edit list, cstr _other) -> (str) 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: 171

Potential errors

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

copy - copy a string

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

copy(edit list, str) -> (str) 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: 177

Potential errors

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

copy - copy a string

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

copy(edit circular, cstr _other) -> (str) 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: 171

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 132

copy(edit circular, str) -> (str) 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: 177

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 132

copy(edit arena, cstr _other) -> (str) 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: 171

Potential errors

  1. arena is out of space
  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 132

copy(edit arena, str) -> (str) 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: 177

Potential errors

  1. arena is out of space
  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 132

copy(new CHARS, cstr _other) -> (str) 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: 156

Potential errors

  1. can only define strings on non-offset buffers
  2. allocation failed
  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 132

copy(new CHARS, str) -> (str) 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: 162

Potential errors

  1. can only define strings on non-offset buffers
  2. allocation failed
  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 556

copy(edit list, float n) -> (str) 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: 1209

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 556

copy(edit circular, float n) -> (str) 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: 1209

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 556

copy(edit arena, float n) -> (str) 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: 1209

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 556

copy(new CHARS, float n) -> (str) 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: 1194

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 495

copy(edit list, nat n) -> (str) 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: 476

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 495

copy(edit circular, nat n) -> (str) 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: 476

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 495

copy(edit arena, nat n) -> (str) 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: 476

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 495

copy(new CHARS, nat n) -> (str) 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: 461

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) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. can only place vectors on contiguous buffers

copy - copy a vector

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

copy(edit arena, vec) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers

copy - copy a vector

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

copy(new FLOATS, vec) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

copy_null_terminated

copy_null_terminated - copy a string while adding null termination

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

copy_null_terminated(edit arena, cstr _other) -> (str) 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 294

copy_null_terminated(edit arena, str) -> (str) 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 149

copy_null_terminated(new CHARS, str) -> (str) 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: 31
  • Transpiled C size: 168

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation

Defered calls

free(mut any ptr) -> ()

unsafe_temp

unsafe_temp - tautology function for cstr

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

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 160

unsafe_temp(str) -> (unsafe_temp)

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. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation

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 160

unsafe_temp(str, str) -> (unsafe_temp)

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. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation

Defered calls

free(mut any ptr) -> ()

endpos

endpos - the end position of a string

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

endpos(str) -> (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 219

revalidate(str) -> (str)

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 346

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 346

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 346

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 346

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 354

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 354

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 354

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 354

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 372

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: 356

contains - check whether a string contains a needle substring

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

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: 350

contains - check whether a string contains a needle substring

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

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: 350

contains - check whether a string contains a needle substring

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

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: 344

contains - check whether a string contains a needle character

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

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: 255

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 364

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: 249

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 385

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: 364

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

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

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: 427

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

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

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: 423

Potential errors

  1. nat subtraction would yield a negative
  2. not found

find - find within a string a needle substring’s first ocurence

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

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: 486

Potential errors

  1. nat subtraction would yield a negative
  2. not found

find - find within a string a needle substring’s first ocurence

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

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: 358

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

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

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: 421

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

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

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: 417

Potential errors

  1. nat subtraction would yield a negative
  2. not found

find - find within a string a needle substring’s first ocurence

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

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: 480

Potential errors

  1. nat subtraction would yield a negative
  2. not found

find - find within a string a needle substring’s first ocurence

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

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: 358

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

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

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: 421

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

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

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: 417

Potential errors

  1. nat subtraction would yield a negative
  2. not found

find - find within a string a needle substring’s first ocurence

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

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: 480

Potential errors

  1. nat subtraction would yield a negative
  2. not found

find - find within a string a needle substring’s first ocurence

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

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: 352

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

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

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: 415

Potential errors

  1. not found

find - find within a string a needle substring’s first ocurence

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

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: 411

Potential errors

  1. nat subtraction would yield a negative
  2. not found

find - find within a string a needle substring’s first ocurence

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

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: 474

Potential errors

  1. nat subtraction would yield a negative
  2. not found

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: 439

Potential errors

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. index not found
  5. out of bounds

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: 625

Potential errors

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. index not found
  5. out of bounds

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: 619

Potential errors

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. index not found
  5. out of bounds

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: 473

Potential errors

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. index not found
  5. out of bounds

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: 659

Potential errors

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. index not found
  5. out of bounds

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: 653

Potential errors

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. index not found
  5. out of bounds

empty

empty - checks that a string does not have any character

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

empty(str) -> (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 481

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

rotl

rotl

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 55

splitmix64() -> (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: 2
  • 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 33

splitmix64(mut nat) -> (mut nat)

Computes the next random number of a splitmix64 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 80

Rand() -> (edit Rand)

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 u64 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: 6
  • Transpiled C size: 26

Rand - random number generator

Defined in: std/rand.s line 65

Rand(nat) -> (edit Rand)

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 u64 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: 17
  • Transpiled C size: 79

Hashable

nat - an unsigned integer value

Defined in: builtins line 1

nat() -> (nat)

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

float

Defined in: builtins line 1

float() -> (float)

cstr - constant string

Defined in: builtins line 1

cstr() -> (cstr)

nat

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

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

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

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

float - cast to float

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

float(bits) -> (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 84

nat(bits) -> (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 51

nat(char) -> (nat)

Converting a character to a natural number considers its bit representation interpreted as an unsigned number.

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 40

nat(nat) -> (nat)

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

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 40

nat(int) -> (nat)

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

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 40

nat(float) -> (nat)

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

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 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 15

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 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 15

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 2 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 5
  • Transpiled C size: 15

cstr - extract the cstr from unsafe_temp string

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

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 207

cstr(unsafe_temp) -> (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 207

cstr(unsafe_temp) -> (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)

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)

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. can only define strings on non-offset buffers
  3. can only define strings on contiguous buffers
  4. nat subtraction would yield a negative
  5. out of bounds

str - a string residing on a buffer

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

str(char[], nat pos, "to", nat endpos) -> (str)

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. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. out of bounds

str - a string residing on a buffer

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

str(char[], nat pos, "len", nat length) -> (str)

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 non-offset buffers
  2. null pointer
  3. can only define strings on contiguous buffers
  4. out of bounds

str - tautology function for strings

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

str(str) -> (str)

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)

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. can only define strings on contiguous buffers
  3. string does not fit on buffer
  4. can only define strings on non-offset buffers
  5. out of bounds

str - a string residing on the full breadth of a buffer

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

str(char[], nat length) -> (str)

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. can only define strings on contiguous buffers
  3. string does not fit on buffer
  4. can only define strings on non-offset buffers
  5. out of bounds

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)

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)

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)

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

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: 31
  • Transpiled C size: 253

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)

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)

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)

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)

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) -> (str)

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)

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) -> (str)

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)

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) -> (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 82

unpack(char[], nat16 dat.pos, nat16 dat.length) -> (str)

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 76

unpack(str) -> (str)

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. null pointer
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. curl initialization failed
  6. out of memory while reading response
  7. out of bounds

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. null pointer
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. curl initialization failed
  6. out of memory while reading response
  7. out of bounds

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. curl initialization failed
  6. out of memory while reading response
  7. out of bounds

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. null pointer
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. curl initialization failed
  6. out of memory while reading response
  7. out of bounds

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. curl initialization failed
  6. out of memory while reading response
  7. out of bounds

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. null pointer
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. curl initialization failed
  6. out of memory while reading response
  7. out of bounds

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

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. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot allocate a buffer of unsized type
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. curl initialization failed
  10. out of memory while reading response

Defered calls

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

abs

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

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

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)

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) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. can only place vectors on contiguous buffers

vec - vector allocation

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

vec(edit circular, nat length, "dirty") -> (mut vec) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. can only place vectors on contiguous buffers

vec - vector allocation

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

vec(edit arena, nat length) -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. can only place vectors on contiguous buffers

vec - vector allocation

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

vec(edit arena, nat length, "dirty") -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. can only place vectors on contiguous buffers

vec - treat a float buffer as a vector

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

vec(edit float[]) -> (mut vec)

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. cannot place vectors on buffer offsets
  2. can only place vectors on contiguous buffers

vec - vector on a new buffer

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

vec(new FLOATS, nat length) -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

vec - vector on a new buffer

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

vec(new FLOATS, nat length, "dirty") -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

vec - view a matrix as a vector

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

vec(mat) -> (mut vec)

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)

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 - view a vector as a matrix on the same memory

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

mat(vec, "col") -> (mut mat)

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)

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)

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. arena is out of space
  2. division by zero
  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) 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) 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) 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. arena is out of space
  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, "dirty") -> (mut mat) 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. arena is out of space
  2. can only place matrices on contiguous buffers
  3. cannot place matrices on buffer offsets

mat - matrix on a fresh buffer

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

mat(new FLOATS, nat rows, nat cols) -> (mut mat) 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) 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) -> ()

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)

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)

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)

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 bufs

Defined in: std/core/allocators.s line 21

new() -> (new)

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

arena

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

arena("float__t661t") -> (edit arena)

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__t619t") -> (edit arena)

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__t615t") -> (edit arena)

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__t611t") -> (edit arena)

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)

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

circular

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

circular("float__t3595t") -> (edit circular)

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__t3529t") -> (edit circular)

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__t3250t") -> (edit circular)

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__t661t") -> (edit circular)

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__t619t") -> (edit circular)

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__t615t") -> (edit circular)

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__t611t") -> (edit circular)

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)

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__t3595t") -> (edit arena)

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__t3529t") -> (edit arena)

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__t3250t") -> (edit arena)

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)

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. cannot place vectors on buffer offsets
  2. can only place vectors on contiguous buffers

reduce

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

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) -> (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

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) -> (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) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. out of bounds
  5. can only place vectors on contiguous buffers

sum - sum of each column

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

sum(edit arena, coo, "col") -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. out of bounds
  5. can only place vectors on contiguous buffers

sum - sum of each column

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

sum(new FLOATS, coo, "col") -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

sum - sum of each row

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

sum(edit circular, coo, "row") -> (mut vec) 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. cannot place vectors on buffer offsets
  2. does not fit in circular arena
  3. null pointer
  4. out of bounds
  5. can only place vectors on contiguous buffers

sum - sum of each row

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

sum(edit arena, coo, "row") -> (mut vec) 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. cannot place vectors on buffer offsets
  2. arena is out of space
  3. null pointer
  4. out of bounds
  5. can only place vectors on contiguous buffers

sum - sum of each row

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

sum(new FLOATS, coo, "row") -> (mut vec) 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

Defered calls

free(mut any ptr) -> ()

mean

mean

Defined in: std/sci/stats.s line 32

mean(accumulator) -> (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) -> (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) -> (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) -> (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) -> (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) -> (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) -> (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) -> (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)

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: 637

Potential errors

  1. null pointer
  2. vectors must have the same length
  3. at least two values required
  4. undefined for constant vectors
  5. division by zero

rows

rows - number of rows

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

rows(mat) -> (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) -> (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) -> (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) -> (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)

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. arena is out of space
  2. division by zero
  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) -> (mut vec)

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)

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) -> (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) 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. does not fit in circular arena
  2. null pointer
  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) 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. arena is out of space
  2. null pointer
  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) 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. null pointer
  2. row out of bounds
  3. column out of bounds
  4. allocation failed
  5. cannot allocate a buffer of unsized type
  6. cannot resize buffers with alloc; it promises no data reallocation

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)

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)

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 - view a vector as a matrix on the same memory

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

mat(vec, "col") -> (mut mat)

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)

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)

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. arena is out of space
  2. division by zero
  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) 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) 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) 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. arena is out of space
  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, "dirty") -> (mut mat) 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. arena is out of space
  2. can only place matrices on contiguous buffers
  3. cannot place matrices on buffer offsets

mat - matrix on a fresh buffer

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

mat(new FLOATS, nat rows, nat cols) -> (mut mat) 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) 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)

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)

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) -> ()

tagged

tagged - blank tag structure

Defined in: std/tag.s line 20

tagged(cstr) -> (tagged)

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. does not match
  2. null pointer

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. arena is out of space
  2. out of bounds

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)

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)

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)

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)

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) -> ()

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)

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) -> (edit growing_thread_pool)

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, nat to)
range(nat _from, nat to) -> (edit range)
get(range, nat _pos) -> (nat)
mutget(edit any[], nat i) -> (mut any ptr {follows any ptr buffer.unsafe_ptr})
join(system_thread) -> ()

thread

thread

Defined in: std/pipe.s line 73

thread(edit growing_thread_pool, (pipe ptr) -> () func, pipe ptr input) -> (mut system_thread) 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. arena is out of space
  2. null pointer
  3. out of bounds

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. does not match
  2. null pointer

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. arena is out of space
  2. out of bounds

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. out of bounds
  6. arena is out of space
  7. empty input name
  8. cannot tag a structural type
  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. out of bounds
  6. arena is out of space
  7. empty input name
  8. cannot tag a structural type
  9. tag surface cannot be structural type
  10. can only define strings on contiguous buffers
  11. 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: 6
  • Transpiled C size: 71

Potential errors

  1. reallocation failed

free

free - free memory

Defined in: std/unsafe.s line 51

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 58

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

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: 7
  • Transpiled C size: 104

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 49

window(float size.width, float size.height, cstr title, cstr font_path) -> (edit window)

Complexity

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

is_open

is_open

Defined in: std/graphics.s line 73

is_open(edit window) -> (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 78

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 82

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 88

draw(edit window) -> (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. alopeny drawing on window

Defered calls

unsafe_end_drawing() -> ()

clear

clear

Defined in: std/graphics.s line 97

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 127

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 127

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 114

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 114

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 101

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 142

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)

TextureData

TextureData

Defined in: std/graphics.s line 146

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 149

Texture(nat id, float size.width, float size.height, nat mipmaps, nat format) -> (Texture)

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 156

open(cstr) -> (Texture)

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 218

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 205

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 191

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 179

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 169

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 231

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))

circ

Defined in: std/graphics.s line 318

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 0 (0 are builtins or raw C code, 1 calls those, etc.)
  • SSA variables: 16
  • Transpiled C size: 69

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))

ellipse

ellipse

Defined in: std/graphics.s line 251

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 241

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 261

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 282

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 272

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))

rect

Defined in: std/graphics.s line 286

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

tri

tri

Defined in: std/graphics.s line 307

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 296

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 335

dt(window) -> (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 340

uptime(window) -> (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 345

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 350

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 355

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 360

mouse_pos(window) -> (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 368

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 373

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 378

mouse_wheel(window) -> (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 383

() -> (0)

KEY_APOSTROPHE

Defined in: std/graphics.s line 384

() -> (39)

KEY_COMMA

Defined in: std/graphics.s line 385

() -> (44)

KEY_MINUS

Defined in: std/graphics.s line 386

() -> (45)

KEY_PERIOD

Defined in: std/graphics.s line 387

() -> (46)

KEY_SLASH

Defined in: std/graphics.s line 388

() -> (47)

KEY_ZERO

Defined in: std/graphics.s line 389

() -> (48)

KEY_ONE

Defined in: std/graphics.s line 390

() -> (49)

KEY_TWO

Defined in: std/graphics.s line 391

() -> (50)

KEY_THREE

Defined in: std/graphics.s line 392

() -> (51)

KEY_FOUR

Defined in: std/graphics.s line 393

() -> (52)

KEY_FIVE

Defined in: std/graphics.s line 394

() -> (53)

KEY_SIX

Defined in: std/graphics.s line 395

() -> (54)

KEY_SEVEN

Defined in: std/graphics.s line 396

() -> (55)

KEY_EIGHT

Defined in: std/graphics.s line 397

() -> (56)

KEY_NINE

Defined in: std/graphics.s line 398

() -> (57)

KEY_SEMICOLON

Defined in: std/graphics.s line 399

() -> (59)

KEY_EQUAL

Defined in: std/graphics.s line 400

() -> (61)

KEY_A

Defined in: std/graphics.s line 401

() -> (65)

KEY_B

Defined in: std/graphics.s line 402

() -> (66)

KEY_C

Defined in: std/graphics.s line 403

() -> (67)

KEY_D

Defined in: std/graphics.s line 404

() -> (68)

KEY_E

Defined in: std/graphics.s line 405

() -> (69)

KEY_F

Defined in: std/graphics.s line 406

() -> (70)

KEY_G

Defined in: std/graphics.s line 407

() -> (71)

KEY_H

Defined in: std/graphics.s line 408

() -> (72)

KEY_I

Defined in: std/graphics.s line 409

() -> (73)

KEY_J

Defined in: std/graphics.s line 410

() -> (74)

KEY_K

Defined in: std/graphics.s line 411

() -> (75)

KEY_L

Defined in: std/graphics.s line 412

() -> (76)

KEY_M

Defined in: std/graphics.s line 413

() -> (77)

KEY_N

Defined in: std/graphics.s line 414

() -> (78)

KEY_O

Defined in: std/graphics.s line 415

() -> (79)

KEY_P

Defined in: std/graphics.s line 416

() -> (80)

KEY_Q

Defined in: std/graphics.s line 417

() -> (81)

KEY_R

Defined in: std/graphics.s line 418

() -> (82)

KEY_S

Defined in: std/graphics.s line 419

() -> (83)

KEY_T

Defined in: std/graphics.s line 420

() -> (84)

KEY_U

Defined in: std/graphics.s line 421

() -> (85)

KEY_V

Defined in: std/graphics.s line 422

() -> (86)

KEY_W

Defined in: std/graphics.s line 423

() -> (87)

KEY_X

Defined in: std/graphics.s line 424

() -> (88)

KEY_Y

Defined in: std/graphics.s line 425

() -> (89)

KEY_Z

Defined in: std/graphics.s line 426

() -> (90)

KEY_LEFT_BRACKET

Defined in: std/graphics.s line 427

() -> (91)

KEY_BACKSLASH

Defined in: std/graphics.s line 428

() -> (92)

KEY_RIGHT_BRACKET

Defined in: std/graphics.s line 429

() -> (93)

KEY_GRAVE

Defined in: std/graphics.s line 430

() -> (96)

KEY_SPACE

Defined in: std/graphics.s line 431

() -> (32)

KEY_ESCAPE

Defined in: std/graphics.s line 432

() -> (256)

KEY_ENTER

Defined in: std/graphics.s line 433

() -> (257)

KEY_TAB

Defined in: std/graphics.s line 434

() -> (258)

KEY_BACKSPACE

Defined in: std/graphics.s line 435

() -> (259)

KEY_INSERT

Defined in: std/graphics.s line 436

() -> (260)

KEY_DELETE

Defined in: std/graphics.s line 437

() -> (261)

KEY_RIGHT

Defined in: std/graphics.s line 438

() -> (262)

KEY_LEFT

Defined in: std/graphics.s line 439

() -> (263)

KEY_DOWN

Defined in: std/graphics.s line 440

() -> (264)

KEY_UP

Defined in: std/graphics.s line 441

() -> (265)

KEY_PAGE_UP

Defined in: std/graphics.s line 442

() -> (266)

KEY_PAGE_DOWN

Defined in: std/graphics.s line 443

() -> (267)

KEY_HOME

Defined in: std/graphics.s line 444

() -> (268)

KEY_END

Defined in: std/graphics.s line 445

() -> (269)

KEY_CAPS_LOCK

Defined in: std/graphics.s line 446

() -> (280)

KEY_SCROLL_LOCK

Defined in: std/graphics.s line 447

() -> (281)

KEY_NUM_LOCK

Defined in: std/graphics.s line 448

() -> (282)

KEY_PRINT_SCREEN

Defined in: std/graphics.s line 449

() -> (283)

KEY_PAUSE

Defined in: std/graphics.s line 450

() -> (284)

KEY_F1

Defined in: std/graphics.s line 451

() -> (290)

KEY_F2

Defined in: std/graphics.s line 452

() -> (291)

KEY_F3

Defined in: std/graphics.s line 453

() -> (292)

KEY_F4

Defined in: std/graphics.s line 454

() -> (293)

KEY_F5

Defined in: std/graphics.s line 455

() -> (294)

KEY_F6

Defined in: std/graphics.s line 456

() -> (295)

KEY_F7

Defined in: std/graphics.s line 457

() -> (296)

KEY_F8

Defined in: std/graphics.s line 458

() -> (297)

KEY_F9

Defined in: std/graphics.s line 459

() -> (298)

KEY_F10

Defined in: std/graphics.s line 460

() -> (299)

KEY_F11

Defined in: std/graphics.s line 461

() -> (300)

KEY_F12

Defined in: std/graphics.s line 462

() -> (301)

KEY_LEFT_SHIFT

Defined in: std/graphics.s line 463

() -> (340)

KEY_LEFT_CONTROL

Defined in: std/graphics.s line 464

() -> (341)

KEY_LEFT_ALT

Defined in: std/graphics.s line 465

() -> (342)

KEY_LEFT_SUPER

Defined in: std/graphics.s line 466

() -> (343)

KEY_RIGHT_SHIFT

Defined in: std/graphics.s line 467

() -> (344)

KEY_RIGHT_CONTROL

Defined in: std/graphics.s line 468

() -> (345)

KEY_RIGHT_ALT

Defined in: std/graphics.s line 469

() -> (346)

KEY_RIGHT_SUPER

Defined in: std/graphics.s line 470

() -> (347)

KEY_KB_MENU

Defined in: std/graphics.s line 471

() -> (348)

KEY_KP_0

Defined in: std/graphics.s line 472

() -> (320)

KEY_KP_1

Defined in: std/graphics.s line 473

() -> (321)

KEY_KP_2

Defined in: std/graphics.s line 474

() -> (322)

KEY_KP_3

Defined in: std/graphics.s line 475

() -> (323)

KEY_KP_4

Defined in: std/graphics.s line 476

() -> (324)

KEY_KP_5

Defined in: std/graphics.s line 477

() -> (325)

KEY_KP_6

Defined in: std/graphics.s line 478

() -> (326)

KEY_KP_7

Defined in: std/graphics.s line 479

() -> (327)

KEY_KP_8

Defined in: std/graphics.s line 480

() -> (328)

KEY_KP_9

Defined in: std/graphics.s line 481

() -> (329)

KEY_KP_DECIMAL

Defined in: std/graphics.s line 482

() -> (330)

KEY_KP_DIVIDE

Defined in: std/graphics.s line 483

() -> (331)

KEY_KP_MULTIPLY

Defined in: std/graphics.s line 484

() -> (332)

KEY_KP_SUBTRACT

Defined in: std/graphics.s line 485

() -> (333)

KEY_KP_ADD

Defined in: std/graphics.s line 486

() -> (334)

KEY_KP_ENTER

Defined in: std/graphics.s line 487

() -> (335)

KEY_KP_EQUAL

Defined in: std/graphics.s line 488

() -> (336)

KEY_BACK

Defined in: std/graphics.s line 489

() -> (4)

KEY_MENU

Defined in: std/graphics.s line 490

() -> (5)

KEY_VOLUME_UP

Defined in: std/graphics.s line 491

() -> (24)

KEY_VOLUME_DOWN

Defined in: std/graphics.s line 492

() -> (25)

NumberOrPtr

nat - an unsigned integer value

Defined in: builtins line 1

nat() -> (nat)

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

float

Defined in: builtins line 1

float() -> (float)

int - a signed integer value

Defined in: builtins line 1

int() -> (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() -> (cstr)

cstr - extract the cstr from unsafe_temp string

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

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 207

cstr(unsafe_temp) -> (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 207

cstr(unsafe_temp) -> (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)

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)

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. can only define strings on non-offset buffers
  3. can only define strings on contiguous buffers
  4. nat subtraction would yield a negative
  5. out of bounds

str - a string residing on a buffer

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

str(char[], nat pos, "to", nat endpos) -> (str)

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. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers
  4. nat subtraction would yield a negative
  5. out of bounds

str - a string residing on a buffer

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

str(char[], nat pos, "len", nat length) -> (str)

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 non-offset buffers
  2. null pointer
  3. can only define strings on contiguous buffers
  4. out of bounds

str - tautology function for strings

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

str(str) -> (str)

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)

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. can only define strings on contiguous buffers
  3. string does not fit on buffer
  4. can only define strings on non-offset buffers
  5. out of bounds

str - a string residing on the full breadth of a buffer

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

str(char[], nat length) -> (str)

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. can only define strings on contiguous buffers
  3. string does not fit on buffer
  4. can only define strings on non-offset buffers
  5. out of bounds

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)

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)

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)

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 - reads a string from the console

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

str(new CHARS, console console) -> (str) 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) -> ()

cstr - a cstr description of an error code

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

cstr(catch) -> (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 114

str(edit arena, console console) -> (str) 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. 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. unexpected end of console read
  7. read string does not fit on buffer

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: 22
  • Transpiled C size: 160

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. failed to start process
  4. process terminated with unhandled non-zero exit code
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation

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: 18
  • Transpiled C size: 154

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) -> (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: 24
  • Transpiled C size: 122

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. failed to start process
  4. process terminated with unhandled non-zero exit code
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation

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: 28
  • Transpiled C size: 159

Potential errors

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. failed to start process
  4. process terminated with unhandled non-zero exit code
  5. allocation failed
  6. cannot allocate a buffer of unsized type
  7. cannot resize buffers with alloc; it promises no data reallocation