diff options
author | Paweł Bylica <pawel.bylica@imapp.pl> | 2014-10-23 21:49:12 +0800 |
---|---|---|
committer | Paweł Bylica <pawel.bylica@imapp.pl> | 2014-10-23 21:49:12 +0800 |
commit | 39a74029d2c9e26a7738e1ce1fc56bd68dadfb2d (patch) | |
tree | f0bdd1c8c31767101bf81427e8079fb7e316eeaf | |
parent | 6cc1cb1001eaea1e462c6b62d763b6f8504dda77 (diff) | |
download | dexon-solidity-39a74029d2c9e26a7738e1ce1fc56bd68dadfb2d.tar dexon-solidity-39a74029d2c9e26a7738e1ce1fc56bd68dadfb2d.tar.gz dexon-solidity-39a74029d2c9e26a7738e1ce1fc56bd68dadfb2d.tar.bz2 dexon-solidity-39a74029d2c9e26a7738e1ce1fc56bd68dadfb2d.tar.lz dexon-solidity-39a74029d2c9e26a7738e1ce1fc56bd68dadfb2d.tar.xz dexon-solidity-39a74029d2c9e26a7738e1ce1fc56bd68dadfb2d.tar.zst dexon-solidity-39a74029d2c9e26a7738e1ce1fc56bd68dadfb2d.zip |
Revert "Expose VM kind setting of State in FakeExtVM"
This reverts commit 2d0557e2ee236b73546d6dd9f3ed7d19ec852a0f.
-rw-r--r-- | vm.cpp | 19 | ||||
-rw-r--r-- | vm.h | 2 |
2 files changed, 9 insertions, 12 deletions
@@ -436,8 +436,8 @@ h160 FakeState::createNewAddress(Address _newAddress, Address _sender, u256 _end m_cache[_newAddress] = AddressState(0, balance(_newAddress) + _endowment, h256(), h256()); // Execute init code. - auto vmObj = VMFace::create(getVMKind(), *_gas); - auto& vm = *vmObj; + auto vmObj = VMFace::create(VMFace::Interpreter, *_gas); + VMFace& vm = *vmObj; ExtVM evm(*this, _newAddress, _sender, _origin, _endowment, _gasPrice, bytesConstRef(), _code, o_ms, _level); bool revert = false; bytesConstRef out; @@ -499,14 +499,7 @@ void doTests(json_spirit::mValue& v, bool _fillin) BOOST_REQUIRE(o.count("pre") > 0); BOOST_REQUIRE(o.count("exec") > 0); - auto argc = boost::unit_test::framework::master_test_suite().argc; - auto argv = boost::unit_test::framework::master_test_suite().argv; - auto useJit = argc >= 2 && std::string(argv[1]) == "--jit"; - auto vmKind = useJit ? VMFace::JIT : VMFace::Interpreter; - dev::test::FakeExtVM fev; - fev.setVMKind(vmKind); - fev.importEnv(o["env"].get_obj()); fev.importState(o["pre"].get_obj()); @@ -519,8 +512,14 @@ void doTests(json_spirit::mValue& v, bool _fillin) fev.thisTxCode = get<3>(fev.addresses.at(fev.myAddress)); fev.code = &fev.thisTxCode; } + + + auto argc = boost::unit_test::framework::master_test_suite().argc; + auto argv = boost::unit_test::framework::master_test_suite().argv; + auto useJit = argc >= 2 && std::string(argv[1]) == "--jit"; - auto vm = VMFace::create(fev.getVMKind(), fev.gas); + auto vmKind = useJit ? VMFace::JIT : VMFace::Interpreter; + auto vm = VMFace::create(vmKind, fev.gas); bytes output; auto outOfGas = false; try @@ -79,8 +79,6 @@ public: void importExec(json_spirit::mObject& _o); json_spirit::mArray exportCallCreates(); void importCallCreates(json_spirit::mArray& _callcreates); - void setVMKind(eth::VMFace::Kind _kind) { m_s.setVMKind(_kind); } - eth::VMFace::Kind getVMKind() const { return m_s.getVMKind(); } std::map<Address, std::tuple<u256, u256, std::map<u256, u256>, bytes>> addresses; eth::Transactions callcreates; |