pub trait RegionFn: Send + Sync {
// Required methods
fn guard_set(&self) -> &[(u16, SlotKind)];
fn free_set(&self) -> &[u16];
fn write_set(&self) -> &[(u16, SlotKind)];
fn frame_size(&self) -> usize;
fn run(&self, frame: &mut [i64], depth: usize) -> RegionOutcome;
// Provided methods
fn array_set(&self) -> &[ArrayPin] { ... }
fn hoist_guards(&self) -> &[HoistGuard] { ... }
fn region_return(&self) -> Option<RegionReturn> { ... }
fn arena_slots(&self) -> usize { ... }
fn precise_kinds(&self, _resume_pc: usize) -> Option<&[Option<SlotKind>]> { ... }
}Required Methods§
Sourcefn guard_set(&self) -> &[(u16, SlotKind)]
fn guard_set(&self) -> &[(u16, SlotKind)]
Slots whose CURRENT values the region may read before writing (or must preserve across a conditional write): the VM guards each one’s kind and copies its raw representation into the native frame.
Sourcefn free_set(&self) -> &[u16]
fn free_set(&self) -> &[u16]
Slots whose incoming values are provably DEAD (written before read, e.g. the loop-condition scratch): no guard, no copy-in.
fn frame_size(&self) -> usize
fn run(&self, frame: &mut [i64], depth: usize) -> RegionOutcome
Provided Methods§
Sourcefn array_set(&self) -> &[ArrayPin]
fn array_set(&self) -> &[ArrayPin]
Arrays the region reads/writes through pinned buffers (see
ArrayPin). Default: none.
Sourcefn hoist_guards(&self) -> &[HoistGuard]
fn hoist_guards(&self) -> &[HoistGuard]
Hoisted region-entry bounds checks (see HoistGuard). Default: none.
Sourcefn region_return(&self) -> Option<RegionReturn>
fn region_return(&self) -> Option<RegionReturn>
In-region Return support (see RegionReturn). Default: none —
such regions bail.
Sourcefn arena_slots(&self) -> usize
fn arena_slots(&self) -> usize
Extra arena headroom beyond frame_size (regions that CALL
functions window their callees past the frame and need real call
arena depth). Default: none.
Sourcefn precise_kinds(&self, _resume_pc: usize) -> Option<&[Option<SlotKind>]>
fn precise_kinds(&self, _resume_pc: usize) -> Option<&[Option<SlotKind>]>
PRECISE-deopt re-box kinds at resume_pc: one entry per VM register —
Some(kind) re-boxes the frame slot’s raw bits, None keeps the VM
register’s current value (a pinned array, or a read-only/unknown slot).
None overall ⇒ this region does not use precise deopt. Only meaningful
for a RegionOutcome::DeoptAt { resume_pc } outcome.