Skip to main content

compile_recording

Function compile_recording 

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

The same compilation, with what it did along the way recorded.

Two functions rather than one that takes options, because a caller that does not want the numbers 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. What pressure is for is -Zregister-pressure, which is how much of the frame the allocator had to use and is the metric spec/safe-memory/13-performance.md section 13.1 asks for.

Both are added to rather than replaced, so a caller can pass the same pair 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 to either, since a function that did not compile is not evidence about what a rule set or a frame would have done.