Skip to main content

compile_region_regalloc

Function compile_region_regalloc 

Source
pub fn compile_region_regalloc(
    ops: &[MicroOp],
    shared_status: Option<Arc<AtomicI64>>,
    live_out: &[Slot],
) -> Option<CompiledChain>
Expand description

Compile a region of micro-ops into ONE contiguous register-allocated x86-64 function, callable through the crate::buffer::JitChain ABI. Returns None (caller falls back to the stencil tier) when the region contains an unsupported op or has no terminating Return/Jump.

A REGION never contains a call, so this gates on the call-free supported subset and emits no self-call machinery.

live_out names the frame slots the caller reads after the chain returns (the VM’s write-back registers, a region-return flag and value). Every exit flushes the resident-written slots to the frame, so a slot named here must hold its step-semantics value at every exit, and no rewrite may give it a value the program’s path to that exit never assigned.