Skip to main content

program_calls_fabric

Function program_calls_fabric 

Source
pub fn program_calls_fabric(src: &str, fn_name: &str) -> WProgConfig
Expand description

Lift a WHOLE multi-function program (with function CALLS and recursion) to a WProgConfig carrying Call terminators — the source→config half of recursion (the frame-stack eval_wprog_config is the eval half). fn_name is lifted FIRST so its entry is block 0 (the config’s entry); every function shares one global block index space, and a Call targets the callee function’s entry block. Correct-first scope: integer bodies + calls (LoadConst-int / Move / Add·Sub·Mul / AddAssign / Div·Mod·FloorDiv / comparisons / Call / Return / Jump family) — enough for fib/sumdown/gcd-style recursion; collections-in-recursion is the follow-on (the heap arms would be added the same way program_cfg_fabric has them).