Browse Source

Use VMFace in some places in Executive

cl-refactor
Paweł Bylica 10 years ago
parent
commit
a7dabc897e
  1. 2
      libethereum/Executive.cpp
  2. 7
      libethereum/Executive.h

2
libethereum/Executive.cpp

@ -147,7 +147,7 @@ OnOpFunc Executive::simpleTrace()
return [](uint64_t steps, Instruction inst, bigint newMemSize, bigint gasCost, void* voidVM, void const* voidExt)
{
ExtVM const& ext = *(ExtVM const*)voidExt;
VM& vm = *(VM*)voidVM;
VM& vm = *(VM*)voidVM; // TODO: Ok for now, because only interpeter/VM supports OnOp callback, but safer solution would be nice
ostringstream o;
o << endl << " STACK" << endl;

7
libethereum/Executive.h

@ -25,7 +25,6 @@
#include <libdevcore/Log.h>
#include <libevmface/Instruction.h>
#include <libethcore/CommonEth.h>
#include <libevm/ExtVMFace.h>
#include "Transaction.h"
#include "Manifest.h"
@ -34,7 +33,7 @@ namespace dev
namespace eth
{
class VM;
class VMFace;
class ExtVM;
class State;
@ -62,14 +61,14 @@ public:
bytesConstRef out() const { return m_out; }
h160 newAddress() const { return m_newAddress; }
VM const& vm() const { return *m_vm; }
VMFace const& vm() const { return *m_vm; }
State const& state() const { return m_s; }
ExtVM const& ext() const { return *m_ext; }
private:
State& m_s;
ExtVM* m_ext = nullptr; // TODO: make safe.
VM* m_vm = nullptr;
VMFace* m_vm = nullptr;
Manifest* m_ms = nullptr;
bytesConstRef m_out;
Address m_newAddress;

Loading…
Cancel
Save