Skip to main content

program_cfg_fabric

Function program_cfg_fabric 

Source
pub fn program_cfg_fabric(src: &str, fn_name: &str) -> ProgramCfgFabric
Expand description

Panicking wrapper preserving the original contract for all existing callers: lowers fn_name’s CFG to a whole-program fabric, or panics with the same message the old code did. New code that wants to handle an unsupported construct gracefully should call try_program_cfg_fabric.

A FailWith op (a bounds / overflow / divide-by-zero / undefined-variable error trap) is REFUSED — a program that reaches one errors in the VM too, so there is no ≡VM value for the fabric to produce. (This is correct behaviour, not a gap: it must not be “trapped” away, or the fabric would return a value where the VM errors. Realistic error-checked programs whose guards PASS carry no reachable FailWith and lower.)