pub trait PreflightExecutor<F, RA = MatrixRecordArena<F>> {
// Required methods
fn execute(
&self,
state: VmStateMut<'_, F, TracingMemory, RA>,
instruction: &Instruction<F>,
) -> Result<(), ExecutionError>;
fn get_opcode_name(&self, opcode: usize) -> String;
}
Expand description
Trait for preflight execution via a host interpreter. The trait methods allow execution of instructions via enum dispatch within an interpreter. This execution is specialized to record “records” of execution which will be ingested later for trace matrix generation. The records are stored in a record arena, which is provided in the VmStateMut argument.
Required Methods§
Sourcefn execute(
&self,
state: VmStateMut<'_, F, TracingMemory, RA>,
instruction: &Instruction<F>,
) -> Result<(), ExecutionError>
fn execute( &self, state: VmStateMut<'_, F, TracingMemory, RA>, instruction: &Instruction<F>, ) -> Result<(), ExecutionError>
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.