diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-18 19:31:04 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-18 19:31:04 +0800 |
commit | 82a2e4fe283d15eaacc554544131bd6669210f79 (patch) | |
tree | 475f70f6ae9e278fb4fbe85da31c9c9f97854f9c /mist | |
parent | 6956b5104f8fa62832f61f533f67817286ebb2d5 (diff) | |
download | dexon-82a2e4fe283d15eaacc554544131bd6669210f79.tar dexon-82a2e4fe283d15eaacc554544131bd6669210f79.tar.gz dexon-82a2e4fe283d15eaacc554544131bd6669210f79.tar.bz2 dexon-82a2e4fe283d15eaacc554544131bd6669210f79.tar.lz dexon-82a2e4fe283d15eaacc554544131bd6669210f79.tar.xz dexon-82a2e4fe283d15eaacc554544131bd6669210f79.tar.zst dexon-82a2e4fe283d15eaacc554544131bd6669210f79.zip |
Reflect changes to the eth/vm
Diffstat (limited to 'mist')
-rw-r--r-- | mist/debugger.go | 16 | ||||
-rw-r--r-- | mist/flags.go | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/mist/debugger.go b/mist/debugger.go index 241635ebe..f364a487e 100644 --- a/mist/debugger.go +++ b/mist/debugger.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum/eth-go/ethchain" "github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethutil" - "github.com/ethereum/eth-go/ethvm" + "github.com/ethereum/eth-go/vm" "github.com/ethereum/go-ethereum/utils" "gopkg.in/qml.v1" ) @@ -20,7 +20,7 @@ type DebuggerWindow struct { engine *qml.Engine lib *UiLib - vm *ethvm.DebugVm + vm *vm.DebugVm Db *Debugger state *ethstate.State @@ -37,7 +37,7 @@ func NewDebuggerWindow(lib *UiLib) *DebuggerWindow { win := component.CreateWindow(nil) - w := &DebuggerWindow{engine: engine, win: win, lib: lib, vm: ðvm.DebugVm{}} + w := &DebuggerWindow{engine: engine, win: win, lib: lib, vm: &vm.DebugVm{}} w.Db = NewDebugger(w) return w @@ -133,9 +133,9 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data block := self.lib.eth.BlockChain().CurrentBlock - callerClosure := ethvm.NewClosure(ðstate.Message{}, account, contract, script, gas, gasPrice) + callerClosure := vm.NewClosure(ðstate.Message{}, account, contract, script, gas, gasPrice) env := utils.NewEnv(state, block, account.Address(), value) - vm := ethvm.NewDebugVm(env) + vm := vm.NewDebugVm(env) vm.Dbg = self.Db self.vm = vm @@ -250,13 +250,13 @@ type storeVal struct { Key, Value string } -func (self *Debugger) BreakHook(pc int, op ethvm.OpCode, mem *ethvm.Memory, stack *ethvm.Stack, stateObject *ethstate.StateObject) bool { +func (self *Debugger) BreakHook(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack, stateObject *ethstate.StateObject) bool { self.main.Logln("break on instr:", pc) return self.halting(pc, op, mem, stack, stateObject) } -func (self *Debugger) StepHook(pc int, op ethvm.OpCode, mem *ethvm.Memory, stack *ethvm.Stack, stateObject *ethstate.StateObject) bool { +func (self *Debugger) StepHook(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack, stateObject *ethstate.StateObject) bool { return self.halting(pc, op, mem, stack, stateObject) } @@ -268,7 +268,7 @@ func (self *Debugger) BreakPoints() []int64 { return self.breakPoints } -func (d *Debugger) halting(pc int, op ethvm.OpCode, mem *ethvm.Memory, stack *ethvm.Stack, stateObject *ethstate.StateObject) bool { +func (d *Debugger) halting(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack, stateObject *ethstate.StateObject) bool { d.win.Root().Call("setInstruction", pc) d.win.Root().Call("clearMem") d.win.Root().Call("clearStack") diff --git a/mist/flags.go b/mist/flags.go index 5cf34c740..68accf1bc 100644 --- a/mist/flags.go +++ b/mist/flags.go @@ -12,7 +12,7 @@ import ( "bitbucket.org/kardianos/osext" "github.com/ethereum/eth-go/ethlog" - "github.com/ethereum/eth-go/ethvm" + "github.com/ethereum/eth-go/vm" ) var ( @@ -106,7 +106,7 @@ func Init() { flag.Parse() - if VmType >= int(ethvm.MaxVmTy) { + if VmType >= int(vm.MaxVmTy) { log.Fatal("Invalid VM type ", VmType) } } |