From f47ed026036c5dbb0154a3edb28ac3cc780b05ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 11 Dec 2014 18:42:51 +0100 Subject: [PATCH] Integrate VMFactory with evmjit submodule --- libevm/VMFactory.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libevm/VMFactory.cpp b/libevm/VMFactory.cpp index af37ec710..b6549ba04 100644 --- a/libevm/VMFactory.cpp +++ b/libevm/VMFactory.cpp @@ -18,6 +18,10 @@ #include "VMFactory.h" #include "VM.h" +#if ETH_EVMJIT +#include +#endif + namespace dev { namespace eth @@ -34,8 +38,12 @@ void VMFactory::setKind(VMKind _kind) std::unique_ptr VMFactory::create(u256 _gas) { - asserts(g_kind == VMKind::Interpreter && "Only interpreter supported for now"); +#if ETH_EVMJIT + return std::unique_ptr(g_kind == VMKind::JIT ? (VMFace*)new JitVM(_gas) : new VM(_gas)); +#else + asserts(g_kind == VMKind::Interpreter && "JIT disabled in build configuration"); return std::unique_ptr(new VM(_gas)); +#endif } }