Browse Source

Cleanups

cl-refactor
Paweł Bylica 10 years ago
parent
commit
2b9b53024d
  1. 2
      libevmjit-cpp/Env.cpp
  2. 15
      libevmjit-cpp/JitVM.cpp
  3. 13
      libevmjit-cpp/JitVM.h

2
libevmjit-cpp/Env.cpp

@ -3,7 +3,7 @@
#include <libevm/FeeStructure.h>
#include <libevm/ExtVMFace.h>
#include "../libevmjit/Utils.h"
#include <evmjit/libevmjit/Utils.h>
extern "C"
{

15
libevmjit-cpp/VM.cpp → libevmjit-cpp/JitVM.cpp

@ -1,21 +1,19 @@
#include "VM.h"
#include "JitVM.h"
#include <libevm/VMFace.h>
#include <libevm/VM.h>
#include "../libevmjit/ExecutionEngine.h"
#include "../libevmjit/Compiler.h"
#include <evmjit/libevmjit/ExecutionEngine.h>
#include <evmjit/libevmjit/Compiler.h>
namespace dev
{
namespace eth
{
namespace jit
{
bytesConstRef VM::go(ExtVMFace& _ext, OnOpFunc const&, uint64_t)
bytesConstRef JitVM::go(ExtVMFace& _ext, OnOpFunc const&, uint64_t)
{
using namespace jit;
Compiler::Options defaultOptions;
auto module = Compiler(defaultOptions).compile(_ext.code);
@ -63,7 +61,6 @@ bytesConstRef VM::go(ExtVMFace& _ext, OnOpFunc const&, uint64_t)
return {m_output.data(), m_output.size()}; // TODO: This all bytesConstRef stuff sucks
}
}
}
}

13
libevmjit-cpp/VM.h → libevmjit-cpp/JitVM.h

@ -10,12 +10,7 @@ namespace dev
namespace eth
{
class VMFactory;
namespace jit
{
class VM: public VMFace
class JitVM: public VMFace
{
virtual bytesConstRef go(ExtVMFace& _ext, OnOpFunc const& _onOp = {}, uint64_t _steps = (uint64_t)-1) override final;
@ -23,12 +18,12 @@ class VM: public VMFace
static std::unique_ptr<VMFace> create(Kind, u256 _gas = 0);
private:
friend VMFactory;
explicit VM(u256 _gas = 0): VMFace(_gas) {}
friend class VMFactory;
explicit JitVM(u256 _gas = 0) : VMFace(_gas) {}
bytes m_output;
};
}
}
}
Loading…
Cancel
Save