revm_interpreter::interpreter_types

Trait SubRoutineStack

Source
pub trait SubRoutineStack {
    // Required methods
    fn len(&self) -> usize;
    fn routine_idx(&self) -> usize;
    fn set_routine_idx(&mut self, idx: usize);
    fn push(&mut self, old_program_counter: usize, new_idx: usize) -> bool;
    fn pop(&mut self) -> Option<usize>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Methods§

Source

fn len(&self) -> usize

Source

fn routine_idx(&self) -> usize

Source

fn set_routine_idx(&mut self, idx: usize)

Sets new code section without touching subroutine stack.

Source

fn push(&mut self, old_program_counter: usize, new_idx: usize) -> bool

Pushes a new frame to the stack and new code index.

Source

fn pop(&mut self) -> Option<usize>

Pops previous subroutine, sets previous code index and returns program counter.

Provided Methods§

Source

fn is_empty(&self) -> bool

Implementors§