Skip to main content

Pass

Trait Pass 

Source
pub trait Pass {
    // Required methods
    fn run(&self, expr: &mut CoreExpr) -> Changed;
    fn name(&self) -> &str;
}
Expand description

An optimization pass over CoreExpr.

Required Methods§

Source

fn run(&self, expr: &mut CoreExpr) -> Changed

Run the pass, mutating the expression in place. Returns true if anything changed.

Source

fn name(&self) -> &str

Human-readable name for diagnostics.

Implementors§