mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
Cleanups
This commit is contained in:
parent
c6fcdbc7d6
commit
2b9b53024d
3 changed files with 11 additions and 19 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include <libevm/FeeStructure.h>
|
||||
#include <libevm/ExtVMFace.h>
|
||||
|
||||
#include "../libevmjit/Utils.h"
|
||||
#include <evmjit/libevmjit/Utils.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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…
Reference in a new issue