Skip to main content

logos_rt_memmem_frame

Function logos_rt_memmem_frame 

Source
pub unsafe extern "C" fn logos_rt_memmem_frame(
    frame: *mut i64,
    h_ptr_slot: i64,
    h_len_slot: i64,
    n_ptr_slot: i64,
    n_len_slot: i64,
    needle_len_slot: i64,
    i_slot: i64,
    count_slot: i64,
) -> i64
Expand description

Frame-driven entry the [MicroOp::MemMem] stencil calls: reads the search nest’s live values out of the JIT frame, runs logos_rt_memmem, and on success ADDS the count into count_slot and advances i_slot to the loop’s exit value (bound + 1). Returns 1 on success and 0 on the deopt sentinel — the stencil routes 0 to its side-exit continuation, untouched.

§Safety

frame must be the running chain’s live frame; the named slots must hold the pinned haystack/needle pointer+length pairs, the needleLen value, the 1-based i, and the count accumulator.