Expand description
Unified array backing store for VM and JIT.
ShapeArray is a #[repr(C)] container of ValueWord values with a
C-ABI-stable memory layout that the JIT can access inline:
offset 0: data โ *mut ValueWord (pointer to element buffer)
offset 8: len โ u64 (number of elements)
offset 16: cap โ u64 (allocated capacity)Since ValueWord is #[repr(transparent)] over u64, the raw pointer
can be read as *mut u64 by JIT-generated machine code without any
casting or ABI mismatch.
ShapeArray replaces both:
Vec<ValueWord>(VM-sideVMArray = Arc<Vec<ValueWord>>)JitArray(JIT-side#[repr(C)]array of rawu64)
by providing one type with correct ValueWord clone/drop semantics and a stable C layout for the JIT.
Structsยง
- Shape
Array - Unified array with C-ABI-stable layout for JIT and VM.