Skip to main content

recomputable

Function recomputable 

Source
pub fn recomputable(
    prog: &CompiledProgram,
) -> Vec<(Option<usize>, Reg, usize, Op)>
Expand description

Reverse-live scratch registers that can be RECOMPUTED on reverse instead of journaled — Bennett uncompute — keyed by the FRAME they live in (register numbers are frame-relative). Each is a SCRATCH register that some reverse step in its frame reads live (so Observable/FullState must journal it), with a SINGLE pure-arithmetic def whose inputs are STABLE within the frame, and that (via the frame-overlap bases) aliases NO Main-observable slot. Re-running the def during reverse with self.base set to the frame reconstructs it exactly. Returns (frame, register, def_pc, def_op). Dynamic dispatch (CallValue, unknown callee) yields nothing; recursion is handled via the bounded frame bases (corner 4) — each activation recomputes at its own live base.