diff options
author | obscuren <geffobscura@gmail.com> | 2014-06-18 06:36:23 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-06-18 06:36:23 +0800 |
commit | dc9c9369e0b44873dedfdf37195268f0e524872d (patch) | |
tree | 709499712306ec3c8242976aba17ea42f9261308 /ethchain/vm.go | |
parent | 2565a79575c6a6b839a6585c9ad3ebbcf7db9115 (diff) | |
download | go-tangerine-dc9c9369e0b44873dedfdf37195268f0e524872d.tar go-tangerine-dc9c9369e0b44873dedfdf37195268f0e524872d.tar.gz go-tangerine-dc9c9369e0b44873dedfdf37195268f0e524872d.tar.bz2 go-tangerine-dc9c9369e0b44873dedfdf37195268f0e524872d.tar.lz go-tangerine-dc9c9369e0b44873dedfdf37195268f0e524872d.tar.xz go-tangerine-dc9c9369e0b44873dedfdf37195268f0e524872d.tar.zst go-tangerine-dc9c9369e0b44873dedfdf37195268f0e524872d.zip |
log
Diffstat (limited to 'ethchain/vm.go')
-rw-r--r-- | ethchain/vm.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go index f83258430..b8ba72c7e 100644 --- a/ethchain/vm.go +++ b/ethchain/vm.go @@ -323,7 +323,8 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro case EQ: require(2) x, y := stack.Popn() - fmt.Printf("%x == %x\n", x, y) + vm.Printf(" %v == %v", y, x) + // x == y if x.Cmp(y) == 0 { stack.Push(ethutil.BigTrue) @@ -343,15 +344,21 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro case AND: require(2) x, y := stack.Popn() + vm.Printf(" %v & %v", y, x) + stack.Push(base.And(y, x)) case OR: require(2) x, y := stack.Popn() + vm.Printf(" %v | %v", y, x) + stack.Push(base.Or(y, x)) case XOR: require(2) x, y := stack.Popn() - stack.Push(base.Xor(x, y)) + vm.Printf(" %v ^ %v", y, x) + + stack.Push(base.Xor(y, x)) case BYTE: require(2) val, th := stack.Popn() |