pub fn run<H: Host, SPEC: Spec>(&mut self, host: &mut H) -> Return {
        //let timer = std::time::Instant::now();
        let mut ret = Return::Continue;
        // add first gas_block
        if USE_GAS && !self.gas.record_cost(self.contract.first_gas_block()) {
            return Return::OutOfGas;
        }
        while ret == Return::Continue {
            // step
            if H::INSPECT {
                let ret = host.step(self, SPEC::IS_STATIC_CALL);
                if ret != Return::Continue {
                    return ret;
                }
            }
            let opcode = unsafe { *self.program_counter };
            // Safety: In analysis we are doing padding of bytecode so that we are sure that last.
            // byte instruction is STOP so we are safe to just increment program_counter bcs on last instruction
            // it will do noop and just stop execution of this contract
            self.program_counter = unsafe { self.program_counter.offset(1) };
            ret = eval::<H, SPEC>(opcode, self, host);

            if H::INSPECT {
                let ret = host.step_end(self, SPEC::IS_STATIC_CALL, ret);
                if ret != Return::Continue {
                    return ret;
                }
            }
        }
        ret
    }
/// loop steps until we are finished with execution
loop steps until we are finished with execution
loop steps until we are finished with execution
pub fn run<H: Host, SPEC: Spec>(&mut self, host: &mut H) -> Return {
        //let timer = std::time::Instant::now();
        let mut ret = Return::Continue;
        // add first gas_block
        if USE_GAS && !self.gas.record_cost(self.contract.first_gas_block()) {
            return Return::OutOfGas;
        }
        while ret == Return::Continue {
            // step
            if H::INSPECT {
                let ret = host.step(self, SPEC::IS_STATIC_CALL);
                if ret != Return::Continue {
                    return ret;
                }
            }
            let opcode = unsafe { *self.program_counter };
            // Safety: In analysis we are doing padding of bytecode so that we are sure that last.
            // byte instruction is STOP so we are safe to just increment program_counter bcs on last instruction
            // it will do noop and just stop execution of this contract
            self.program_counter = unsafe { self.program_counter.offset(1) };
            ret = eval::<H, SPEC>(opcode, self, host);
            if H::INSPECT {
                let ret = host.step_end(self, SPEC::IS_STATIC_CALL, ret);
                if ret != Return::Continue {
                    return ret;
                }
            }
        }
        ret
    }
pub fn run < H : Host , SPEC : Spec > ( & mut self , host : & mut H ) -> Return { //let timer = std::time::Instant::now(); let mut ret = Return :: Continue ; // add first gas_block if USE_GAS && ! self . gas . record_cost ( self . contract . first_gas_block ( ) ) { return Return :: OutOfGas ; } while ret == Return :: Continue { // step if H :: INSPECT { let ret = host . step ( self , SPEC :: IS_STATIC_CALL ) ; if ret != Return :: Continue { return ret ; } } let opcode = unsafe { * self . program_counter } ; // Safety: In analysis we are doing padding of bytecode so that we are sure that last. // byte instruction is STOP so we are safe to just increment program_counter bcs on last instruction // it will do noop and just stop execution of this contract self . program_counter = unsafe { self . program_counter . offset ( 1 ) } ; ret = eval :: < H , SPEC > ( opcode , self , host ) ; if H :: INSPECT { let ret = host . step_end ( self , SPEC :: IS_STATIC_CALL , ret ) ; if ret != Return :: Continue { return ret ; } } } ret }
loop steps until we are finished with execution
loop steps until we are finished with execution
&mut self
host
&mut H
&mut self
host
&mut H