Calculating gas using usize (if supplied gaslimit fits in usize) (#1518)

* Spliting gasometer out of interpreter

* Choosing right gas calculations implementation based on supplied gas

* Moving verification out of gasometer

* MemGasCost benchmark.

Conflicts:
	ethcore/src/evm/benches/mod.rs

* Some simple benchmarks

* Benchmark for simple loop

* Calculating gas_for_memory only when it's actually needed

* Removing superfluous newline [ci skip]
This commit is contained in:
Tomasz Drwięga
2016-07-05 09:15:44 -04:00
committed by Gav Wood
parent 45d532368d
commit 4c1b74a42e
14 changed files with 839 additions and 568 deletions

View File

@@ -208,7 +208,7 @@ fn do_json_test_for(vm_type: &VMType, json_data: &[u8]) -> Vec<String> {
&mut tracer,
&mut vm_tracer,
);
let mut evm = vm_factory.create();
let mut evm = vm_factory.create(params.gas);
let res = evm.exec(params, &mut ex);
// a return in finalize will not alter callcreates
let callcreates = ex.callcreates.clone();