pub trait InstructionExecutor<F> {
// Required methods
fn execute(
&mut self,
instruction: Instruction<F>,
from_state: ExecutionState<u32>,
) -> Result<ExecutionState<u32>>;
fn get_opcode_name(&self, opcode: usize) -> String;
}
Required Methods§
Sourcefn execute(
&mut self,
instruction: Instruction<F>,
from_state: ExecutionState<u32>,
) -> Result<ExecutionState<u32>>
fn execute( &mut self, instruction: Instruction<F>, from_state: ExecutionState<u32>, ) -> Result<ExecutionState<u32>>
Runtime execution of the instruction, if the instruction is owned by the current instance. May internally store records of this call for later trace generation.
Sourcefn get_opcode_name(&self, opcode: usize) -> String
fn get_opcode_name(&self, opcode: usize) -> String
For display purposes. From absolute opcode as usize
, return the string name of the opcode
if it is a supported opcode by the present executor.