Skip to main content

jit_array_push_local

Function jit_array_push_local 

Source
#[unsafe(no_mangle)]
pub extern "C" fn jit_array_push_local( array_bits: u64, value_bits: u64, ) -> u64
Expand description

Push a value into an array in-place, mutating the existing JitArray. Returns the same array bits (the JitAlloc pointer doesn’t move; JitArray handles realloc internally). This is O(1) amortized vs O(n) for jit_array_push_elem which copies all elements. Used by ArrayPushLocal opcode for x = x.push(val) optimization.