CLI option for using JITEVM (#1103)

* easily configurable vm (in progress)

* completely removed vm_factory from engine

* --jitvm command line flag
This commit is contained in:
Marek Kotewicz
2016-05-19 00:44:49 +02:00
committed by Gav Wood
parent 46f3b5f913
commit 6cff58055d
20 changed files with 204 additions and 155 deletions

View File

@@ -19,7 +19,7 @@ use common::*;
use spec::*;
use blockchain::{BlockChain, BlockChainConfig};
use state::*;
use evm::{Schedule, Factory};
use evm::Schedule;
use engine::*;
use ethereum;
use devtools::*;
@@ -51,15 +51,13 @@ impl<T> GuardedTempResult<T> {
}
pub struct TestEngine {
factory: Factory,
engine: Box<Engine>,
max_depth: usize
}
impl TestEngine {
pub fn new(max_depth: usize, factory: Factory) -> TestEngine {
pub fn new(max_depth: usize) -> TestEngine {
TestEngine {
factory: factory,
engine: ethereum::new_frontier_test().engine,
max_depth: max_depth
}
@@ -79,10 +77,6 @@ impl Engine for TestEngine {
self.engine.builtins()
}
fn vm_factory(&self) -> &Factory {
&self.factory
}
fn schedule(&self, _env_info: &EnvInfo) -> Schedule {
let mut schedule = Schedule::new_frontier();
schedule.max_depth = self.max_depth;