Expand description
JIT Context and Related Data Structures
Contains the runtime context and data structures used by JIT-compiled code.
Structs§
- JITClosure
- JIT-compatible closure structure Holds function_id and a pointer to a heap-allocated array of captured values. Supports unlimited captures (no fixed-size limit).
- JITConfig
- JIT compilation configuration
- JITContext
- JIT execution context passed to compiled functions This struct must be C-compatible (#[repr(C)]) for FFI
- JITData
Frame - Generic DataFrame storage for JIT execution. Stores data as an array of columns, matching the generic column_ptrs design in JITContext.
- JITData
Reference - JIT-compatible data reference structure Represents a reference to a specific data row in time
- JITDuration
- JIT-compatible duration structure
- JITRange
- JIT-compatible range structure Represents a range with start and end values (both NaN-boxed)
- Simulation
Kernel Config - Configuration for compiling a simulation kernel.
Constants§
- COLUMN_
COUNT_ OFFSET - COLUMN_
PTRS_ OFFSET - CURRENT_
ROW_ OFFSET - GC_
SAFEPOINT_ FLAG_ PTR_ OFFSET - JIT_
SIGNAL_ DIVISION_ BY_ ZERO - Signal returned by a JIT-compiled function when an integer division or
modulo had a zero divisor. The executor maps this to the same
Division by zerodiagnostic the bytecode VM emits forVMError::DivisionByZero. Mirrors the i64/i32/narrow/u64 div/mod arms incrates/shape-jit/src/mir_compiler/rvalues.rs+v2_int.rs. - JIT_
SIGNAL_ INDEX_ OUT_ OF_ BOUNDS - Signal returned by a JIT-compiled function when a typed-array element
access (
v2_array_get/v2_array_set) had an out-of-bounds index. The executor maps this to the sameIndex out of boundsdiagnostic the bytecode VM emits forVMError::IndexOutOfBounds. The prior JIT codegen silently produced the element-type zero (read) or skipped the store (write) — a VM/JIT divergence and a memory-unsafe access surfacing as a fabricated value. This emits a guarded earlyreturn_instead: a clean diagnostic, not silent-wrong-output. Mirrors theJIT_SIGNAL_DIVISION_BY_ZEROfall-through shape. - LOCALS_
OFFSET - PENDING_
CALL_ ERROR_ OFFSET - Byte offset of
pending_call_errorin JITContext (for Cranelift codegen). - RETURN_
TAG_ BOOL - Raw bool (0 or 1). Executor reads as
stack[0] != 0. - RETURN_
TAG_ F64 - Raw f64 bits. Executor reads as
f64::from_bits(stack[0]). - RETURN_
TAG_ I32 - Raw i32 bits (zero-extended to u64). Executor reads as
stack[0] as i32. - RETURN_
TAG_ I64 - Raw i64 bits. Executor reads as
stack[0] as i64. - RETURN_
TAG_ NANBOXED - Legacy NaN-boxed value (default). Executor uses existing unboxing path.
- RETURN_
TAG_ UNIT - Unit / null / no-value return (W11-jit-new-array). Stamped when the
program’s terminal expression is a side-effecting call that
produces no value (e.g.
print(x)at top level). Executor maps this toWireValue::Null. - RETURN_
TYPE_ TAG_ OFFSET - Byte offset of
return_type_tagin JITContext (for Cranelift codegen). - ROW_
COUNT_ OFFSET - SIGNAL_
TRAMPOLINE_ ERROR - Negative
i32deopt signal returned by a JIT-compiled function when a VM-trampoline FFI call surfaced anErr. Distinct from-1(generic JIT execution error) soJITExecutorcan route to the stored VM error message. - STACK_
KINDS_ OFFSET - STACK_
OFFSET - STACK_
PTR_ OFFSET - TIMESTAMPS_
PTR_ OFFSET
Type Aliases§
- Correlated
Kernel Fn - Function pointer type for correlated (multi-series) kernel functions.
- Jitted
Fn - Legacy function signature for simple numeric computations
- Jitted
Strategy Fn - Function pointer type for JIT-compiled strategy functions
- OsrEntry
Fn - OSR entry function signature.
- Simulation
Kernel Fn - Function pointer type for simulation kernel functions (single series).