Expand description
Constant propagation: inline literal values into their usage sites.
var x = 5; return x; → var x = 5; return 5;
Two-pass: Pass 1 (Collect): Find var/let/const with literal init and 0 writes. Pass 2 (Inline): Replace all read references with the literal.
Structs§
- Constant
Propagator - Constant propagation module.