polkavm_common::program

Trait OpcodeVisitor

source
pub trait OpcodeVisitor: Copy {
    type State;
    type ReturnTy;
    type InstructionSet: InstructionSet;

    // Required methods
    fn instruction_set(self) -> Self::InstructionSet;
    fn dispatch(
        self,
        state: &mut Self::State,
        opcode: usize,
        chunk: u128,
        offset: u32,
        skip: u32,
    ) -> Self::ReturnTy;
}
Expand description

The lowest level visitor; dispatches directly on opcode numbers.

Required Associated Types§

Required Methods§

source

fn instruction_set(self) -> Self::InstructionSet

source

fn dispatch( self, state: &mut Self::State, opcode: usize, chunk: u128, offset: u32, skip: u32, ) -> Self::ReturnTy

Object Safety§

This trait is not object safe.

Implementors§