Skip to main content

Module control

Module control 

Source
Expand description

Control Flow FFI Functions for JIT

Higher-order functions (fold, reduce, map, filter, forEach) and function call helpers for JIT-compiled code.

Functions§

jit_call_foreign
jit_call_foreign_dynamic
jit_call_foreign_native
jit_call_foreign_native_0
jit_call_foreign_native_1
jit_call_foreign_native_2
jit_call_foreign_native_3
jit_call_foreign_native_4
jit_call_foreign_native_5
jit_call_foreign_native_6
jit_call_foreign_native_7
jit_call_foreign_native_8
jit_call_function
Call a function by function_id Stack reads args from ctx.stack before the call
jit_call_value
Call a closure or function value through the trampoline VM.
jit_control_every
every(array, predicate) - true if all elements match predicate
jit_control_filter
filter(array, predicate) - keep elements where predicate returns true
jit_control_find
find(array, predicate) - find first element matching predicate
jit_control_find_index
findIndex(array, predicate) - find index of first element matching predicate
jit_control_fold
fold(array, initial, fn) - left fold over array
jit_control_foreach
forEach(array, fn, count) - execute fn for each element (side effects)
jit_control_map
map(array, fn) - transform each element
jit_control_reduce
reduce(array, fn, initial) - reduce array to single value
jit_control_some
some(array, predicate) - true if any element matches predicate
jit_vm_fallback_trampoline⚠
Trampoline placeholder for mixed-table VM fallback paths.
set_jit_runtime_error
Record a VM-trampoline error message for the surrounding JIT execution to surface on deopt. Called from jit_call_method’s Err arm. Overwrites any prior message (the most recent error is the one that triggers the deopt).
set_trampoline_vm⚠
Register the trampoline VM for use during JIT execution.
take_jit_runtime_error
Take (and clear) the recorded VM-trampoline error message. Called by JITExecutor when a JIT-compiled function returns a negative signal, so the clean VM error can be surfaced in place of a generic JIT error code.
unset_trampoline_vm
Clear the trampoline VM pointer after JIT execution.
with_trampoline_vm
Access the trampoline VM for read-only queries (schema lookups, etc.)
with_trampoline_vm_mut
Execute a closure with mutable access to the trampoline VM.