Trait InstructionExecutor

Source
pub trait InstructionExecutor {
    // Required method
    fn execute(
        &mut self,
        bytecode: &Bytecode,
        constants: &[Value],
    ) -> Result<(), ExecutionError>;
}
Expand description

Defines the main interface for VM instruction execution

This trait provides the core execution interface that the VM uses to run bytecode programs.

Required Methods§

Source

fn execute( &mut self, bytecode: &Bytecode, constants: &[Value], ) -> Result<(), ExecutionError>

Executes a bytecode program

§Arguments
  • bytecode - The bytecode to execute
  • constants - The constant pool for the bytecode
§Returns
  • Ok(()) on successful execution
  • Err(ExecutionError) if execution fails

Implementors§