You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
428 B

#include <libevm/VM.h>
#if ETH_EVMJIT
#include<libevmjit/VM.h>
#endif
#include "VMFactory.h"
namespace dev
{
namespace eth
{
std::unique_ptr<VMFace> VMFactory::create(VMFactory::Kind _kind, u256 _gas)
{
#if ETH_EVMJIT
auto vm = _kind == Kind::JIT ? static_cast<VMFace*>(new jit::VM)
: static_cast<VMFace*>(new VM);
#else
VMFace* vm = new VM;
#endif
vm->reset(_gas);
return std::unique_ptr<VMFace>(vm);
}
}
}