Skip to main content

Module optimize

Module optimize 

Source
Expand description

AST-level constant folding optimization pass.

Evaluates constant arithmetic expressions at compile time, reducing runtime computation. Applied after parsing, before the AST reaches the runtime engine.

Functionsยง

fold_program
Fold constants in an entire program.