aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-20 22:49:12 +0800
committerobscuren <geffobscura@gmail.com>2015-01-20 22:49:12 +0800
commit9845029a7535672746139084138f3e894e604e44 (patch)
tree3503d094eac24e63108938a37008a2eab3b3528d /vm
parent375cc67ba6dbc57e69aa594a6ac26ebc9b3a713a (diff)
downloadgo-tangerine-9845029a7535672746139084138f3e894e604e44.tar.gz
go-tangerine-9845029a7535672746139084138f3e894e604e44.tar.zst
go-tangerine-9845029a7535672746139084138f3e894e604e44.zip
StdVm by default
Diffstat (limited to 'vm')
-rw-r--r--vm/vm.go6
-rw-r--r--vm/vm_jit.go2
2 files changed, 5 insertions, 3 deletions
diff --git a/vm/vm.go b/vm/vm.go
index 6aa39797e..37e4249f5 100644
--- a/vm/vm.go
+++ b/vm/vm.go
@@ -17,7 +17,6 @@ type Vm struct {
err error
- // Debugging
Dbg Debugger
BreakPoints []int64
@@ -27,7 +26,7 @@ type Vm struct {
Recoverable bool
}
-func NewVm(env Environment) *Vm {
+func New(env Environment) *Vm {
lt := LogTyPretty
if ethutil.Config.Diff {
lt = LogTyDiff
@@ -111,6 +110,9 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
op = context.GetOp(pc)
self.Printf("(pc) %-3d -o- %-14s (m) %-4d (s) %-4d ", pc, op.String(), mem.Len(), stack.Len())
+ if self.Dbg != nil {
+ //self.Dbg.Step(self, op, mem, stack, context)
+ }
newMemSize, gas := self.calculateGasAndSize(context, caller, op, statedb, mem, stack)
diff --git a/vm/vm_jit.go b/vm/vm_jit.go
index 1cb9652af..0882bcf0c 100644
--- a/vm/vm_jit.go
+++ b/vm/vm_jit.go
@@ -8,7 +8,7 @@ type JitVm struct {
}
func NewJitVm(env Environment) *JitVm {
- backupVm := NewVm(env)
+ backupVm := New(env)
return &JitVm{env: env, backup: backupVm}
}