Skip to main content

Module context

Module context 

Source
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
JITDataFrame
Generic DataFrame storage for JIT execution. Stores data as an array of columns, matching the generic column_ptrs design in JITContext.
JITDataReference
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)
SimulationKernelConfig
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 zero diagnostic the bytecode VM emits for VMError::DivisionByZero. Mirrors the i64/i32/narrow/u64 div/mod arms in crates/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 same Index out of bounds diagnostic the bytecode VM emits for VMError::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 early return_ instead: a clean diagnostic, not silent-wrong-output. Mirrors the JIT_SIGNAL_DIVISION_BY_ZERO fall-through shape.
LOCALS_OFFSET
PENDING_CALL_ERROR_OFFSET
Byte offset of pending_call_error in 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 to WireValue::Null.
RETURN_TYPE_TAG_OFFSET
Byte offset of return_type_tag in JITContext (for Cranelift codegen).
ROW_COUNT_OFFSET
SIGNAL_TRAMPOLINE_ERROR
Negative i32 deopt signal returned by a JIT-compiled function when a VM-trampoline FFI call surfaced an Err. Distinct from -1 (generic JIT execution error) so JITExecutor can route to the stored VM error message.
STACK_KINDS_OFFSET
STACK_OFFSET
STACK_PTR_OFFSET
TIMESTAMPS_PTR_OFFSET

Type Aliases§

CorrelatedKernelFn
Function pointer type for correlated (multi-series) kernel functions.
JittedFn
Legacy function signature for simple numeric computations
JittedStrategyFn
Function pointer type for JIT-compiled strategy functions
OsrEntryFn
OSR entry function signature.
SimulationKernelFn
Function pointer type for simulation kernel functions (single series).