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/FeeStructure.h>
|
||||||
#include <libevm/ExtVMFace.h>
|
#include <libevm/ExtVMFace.h>
|
||||||
|
|
||||||
#include "../libevmjit/Utils.h"
|
#include <evmjit/libevmjit/Utils.h>
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,19 @@
|
||||||
|
|
||||||
#include "VM.h"
|
#include "JitVM.h"
|
||||||
|
|
||||||
#include <libevm/VMFace.h>
|
#include <libevm/VMFace.h>
|
||||||
#include <libevm/VM.h>
|
#include <libevm/VM.h>
|
||||||
|
#include <evmjit/libevmjit/ExecutionEngine.h>
|
||||||
#include "../libevmjit/ExecutionEngine.h"
|
#include <evmjit/libevmjit/Compiler.h>
|
||||||
#include "../libevmjit/Compiler.h"
|
|
||||||
|
|
||||||
namespace dev
|
namespace dev
|
||||||
{
|
{
|
||||||
namespace eth
|
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;
|
Compiler::Options defaultOptions;
|
||||||
auto module = Compiler(defaultOptions).compile(_ext.code);
|
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
|
return {m_output.data(), m_output.size()}; // TODO: This all bytesConstRef stuff sucks
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -10,12 +10,7 @@ namespace dev
|
||||||
namespace eth
|
namespace eth
|
||||||
{
|
{
|
||||||
|
|
||||||
class VMFactory;
|
class JitVM: public VMFace
|
||||||
|
|
||||||
namespace jit
|
|
||||||
{
|
|
||||||
|
|
||||||
class VM: public VMFace
|
|
||||||
{
|
{
|
||||||
virtual bytesConstRef go(ExtVMFace& _ext, OnOpFunc const& _onOp = {}, uint64_t _steps = (uint64_t)-1) override final;
|
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);
|
static std::unique_ptr<VMFace> create(Kind, u256 _gas = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend VMFactory;
|
friend class VMFactory;
|
||||||
explicit VM(u256 _gas = 0): VMFace(_gas) {}
|
explicit JitVM(u256 _gas = 0) : VMFace(_gas) {}
|
||||||
|
|
||||||
bytes m_output;
|
bytes m_output;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue