Skip to main content

Module runtime

Module runtime 

Source

Constants§

PTR_MASK
TAG_FALSE
TAG_KIND_BOOL_FALSE
TAG_KIND_BOOL_TRUE
TAG_KIND_CLOSURE
TAG_KIND_ERR
TAG_KIND_LIST
TAG_KIND_OK
TAG_KIND_STRING
TAG_KIND_STRUCT
TAG_KIND_UNIT
TAG_KIND_VARIANT
TAG_MASK
TAG_PATTERN
TAG_TRUE
TAG_UNIT

Statics§

SYMBOL_MAP

Functions§

call_builtin
Call a builtin by name from JIT’d code.
decode_bool
decode_f64
decode_ptr
Extract the pointer from a heap-allocated tagged value.
encode_bool
encode_f64
encode_heap
Encode a heap-allocated value (pointer must be valid and aligned). The pointer’s lower 48 bits are stored, higher bits must be zero-extendable. On x86-64, user-space pointers are < 2^48 so this is safe.
encode_unit
is_number
is_tagged
ling_abs
ling_add
ling_alloc
ling_and
ling_bool_to_u64
ling_builtin
Generic builtin dispatcher – calls builtin by name.
ling_ceil
ling_cos
ling_div
ling_eq
ling_f64_add
ling_f64_div
ling_f64_eq
ling_f64_ge
ling_f64_gt
ling_f64_le
ling_f64_lt
ling_f64_mul
ling_f64_neg
ling_f64_rem
ling_f64_sub
ling_floor
ling_free
ling_ge
ling_gt
ling_le
ling_list_get
ling_list_len
ling_list_new
ling_list_push
ling_lt
ling_mul
ling_ne
ling_neg
ling_not
ling_or
ling_panic
ling_print
ling_print_val
ling_rem
ling_round
ling_sin
ling_sqrt
ling_str_concat
ling_str_eq
ling_str_len
ling_str_new
ling_struct_get
ling_struct_new
ling_sub
register_builtin_dispatch
tag_kind
Extract the kind tag from a tagged value.

Type Aliases§

BuiltinDispatch
Signature of the builtin dispatch function provided by the host ling crate. Receives builtin name (ptr+len), args array (ptr+len), returns encoded Value.