Skip to main content

compile_ir

Function compile_ir 

Source
pub fn compile_ir(opts: &Options, name: &str, fs: &dyn FileSystem) -> Compiled
Expand description

Reads one file of IR, checks it, and prints it back.

This is the compiler’s own textual IR arriving as an input rather than leaving as an output, which is what makes the round trip in the M2 exit criterion something to run rather than something to believe: what the printer wrote is read back, verified, and written again, and the two files are either the same bytes or they are not.

The verifier runs here for the reason it runs after the walk. A module that was printed by this compiler has been through it once already, and one that a person edited has not.