From 9c97f20674e73128541902dff1a444067a9c1abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 6 May 2015 10:29:36 +0200 Subject: [PATCH] Allow selecting VM kind manually --- libevmjit-cpp/JitVM.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libevmjit-cpp/JitVM.cpp b/libevmjit-cpp/JitVM.cpp index 84cc41dd1..7acbec5c1 100644 --- a/libevmjit-cpp/JitVM.cpp +++ b/libevmjit-cpp/JitVM.cpp @@ -32,9 +32,7 @@ bytesConstRef JitVM::go(ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _step) if (rejected) { 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); + m_fallbackVM = VMFactory::create(VMKind::Interpreter, m_gas); auto&& output = m_fallbackVM->go(_ext, _onOp, _step); m_gas = m_fallbackVM->gas(); // copy remaining gas, Executive expects it return output;