Struct revm_interpreter::Interpreter
source · pub struct Interpreter {
pub instruction_pointer: *const u8,
pub instruction_result: InstructionResult,
pub gas: Gas,
pub memory: Memory,
pub stack: Stack,
pub return_data_buffer: Bytes,
pub return_range: Range<usize>,
pub is_static: bool,
pub contract: Contract,
}
Fields§
§instruction_pointer: *const u8
Instruction pointer.
instruction_result: InstructionResult
Return is main control flag, it tell us if we should continue interpreter or break from it
gas: Gas
left gas. Memory gas can be found in Memory field.
memory: Memory
Memory.
stack: Stack
Stack.
return_data_buffer: Bytes
After call returns, its return data is saved here.
return_range: Range<usize>
Return value.
is_static: bool
Is interpreter call static.
contract: Contract
Contract information and invoking data
Implementations§
source§impl Interpreter
impl Interpreter
sourcepub fn current_opcode(&self) -> u8
pub fn current_opcode(&self) -> u8
Current opcode
pub fn contract(&self) -> &Contract
pub fn gas(&self) -> &Gas
pub fn add_next_gas_block(&mut self, pc: usize) -> Option<InstructionResult>
sourcepub fn program_counter(&self) -> usize
pub fn program_counter(&self) -> usize
Return a reference of the program counter.
sourcepub fn run<H: Host, SPEC: Spec>(&mut self, host: &mut H) -> InstructionResult
pub fn run<H: Host, SPEC: Spec>(&mut self, host: &mut H) -> InstructionResult
loop steps until we are finished with execution
sourcepub fn run_inspect<H: Host, SPEC: Spec>(
&mut self,
host: &mut H
) -> InstructionResult
pub fn run_inspect<H: Host, SPEC: Spec>(
&mut self,
host: &mut H
) -> InstructionResult
loop steps until we are finished with execution
sourcepub fn return_value(&self) -> Bytes
pub fn return_value(&self) -> Bytes
Copy and get the return value of the interpreter, if any.