Skip to main content

Module cone

Module cone 

Source
Expand description

SRD-105 — cone-level JIT inside the interpreter kernel.

At assembly time, maximal cones of JIT-eligible nodes with scalar boundaries collapse into one synthetic JitConeNode each, compiled to native code via the existing P3 codegen. The cone node is an ordinary PolydatNode: the walker, scope chains, shared cells, None propagation, node_clean caching, and the enrich-and-re-raise panic contract all see a plain node.

Boundary marshalling covers every one-slot immediate and every Ref2 kind, borrowed into its pair for the call and copied out after it; interior fusion follows whatever the P3 classifier accepts. Extraction is recoverable: member nodes move into the cone only after codegen succeeds, so any JIT failure leaves the graph exactly as the interpreter would have compiled it.

Enums§

JitMode
How much of the interpreter’s graph is fused into native cones: the interpreter engine’s one knob, carried by Engine::Interpreter and settable per assembler with set_jit_mode. It is a property of the kernel being built, never of the process: two hosts in one process compiling under different modes get the kernels they each asked for.