Trait ExecTracker

Source
pub trait ExecTracker<J: Jet> {
    // Required methods
    fn track_left(&mut self, ihr: Ihr);
    fn track_right(&mut self, ihr: Ihr);
    fn track_jet_call(
        &mut self,
        jet: &J,
        input_buffer: &[UWORD],
        output_buffer: &[UWORD],
        success: bool,
    );
    fn track_dbg_call(&mut self, cmr: &Cmr, value: Value);
    fn is_track_debug_enabled(&self) -> bool;
}
Expand description

A type that keeps track of Bit Machine execution.

The trait is implemented for SetTracker, that tracks which case branches were executed, and it is implemented for NoTracker, which is a dummy tracker that is optimized out by the compiler.

The trait enables us to turn tracking on or off depending on a generic parameter.

Required Methods§

Source

fn track_left(&mut self, ihr: Ihr)

Track the execution of the left branch of the case node with the given ihr.

Source

fn track_right(&mut self, ihr: Ihr)

Track the execution of the right branch of the case node with the given ihr.

Source

fn track_jet_call( &mut self, jet: &J, input_buffer: &[UWORD], output_buffer: &[UWORD], success: bool, )

Track the execution of a jet call with the given input_buffer, output_buffer, and call result success.

Source

fn track_dbg_call(&mut self, cmr: &Cmr, value: Value)

Track the potential execution of a dbg! call with the given cmr and value.

Source

fn is_track_debug_enabled(&self) -> bool

Check if tracking debug calls is enabled.

Implementors§