aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-01 22:30:29 +0800
committerobscuren <geffobscura@gmail.com>2015-02-01 22:30:29 +0800
commit8ccde784f9035c0a7a8f234994538c817c5b9de7 (patch)
tree6fc252d3372510abda8fd16297caca481b5beeae /vm
parentd52878c744fd7acce727feb41c2d4296e56826d3 (diff)
downloaddexon-8ccde784f9035c0a7a8f234994538c817c5b9de7.tar
dexon-8ccde784f9035c0a7a8f234994538c817c5b9de7.tar.gz
dexon-8ccde784f9035c0a7a8f234994538c817c5b9de7.tar.bz2
dexon-8ccde784f9035c0a7a8f234994538c817c5b9de7.tar.lz
dexon-8ccde784f9035c0a7a8f234994538c817c5b9de7.tar.xz
dexon-8ccde784f9035c0a7a8f234994538c817c5b9de7.tar.zst
dexon-8ccde784f9035c0a7a8f234994538c817c5b9de7.zip
Added (disabled) Jit validation
Diffstat (limited to 'vm')
-rw-r--r--vm/common.go12
1 files changed, 12 insertions, 0 deletions
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)