Browse Source

Merge remote-tracking branch 'origin/hotfix/jit_to_interpreter_fallback' into evmjit

cl-refactor
Paweł Bylica 10 years ago
parent
commit
ad1b58531f
  1. 13
      evmjit/libevmjit-cpp/JitVM.cpp
  2. 2
      mix/MixApplication.cpp
  3. 2
      mix/MixApplication.h

13
evmjit/libevmjit-cpp/JitVM.cpp

@ -1,10 +1,14 @@
#pragma GCC diagnostic ignored "-Wconversion"
#include "JitVM.h"
#include <libdevcore/Log.h>
#include <libdevcrypto/SHA3.h>
#include <libevm/VM.h>
#include <libevm/VMFactory.h>
#include <libdevcrypto/SHA3.h>
#include <evmjit/libevmjit/ExecutionEngine.h>
#include "Utils.h"
namespace dev
@ -27,12 +31,13 @@ bytesConstRef JitVM::go(ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _step)
if (rejected)
{
UNTESTED;
std::cerr << "Rejected\n";
cwarn << "Execution rejected by EVM JIT (gas limit: " << m_gas << "), executing with interpreter";
VMFactory::setKind(VMKind::Interpreter);
m_fallbackVM = VMFactory::create(m_gas);
VMFactory::setKind(VMKind::JIT);
return m_fallbackVM->go(_ext, _onOp, _step);
auto&& output = m_fallbackVM->go(_ext, _onOp, _step);
m_gas = m_fallbackVM->gas(); // copy remaining gas, Executive expects it
return output;
}
m_data.gas = static_cast<decltype(m_data.gas)>(m_gas);

2
mix/MixApplication.cpp

@ -33,7 +33,7 @@
using namespace dev::mix;
MixApplication::MixApplication(int _argc, char* _argv[]):
MixApplication::MixApplication(int& _argc, char* _argv[]):
QApplication(_argc, _argv), m_engine(new QQmlApplicationEngine()), m_appContext(new AppContext(m_engine.get()))
{
setOrganizationName(tr("Ethereum"));

2
mix/MixApplication.h

@ -40,7 +40,7 @@ class MixApplication: public QApplication
Q_OBJECT
public:
MixApplication(int _argc, char* _argv[]);
MixApplication(int& _argc, char* _argv[]);
virtual ~MixApplication();
AppContext* context() { return m_appContext.get(); }
QQmlApplicationEngine* engine() { return m_engine.get(); }

Loading…
Cancel
Save