Skip to main content

loop_fabric_from_source

Function loop_fabric_from_source 

Source
pub fn loop_fabric_from_source(src: &str, fn_name: &str) -> LoopFabric
Expand description

The genuine Futamura P1 lowering for a counted loop. Compile src, recover the range loop in function fn_name (a counted header and its unit step, or NewRange/IterPrepare/IterNext, and the back-edge Jump), and lower it to a LoopFabric: the loop-carried accumulators (state), the induction variable, the loop invariants, and the straight-line body (SSA). Panics on any shape outside the counted range-loop family (the honest boundary — nested loops / data-dependent exits are future work).