aboutsummaryrefslogtreecommitdiffstats
path: root/vm.h
diff options
context:
space:
mode:
authorPaweł Bylica <pawel.bylica@imapp.pl>2014-10-30 19:37:21 +0800
committerPaweł Bylica <pawel.bylica@imapp.pl>2014-10-30 19:37:21 +0800
commitfdca7c8eede82e25843bf9190ffc8ece72f64060 (patch)
tree3d6c920ef3ae107e90f53dc4d8657d9b6c2c44f8 /vm.h
parentec9330609fa965b8928a99fd8e9b1e10a7c45fa0 (diff)
parent5110ffe3044a6c362ef29b33bc67c6d08c783451 (diff)
downloaddexon-solidity-fdca7c8eede82e25843bf9190ffc8ece72f64060.tar.gz
dexon-solidity-fdca7c8eede82e25843bf9190ffc8ece72f64060.tar.zst
dexon-solidity-fdca7c8eede82e25843bf9190ffc8ece72f64060.zip
Merge branch 'develop' into develop-evmcc
Conflicts: libevm/VM.h test/vm.cpp
Diffstat (limited to 'vm.h')
-rw-r--r--vm.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/vm.h b/vm.h
index e51fe3f8..b3397b2c 100644
--- a/vm.h
+++ b/vm.h
@@ -83,9 +83,7 @@ public:
void setVMKind(eth::VMFace::Kind _kind) { m_s.setVMKind(_kind); }
eth::VMFace::Kind getVMKind() const { return m_s.getVMKind(); }
- template<typename ExtVMType>
eth::OnOpFunc simpleTrace();
-
FakeState state() const { return m_s; }
std::map<Address, std::tuple<u256, u256, std::map<u256, u256>, bytes>> addresses;
@@ -99,32 +97,5 @@ private:
eth::Manifest m_ms;
};
-template<typename ExtVMType>
-eth::OnOpFunc FakeExtVM::simpleTrace()
-{
- return [](uint64_t steps, eth::Instruction inst, bigint newMemSize, bigint gasCost, void* voidVM, void const* voidExt)
- {
- ExtVMType const& ext = *(ExtVMType const*)voidExt;
- eth::VM& vm = *(eth::VM*)voidVM;
-
- std::ostringstream o;
- o << std::endl << " STACK" << std::endl;
- for (auto i: vm.stack())
- o << (h256)i << std::endl;
- o << " MEMORY" << std::endl << memDump(vm.memory());
- o << " STORAGE" << std::endl;
- for (auto const& i: ext.state().storage(ext.myAddress))
- o << std::showbase << std::hex << i.first << ": " << i.second << std::endl;
- dev::LogOutputStream<eth::VMTraceChannel, false>(true) << o.str();
- dev::LogOutputStream<eth::VMTraceChannel, false>(false) << " | " << std::dec << ext.depth << " | " << ext.myAddress << " | #" << steps << " | " << std::hex << std::setw(4) << std::setfill('0') << vm.curPC() << " : " << instructionInfo(inst).name << " | " << std::dec << vm.gas() << " | -" << std::dec << gasCost << " | " << newMemSize << "x32" << " ]";
- if (eth::VMTraceChannel::verbosity <= g_logVerbosity)
- {
- std::ofstream f;
- f.open("./vmtrace.log", std::ofstream::app);
- f << o.str();
- f << " | " << std::dec << ext.depth << " | " << ext.myAddress << " | #" << steps << " | " << std::hex << std::setw(4) << std::setfill('0') << vm.curPC() << " : " << instructionInfo(inst).name << " | " << std::dec << vm.gas() << " | -" << std::dec << gasCost << " | " << newMemSize << "x32";
- }
- };
-}
} } // Namespace Close