Trait orca_wasm::opcode::Instrumenter

source ·
pub trait Instrumenter<'a> {
Show 18 methods // Required methods fn curr_instrument_mode(&self) -> &Option<InstrumentationMode>; fn set_instrument_mode_at( &mut self, mode: InstrumentationMode, loc: Location, ); fn curr_func_instrument_mode(&self) -> &Option<FuncInstrMode>; fn set_func_instrument_mode(&mut self, mode: FuncInstrMode); fn clear_instr_at(&mut self, loc: Location, mode: InstrumentationMode); fn add_instr_at(&mut self, loc: Location, instr: Operator<'a>); fn empty_alternate_at(&mut self, loc: Location) -> &mut Self; fn empty_block_alt_at(&mut self, loc: Location) -> &mut Self; fn get_injected_val(&self, idx: usize) -> &Operator<'_>; // Provided methods fn func_entry(&mut self) -> &mut Self { ... } fn func_exit(&mut self) -> &mut Self { ... } fn before_at(&mut self, loc: Location) -> &mut Self { ... } fn after_at(&mut self, loc: Location) -> &mut Self { ... } fn alternate_at(&mut self, loc: Location) -> &mut Self { ... } fn semantic_after_at(&mut self, loc: Location) -> &mut Self { ... } fn block_entry_at(&mut self, loc: Location) -> &mut Self { ... } fn block_exit_at(&mut self, loc: Location) -> &mut Self { ... } fn block_alt_at(&mut self, loc: Location) -> &mut Self { ... }
}
Expand description

Defines instrumentation behaviour

Required Methods§

source

fn curr_instrument_mode(&self) -> &Option<InstrumentationMode>

Get the InstrumentType of the current location

source

fn set_instrument_mode_at(&mut self, mode: InstrumentationMode, loc: Location)

Sets the type of Instrumentation Type of the specified location

source

fn curr_func_instrument_mode(&self) -> &Option<FuncInstrMode>

Get the InstrumentType of the current function

source

fn set_func_instrument_mode(&mut self, mode: FuncInstrMode)

Sets the type of Instrumentation Type of the current function

source

fn clear_instr_at(&mut self, loc: Location, mode: InstrumentationMode)

Clears the instruction at a given Location

source

fn add_instr_at(&mut self, loc: Location, instr: Operator<'a>)

Splice a new instruction into a specific location

source

fn empty_alternate_at(&mut self, loc: Location) -> &mut Self

Injects an empty InstrumentationMode Alternate at a given location

source

fn empty_block_alt_at(&mut self, loc: Location) -> &mut Self

Injects an empty block alternate at a given location

source

fn get_injected_val(&self, idx: usize) -> &Operator<'_>

Get the instruction injected at index idx

Provided Methods§

source

fn func_entry(&mut self) -> &mut Self

Mark the current function to InstrumentFuncEntry

source

fn func_exit(&mut self) -> &mut Self

Mark the current function to InstrumentFuncExit

source

fn before_at(&mut self, loc: Location) -> &mut Self

Injects an Instruction with InstrumentationMode Before at a given location

source

fn after_at(&mut self, loc: Location) -> &mut Self

Injects an Instruction with InstrumentationMode After at a given location

source

fn alternate_at(&mut self, loc: Location) -> &mut Self

Injects an Instruction with InstrumentationMode Alternate at a given location

source

fn semantic_after_at(&mut self, loc: Location) -> &mut Self

Injects a Semantic After at a given location

source

fn block_entry_at(&mut self, loc: Location) -> &mut Self

Injects a block entry at a given location

source

fn block_exit_at(&mut self, loc: Location) -> &mut Self

Injects a block exit at a given location

source

fn block_alt_at(&mut self, loc: Location) -> &mut Self

Injects a block alternate at a given location

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> Instrumenter<'a> for ModuleIterator<'_, 'a>

source§

impl<'a, 'b> Instrumenter<'b> for FunctionModifier<'a, 'b>

source§

impl<'a, 'b> Instrumenter<'b> for ComponentIterator<'a, 'b>