Browse Source

Change VM interface to return a copy of output.

cl-refactor
Paweł Bylica 10 years ago
parent
commit
04a123e9a1
  1. 4
      libevmjit-cpp/JitVM.cpp
  2. 2
      libevmjit-cpp/JitVM.h

4
libevmjit-cpp/JitVM.cpp

@ -18,7 +18,7 @@ namespace eth
extern "C" void env_sload(); // fake declaration for linker symbol stripping workaround, see a call below
bytesConstRef JitVM::go(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _step)
bytesConstRef JitVM::execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _step)
{
using namespace jit;
@ -33,7 +33,7 @@ bytesConstRef JitVM::go(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp, ui
{
cwarn << "Execution rejected by EVM JIT (gas limit: " << io_gas << "), executing with interpreter";
m_fallbackVM = VMFactory::create(VMKind::Interpreter);
return m_fallbackVM->go(io_gas, _ext, _onOp, _step);
return m_fallbackVM->execImpl(io_gas, _ext, _onOp, _step);
}
m_data.gas = static_cast<decltype(m_data.gas)>(io_gas);

2
libevmjit-cpp/JitVM.h

@ -11,7 +11,7 @@ namespace eth
class JitVM: public VMFace
{
public:
virtual bytesConstRef go(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp = {}, uint64_t _steps = (uint64_t)-1) override final;
virtual bytesConstRef execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp = {}, uint64_t _steps = (uint64_t)-1) override final;
private:
jit::RuntimeData m_data;

Loading…
Cancel
Save