pub struct ForgeTier { /* private fields */ }Expand description
The forge-backed native tier, with compile observability.
Implementations§
Source§impl ForgeTier
impl ForgeTier
Sourcepub fn function_counts(&self) -> (u32, u32)
pub fn function_counts(&self) -> (u32, u32)
(attempts, successes) for FUNCTION compiles.
Sourcepub fn pinned_self_call_count(&self) -> u32
pub fn pinned_self_call_count(&self) -> u32
The number of fused pinned-argument self-calls (CallSelfCopy)
emitted across every function compile — Lever A’s observable. A
nonzero value proves a scalar self-call took the fused ABI rather
than per-argument frame Move staging.
Sourcepub fn region_counts(&self) -> (u32, u32)
pub fn region_counts(&self) -> (u32, u32)
(attempts, successes) for Main-loop REGION compiles.
Sourcepub fn regalloc_region_count(&self) -> u32
pub fn regalloc_region_count(&self) -> u32
How many region compiles used the CONTIGUOUS register-allocating backend
(WS-G compile_region_regalloc) rather than a per-piece stencil tier.
Nonzero proves the regalloc backend fired on a real program’s hot loop.
Sourcepub fn regalloc_precise_region_count(&self) -> u32
pub fn regalloc_precise_region_count(&self) -> u32
How many PRECISE region compiles used the contiguous register-allocating
backend (compile_region_regalloc_precise) rather than the per-piece
precise stencil tier. Nonzero proves the in-place-mutation + reallocating-
push shape (fannkuch / graph_bfs worklist) tiered through the regalloc
backend — Wave 21’s lever.
Sourcepub fn regalloc_function_count(&self) -> u32
pub fn regalloc_function_count(&self) -> u32
How many FUNCTION compiles used the contiguous register-allocating backend
(compile_function_regalloc) rather than the per-piece stencil tier.
Nonzero proves a recursive (self-calling) function tiered through the
regalloc backend — the recursion cluster’s lever.
Sourcepub fn runtime_stats(&self) -> (u64, u64, u64, u64)
pub fn runtime_stats(&self) -> (u64, u64, u64, u64)
Runtime FUNCTION-boundary truth: (entries, completions, plain deopts, precise deopts). Entries count VM→native crossings — native self-recursion inside one entry is invisible here, which is exactly the point: a hot recursive function shows FEW entries.
Trait Implementations§
Source§impl NativeTier for ForgeTier
impl NativeTier for ForgeTier
Source§fn compile_function(
&self,
code: &[Op],
entry_pc: usize,
constants: &[Constant],
param_count: u16,
register_count: u16,
self_fi: u16,
param_kinds: &[Option<ParamKind>],
ret_kind: Option<SlotKind>,
ctx: &NativeCtx,
callees: &[CalleeSig],
) -> Option<Box<dyn NativeFn>>
fn compile_function( &self, code: &[Op], entry_pc: usize, constants: &[Constant], param_count: u16, register_count: u16, self_fi: u16, param_kinds: &[Option<ParamKind>], ret_kind: Option<SlotKind>, ctx: &NativeCtx, callees: &[CalleeSig], ) -> Option<Box<dyn NativeFn>>
code
(code[0] is the instruction at entry_pc; jump targets inside are
ABSOLUTE program pcs and need rebasing by entry_pc). Return None to
leave the function on the bytecode path forever. Read moreSource§fn compile_region(
&self,
code: &[Op],
head_pc: usize,
exit_pc: usize,
constants: &[Constant],
register_count: u16,
named: &[bool],
observed: &[ObservedKind],
ctx: &NativeCtx,
callees: &[CalleeSig],
) -> Option<Box<dyn RegionFn>>
fn compile_region( &self, code: &[Op], head_pc: usize, exit_pc: usize, constants: &[Constant], register_count: u16, named: &[bool], observed: &[ObservedKind], ctx: &NativeCtx, callees: &[CalleeSig], ) -> Option<Box<dyn RegionFn>>
code[0] is the op at head_pc
(the back-edge target); the slice ends at the back-edge jump
(inclusive). Every jump out of the region must target exit_pc.
named[r] marks frame registers carrying a user-visible name — the
only slots whose post-region values are observable (scratches are
dead at statement boundaries by the compiler’s allocation
discipline). observed[r] is the register’s runtime kind at this hot
crossing — the speculation seed, re-checked by the guard set on every
entry. Default: regions stay on bytecode.Auto Trait Implementations§
impl !Freeze for ForgeTier
impl RefUnwindSafe for ForgeTier
impl Send for ForgeTier
impl Sync for ForgeTier
impl Unpin for ForgeTier
impl UnsafeUnpin for ForgeTier
impl UnwindSafe for ForgeTier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.