Skip to main content

Module references

Module references 

Source
Expand description

Reference FFI Functions for JIT — &array[index] = value lowering.

§Status: SURFACE (ADR-006 §2.7.4 / W10 jit-playbook §5)

Pre-strict-typing this module mutated an unified_array::UnifiedArray through JitArray::from_heap_bits_mut, decoded the index via unbox_number (a tag_bits decode hidden inside the deleted ValueWord API), and wrote raw u64 element bits via arr.set_boxed. Both ends are W-series defection-attractor pipeline (CLAUDE.md “Forbidden Patterns”: “Runtime tag_bits dispatch” + the deleted UnifiedArray heap layout — see jit_array.rs SURFACE comment for the layout-deletion audit).

The strict-typing rebuild target reads the array directly as Arc<TypedArrayData> per-element-kind arm (§2.7.6/Q8) and writes through the matching TypedArray<T>::set instantiation, with the element kind sourced from the JIT-stamped call signature per §2.7.5 (no decode of the receiver bits, no fabricated element kind).

Until the kinded array-FFI rebuild lands (W11 / deeper Phase-2c), the entry point below routes to todo!() so consumers fail loudly at the JIT-emitted call jit_set_index_ref site.

Functions§

jit_set_index_ref
Set an array element through a reference pointer.