From a7dabc897e42318b9f1be7c40036058b4183f906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 22 Oct 2014 17:30:02 +0200 Subject: [PATCH] Use VMFace in some places in Executive --- libethereum/Executive.cpp | 2 +- libethereum/Executive.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libethereum/Executive.cpp b/libethereum/Executive.cpp index fe5b21761..c46b8c39b 100644 --- a/libethereum/Executive.cpp +++ b/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; diff --git a/libethereum/Executive.h b/libethereum/Executive.h index 82b7df7e9..f7c056252 100644 --- a/libethereum/Executive.h +++ b/libethereum/Executive.h @@ -25,7 +25,6 @@ #include #include #include -#include #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;