gbf_core::decompiler::handlers

Trait OpcodeHandler

Source
pub trait OpcodeHandler: Send + Sync {
    // Required method
    fn handle_instruction(
        &self,
        context: &mut FunctionDecompilerContext,
        instruction: &Instruction,
    ) -> Result<ProcessedInstruction, FunctionDecompilerError>;
}
Expand description

Represents an opcode handler for the decompiler.

Required Methods§

Source

fn handle_instruction( &self, context: &mut FunctionDecompilerContext, instruction: &Instruction, ) -> Result<ProcessedInstruction, FunctionDecompilerError>

Handles the given instruction.

§Arguments
  • context: The decompiler context.
  • instruction: The instruction to handle.
§Errors
  • Returns a FunctionDecompilerError if there is an issue handling the instruction.

Implementors§