Skip to main content

compile_recording

Function compile_recording 

Source
pub fn compile_recording(
    source: &mut Func,
    names: &mut Interner,
    machine: &Machine,
    flags: Flags,
    fired: &mut Fired,
) -> Result<Func, Unsupported>
Expand description

The same compilation, with the lowering rules it fired recorded into fired.

Two functions rather than one that takes an option, because a caller that does not want the number should not have to say so. What fired is for is -Zrule-coverage, which is how the harness in tamnd/rucc-compat turns coverage of the rule set into a number over a corpus.

It is merged into rather than replaced, so a caller can pass the same one for every function of a module and every module of a command line and get the answer for all of them.

ยงErrors

The same as compile. A function that was refused contributes nothing, since a function that did not compile is not evidence that anything covered it.