From d03ab3c97652d61a9f179215f31e107c91bd6058 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 21 Aug 2014 20:25:02 +0200 Subject: [PATCH] invalidated SWAP/DUP --- ethvm/types.go | 12 ++++++------ ethvm/vm.go | 4 ---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ethvm/types.go b/ethvm/types.go index 98fd8fba0..36ba395d6 100644 --- a/ethvm/types.go +++ b/ethvm/types.go @@ -59,9 +59,9 @@ const ( GASLIMIT = 0x45 // 0x50 range - 'storage' and execution - POP = 0x50 - DUP = 0x51 - SWAP = 0x52 + POP = 0x50 + //DUP = 0x51 + //SWAP = 0x52 MLOAD = 0x53 MSTORE = 0x54 MSTORE8 = 0x55 @@ -204,9 +204,9 @@ var opCodeToString = map[OpCode]string{ GASLIMIT: "GASLIMIT", // 0x50 range - 'storage' and execution - POP: "POP", - DUP: "DUP", - SWAP: "SWAP", + POP: "POP", + //DUP: "DUP", + //SWAP: "SWAP", MLOAD: "MLOAD", MSTORE: "MSTORE", MSTORE8: "MSTORE8", diff --git a/ethvm/vm.go b/ethvm/vm.go index 29dc2515c..873a80c44 100644 --- a/ethvm/vm.go +++ b/ethvm/vm.go @@ -640,10 +640,6 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) { x, y := stack.Swapn(n) self.Printf(" => [%d] %x [0] %x", n, x.Bytes(), y.Bytes()) - case DUP: - // NOP - case SWAP: - // NOP case MLOAD: require(1) offset := stack.Pop()