logos.lang.writ.comp_builder

Module lang · package logos-lang

Functions

fnwrit_coerce_bool

fn writ_coerce_bool(v: bool) -> WAny

Wraps a bool in an inline WAny.

fnwrit_coerce_i16

fn writ_coerce_i16(v: i16) -> WAny

Wraps an i16 in an inline WAny, preserving the exact width type code.

fnwrit_coerce_i32

fn writ_coerce_i32(v: i32) -> WAny

Wraps an i32 in an inline WAny, widened to i56 (exact width not preserved).

fnwrit_coerce_i8

fn writ_coerce_i8(v: i8) -> WAny

Wraps an i8 in an inline WAny, preserving the exact width type code.

fnwrit_coerce_str

fn writ_coerce_str(c: &Rc<Writ>, s: &[u8]) -> WAny

Coerces s into a WAny, allocating the WString in the container’s zone. needs_ctr form: the compiler passes the &Rc<Writ> first.

fnwrit_coerce_u16

fn writ_coerce_u16(v: u16) -> WAny

Wraps a u16 in an inline WAny, preserving the exact width type code.

fnwrit_coerce_u32

fn writ_coerce_u32(v: u32) -> WAny

Wraps a u32 in an inline WAny, widened to i56 (exact width not preserved).

fnwrit_coerce_u8

fn writ_coerce_u8(v: u8) -> WAny

Wraps a u8 in an inline WAny, preserving the exact width type code.

fnwrit_list_comp_new

fn writ_list_comp_new(cap: i64) -> Rc<Writ>

Creates the Rc-pinned Writ for a list comprehension, root = empty WArray<WAny>. cap is the arena segment size in bytes; the root is allocated only after the Rc pin, so it captures the stable heap allocator address (never-move design).

fnwrit_list_comp_push

fn writ_list_comp_push(c: &Rc<Writ>, v: WAny) -> void

Pushes v onto the comprehension container’s root WArray<WAny>.

fnwrit_map_comp_new

fn writ_map_comp_new(cap: i64, slot_hint: i64) -> Rc<Writ>

Creates the Rc-pinned Writ for a map comprehension, root = empty WMap<WString, WAny>. cap is the arena segment size in bytes; slot count = next power of two >= max(2 * slot_hint, 8) (open-addressing mask). Root allocated after the Rc pin.

fnwrit_map_comp_put

fn writ_map_comp_put(c: &Rc<Writ>, k: &[u8], v: WAny) -> void

Sets key k to v in the comprehension container’s root WMap<WString, WAny>.