Trait InstructionMapper

Source
pub trait InstructionMapper {
    // Required methods
    fn map_value(&mut self, value: Value) -> Value;
    fn map_value_list(&mut self, value_list: ValueList) -> ValueList;
    fn map_global_value(&mut self, global_value: GlobalValue) -> GlobalValue;
    fn map_jump_table(&mut self, jump_table: JumpTable) -> JumpTable;
    fn map_exception_table(
        &mut self,
        exception_table: ExceptionTable,
    ) -> ExceptionTable;
    fn map_block_call(&mut self, block_call: BlockCall) -> BlockCall;
    fn map_func_ref(&mut self, func_ref: FuncRef) -> FuncRef;
    fn map_sig_ref(&mut self, sig_ref: SigRef) -> SigRef;
    fn map_stack_slot(&mut self, stack_slot: StackSlot) -> StackSlot;
    fn map_dynamic_stack_slot(
        &mut self,
        dynamic_stack_slot: DynamicStackSlot,
    ) -> DynamicStackSlot;
    fn map_constant(&mut self, constant: Constant) -> Constant;
    fn map_immediate(&mut self, immediate: Immediate) -> Immediate;
}
Expand description

A trait to map some functions over each of the entities within an instruction, when paired with InstructionData::map.

Required Methods§

Source

fn map_value(&mut self, value: Value) -> Value

Map a function over a Value.

Source

fn map_value_list(&mut self, value_list: ValueList) -> ValueList

Map a function over a ValueList.

Source

fn map_global_value(&mut self, global_value: GlobalValue) -> GlobalValue

Map a function over a GlobalValue.

Source

fn map_jump_table(&mut self, jump_table: JumpTable) -> JumpTable

Map a function over a JumpTable.

Source

fn map_exception_table( &mut self, exception_table: ExceptionTable, ) -> ExceptionTable

Map a function over an ExceptionTable.

Source

fn map_block_call(&mut self, block_call: BlockCall) -> BlockCall

Map a function over a BlockCall.

Source

fn map_func_ref(&mut self, func_ref: FuncRef) -> FuncRef

Map a function over a FuncRef.

Source

fn map_sig_ref(&mut self, sig_ref: SigRef) -> SigRef

Map a function over a SigRef.

Source

fn map_stack_slot(&mut self, stack_slot: StackSlot) -> StackSlot

Map a function over a StackSlot.

Source

fn map_dynamic_stack_slot( &mut self, dynamic_stack_slot: DynamicStackSlot, ) -> DynamicStackSlot

Map a function over a DynamicStackSlot.

Source

fn map_constant(&mut self, constant: Constant) -> Constant

Map a function over a Constant.

Source

fn map_immediate(&mut self, immediate: Immediate) -> Immediate

Map a function over an Immediate.

Implementations on Foreign Types§

Source§

impl<'a, T> InstructionMapper for &'a mut T

Source§

fn map_value(&mut self, value: Value) -> Value

Source§

fn map_value_list(&mut self, value_list: ValueList) -> ValueList

Source§

fn map_global_value(&mut self, global_value: GlobalValue) -> GlobalValue

Source§

fn map_jump_table(&mut self, jump_table: JumpTable) -> JumpTable

Source§

fn map_exception_table( &mut self, exception_table: ExceptionTable, ) -> ExceptionTable

Source§

fn map_block_call(&mut self, block_call: BlockCall) -> BlockCall

Source§

fn map_func_ref(&mut self, func_ref: FuncRef) -> FuncRef

Source§

fn map_sig_ref(&mut self, sig_ref: SigRef) -> SigRef

Source§

fn map_stack_slot(&mut self, stack_slot: StackSlot) -> StackSlot

Source§

fn map_dynamic_stack_slot( &mut self, dynamic_stack_slot: DynamicStackSlot, ) -> DynamicStackSlot

Source§

fn map_constant(&mut self, constant: Constant) -> Constant

Source§

fn map_immediate(&mut self, immediate: Immediate) -> Immediate

Implementors§