Allow single opcode stepping for EVM (#9051)
* Feed in ActionParams on VM creation
* Fix ethcore after Vm interface change
* Move informant inside Interpreter struct
* Move do_trace to Interpreter struct
* Move all remaining exec variables to Interpreter struct
* Refactor VM to allow single opcode step
* Fix all EVM tests
* Fix all wasm tests
* Fix wasm runner tests
* Fix a check case where code length is zero
* Fix jsontests compile
* Fix cargo lock
* Use match instead of expect
* Use cheaper check reader.len() == 0 for the initial special case
* Get rid of try_and_done! macro by using Result<(), ReturnType>
* Use Never instead of ()
* Fix parity-bytes path
* Bypass gasometer lifetime problem by borrow only for a instance
* typo: missing {
* Fix ethcore test compile
* Fix evm tests
This commit is contained in:
@@ -31,8 +31,8 @@ fn load_code<P: AsRef<path::Path>>(p: P) -> io::Result<Vec<u8>> {
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
fn wasm_interpreter() -> WasmInterpreter {
|
||||
WasmInterpreter
|
||||
fn wasm_interpreter(params: ActionParams) -> WasmInterpreter {
|
||||
WasmInterpreter::new(params)
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -131,7 +131,7 @@ pub fn construct(
|
||||
params.params_type = ParamsType::Separate;
|
||||
|
||||
Ok(
|
||||
match wasm_interpreter().exec(params, ext)? {
|
||||
match wasm_interpreter(params).exec(ext)? {
|
||||
GasLeft::Known(_) => Vec::new(),
|
||||
GasLeft::NeedsReturn { data, .. } => data.to_vec(),
|
||||
}
|
||||
@@ -192,9 +192,9 @@ pub fn run_fixture(fixture: &Fixture) -> Vec<Fail> {
|
||||
}
|
||||
}
|
||||
|
||||
let mut interpreter = wasm_interpreter();
|
||||
let mut interpreter = wasm_interpreter(params);
|
||||
|
||||
let interpreter_return = match interpreter.exec(params, &mut ext) {
|
||||
let interpreter_return = match interpreter.exec(&mut ext) {
|
||||
Ok(ret) => ret,
|
||||
Err(e) => { return Fail::runtime(e); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user