From 8ccde784f9035c0a7a8f234994538c817c5b9de7 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 1 Feb 2015 15:30:29 +0100 Subject: Added (disabled) Jit validation --- vm/common.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'vm/common.go') diff --git a/vm/common.go b/vm/common.go index ff187001f..45a7187a9 100644 --- a/vm/common.go +++ b/vm/common.go @@ -18,6 +18,18 @@ const ( MaxVmTy ) +func NewVm(env Environment) VirtualMachine { + switch env.VmType() { + case JitVmTy: + return NewJitVm(env) + default: + vmlogger.Infoln("unsupported vm type %d", env.VmType()) + fallthrough + case StdVmTy: + return New(env) + } +} + var ( GasStep = big.NewInt(1) GasSha = big.NewInt(10) -- cgit