diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-01-07 01:30:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-07 01:30:44 +0800 |
commit | ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632 (patch) | |
tree | 2b06aa1b360f1488264058d04e399e84b898f0d8 /core/vm | |
parent | 444fc892b0a860218dab3e421d92c33408b9eb6d (diff) | |
parent | 13e3b2f433c48fe81423c1a13e9a5194ece61b01 (diff) | |
download | go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.gz go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.bz2 go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.lz go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.xz go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.zst go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.zip |
Merge pull request #3525 from fjl/all-gosimple-cleanup
all: clean up lint issues, remove more dead code
Diffstat (limited to 'core/vm')
-rw-r--r-- | core/vm/jump_table.go | 260 |
1 files changed, 130 insertions, 130 deletions
diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go index eb85ae6af..f4ce81883 100644 --- a/core/vm/jump_table.go +++ b/core/vm/jump_table.go @@ -52,283 +52,283 @@ var defaultJumpTable = NewJumpTable() func NewJumpTable() [256]operation { return [256]operation{ - ADD: operation{ + ADD: { execute: opAdd, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - SUB: operation{ + SUB: { execute: opSub, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - MUL: operation{ + MUL: { execute: opMul, gasCost: constGasFunc(GasFastStep), validateStack: makeStackFunc(2, 1), valid: true, }, - DIV: operation{ + DIV: { execute: opDiv, gasCost: constGasFunc(GasFastStep), validateStack: makeStackFunc(2, 1), valid: true, }, - SDIV: operation{ + SDIV: { execute: opSdiv, gasCost: constGasFunc(GasFastStep), validateStack: makeStackFunc(2, 1), valid: true, }, - MOD: operation{ + MOD: { execute: opMod, gasCost: constGasFunc(GasFastStep), validateStack: makeStackFunc(2, 1), valid: true, }, - SMOD: operation{ + SMOD: { execute: opSmod, gasCost: constGasFunc(GasFastStep), validateStack: makeStackFunc(2, 1), valid: true, }, - EXP: operation{ + EXP: { execute: opExp, gasCost: gasExp, validateStack: makeStackFunc(2, 1), valid: true, }, - SIGNEXTEND: operation{ + SIGNEXTEND: { execute: opSignExtend, gasCost: constGasFunc(GasFastStep), validateStack: makeStackFunc(2, 1), valid: true, }, - NOT: operation{ + NOT: { execute: opNot, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(1, 1), valid: true, }, - LT: operation{ + LT: { execute: opLt, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - GT: operation{ + GT: { execute: opGt, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - SLT: operation{ + SLT: { execute: opSlt, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - SGT: operation{ + SGT: { execute: opSgt, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - EQ: operation{ + EQ: { execute: opEq, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - ISZERO: operation{ + ISZERO: { execute: opIszero, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(1, 1), valid: true, }, - AND: operation{ + AND: { execute: opAnd, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - OR: operation{ + OR: { execute: opOr, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - XOR: operation{ + XOR: { execute: opXor, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - BYTE: operation{ + BYTE: { execute: opByte, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(2, 1), valid: true, }, - ADDMOD: operation{ + ADDMOD: { execute: opAddmod, gasCost: constGasFunc(GasMidStep), validateStack: makeStackFunc(3, 1), valid: true, }, - MULMOD: operation{ + MULMOD: { execute: opMulmod, gasCost: constGasFunc(GasMidStep), validateStack: makeStackFunc(3, 1), valid: true, }, - SHA3: operation{ + SHA3: { execute: opSha3, gasCost: gasSha3, validateStack: makeStackFunc(2, 1), memorySize: memorySha3, valid: true, }, - ADDRESS: operation{ + ADDRESS: { execute: opAddress, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - BALANCE: operation{ + BALANCE: { execute: opBalance, gasCost: gasBalance, validateStack: makeStackFunc(0, 1), valid: true, }, - ORIGIN: operation{ + ORIGIN: { execute: opOrigin, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - CALLER: operation{ + CALLER: { execute: opCaller, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - CALLVALUE: operation{ + CALLVALUE: { execute: opCallValue, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - CALLDATALOAD: operation{ + CALLDATALOAD: { execute: opCalldataLoad, gasCost: constGasFunc(GasFastestStep), validateStack: makeStackFunc(1, 1), valid: true, }, - CALLDATASIZE: operation{ + CALLDATASIZE: { execute: opCalldataSize, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - CALLDATACOPY: operation{ + CALLDATACOPY: { execute: opCalldataCopy, gasCost: gasCalldataCopy, validateStack: makeStackFunc(3, 1), memorySize: memoryCalldataCopy, valid: true, }, - CODESIZE: operation{ + CODESIZE: { execute: opCodeSize, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - EXTCODESIZE: operation{ + EXTCODESIZE: { execute: opExtCodeSize, gasCost: gasExtCodeSize, validateStack: makeStackFunc(1, 1), valid: true, }, - CODECOPY: operation{ + CODECOPY: { execute: opCodeCopy, gasCost: gasCodeCopy, validateStack: makeStackFunc(3, 0), memorySize: memoryCodeCopy, valid: true, }, - EXTCODECOPY: operation{ + EXTCODECOPY: { execute: opExtCodeCopy, gasCost: gasExtCodeCopy, validateStack: makeStackFunc(4, 0), memorySize: memoryExtCodeCopy, valid: true, }, - GASPRICE: operation{ + GASPRICE: { execute: opGasprice, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - BLOCKHASH: operation{ + BLOCKHASH: { execute: opBlockhash, gasCost: constGasFunc(GasExtStep), validateStack: makeStackFunc(1, 1), valid: true, }, - COINBASE: operation{ + COINBASE: { execute: opCoinbase, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - TIMESTAMP: operation{ + TIMESTAMP: { execute: opTimestamp, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - NUMBER: operation{ + NUMBER: { execute: opNumber, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - DIFFICULTY: operation{ + DIFFICULTY: { execute: opDifficulty, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - GASLIMIT: operation{ + GASLIMIT: { execute: opGasLimit, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - POP: operation{ + POP: { execute: opPop, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(1, 0), valid: true, }, - MLOAD: operation{ + MLOAD: { execute: opMload, gasCost: gasMLoad, validateStack: makeStackFunc(1, 1), memorySize: memoryMLoad, valid: true, }, - MSTORE: operation{ + MSTORE: { execute: opMstore, gasCost: gasMStore, validateStack: makeStackFunc(2, 0), memorySize: memoryMStore, valid: true, }, - MSTORE8: operation{ + MSTORE8: { execute: opMstore8, gasCost: gasMStore8, memorySize: memoryMStore8, @@ -336,71 +336,71 @@ func NewJumpTable() [256]operation { valid: true, }, - SLOAD: operation{ + SLOAD: { execute: opSload, gasCost: gasSLoad, validateStack: makeStackFunc(1, 1), valid: true, }, - SSTORE: operation{ + SSTORE: { execute: opSstore, gasCost: gasSStore, validateStack: makeStackFunc(2, 0), valid: true, }, - JUMPDEST: operation{ + JUMPDEST: { execute: opJumpdest, gasCost: constGasFunc(params.JumpdestGas), validateStack: makeStackFunc(0, 0), valid: true, }, - PC: operation{ + PC: { execute: opPc, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - MSIZE: operation{ + MSIZE: { execute: opMsize, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - GAS: operation{ + GAS: { execute: opGas, gasCost: constGasFunc(GasQuickStep), validateStack: makeStackFunc(0, 1), valid: true, }, - CREATE: operation{ + CREATE: { execute: opCreate, gasCost: gasCreate, validateStack: makeStackFunc(3, 1), memorySize: memoryCreate, valid: true, }, - CALL: operation{ + CALL: { execute: opCall, gasCost: gasCall, validateStack: makeStackFunc(7, 1), memorySize: memoryCall, valid: true, }, - CALLCODE: operation{ + CALLCODE: { execute: opCallCode, gasCost: gasCallCode, validateStack: makeStackFunc(7, 1), memorySize: memoryCall, valid: true, }, - DELEGATECALL: operation{ + DELEGATECALL: { execute: opDelegateCall, gasCost: gasDelegateCall, validateStack: makeStackFunc(6, 1), memorySize: memoryDelegateCall, valid: true, }, - RETURN: operation{ + RETURN: { execute: opReturn, gasCost: gasReturn, validateStack: makeStackFunc(2, 0), @@ -408,448 +408,448 @@ func NewJumpTable() [256]operation { halts: true, valid: true, }, - SUICIDE: operation{ + SUICIDE: { execute: opSuicide, gasCost: gasSuicide, validateStack: makeStackFunc(1, 0), halts: true, valid: true, }, - JUMP: operation{ + JUMP: { execute: opJump, gasCost: constGasFunc(GasMidStep), validateStack: makeStackFunc(1, 0), jumps: true, valid: true, }, - JUMPI: operation{ + JUMPI: { execute: opJumpi, gasCost: constGasFunc(GasSlowStep), validateStack: makeStackFunc(2, 0), jumps: true, valid: true, }, - STOP: operation{ + STOP: { execute: opStop, gasCost: constGasFunc(Zero), validateStack: makeStackFunc(0, 0), halts: true, valid: true, }, - LOG0: operation{ + LOG0: { execute: makeLog(0), gasCost: makeGasLog(0), validateStack: makeStackFunc(2, 0), memorySize: memoryLog, valid: true, }, - LOG1: operation{ + LOG1: { execute: makeLog(1), gasCost: makeGasLog(1), validateStack: makeStackFunc(3, 0), memorySize: memoryLog, valid: true, }, - LOG2: operation{ + LOG2: { execute: makeLog(2), gasCost: makeGasLog(2), validateStack: makeStackFunc(4, 0), memorySize: memoryLog, valid: true, }, - LOG3: operation{ + LOG3: { execute: makeLog(3), gasCost: makeGasLog(3), validateStack: makeStackFunc(5, 0), memorySize: memoryLog, valid: true, }, - LOG4: operation{ + LOG4: { execute: makeLog(4), gasCost: makeGasLog(4), validateStack: makeStackFunc(6, 0), memorySize: memoryLog, valid: true, }, - SWAP1: operation{ + SWAP1: { execute: makeSwap(1), gasCost: gasSwap, validateStack: makeStackFunc(2, 0), valid: true, }, - SWAP2: operation{ + SWAP2: { execute: makeSwap(2), gasCost: gasSwap, validateStack: makeStackFunc(3, 0), valid: true, }, - SWAP3: operation{ + SWAP3: { execute: makeSwap(3), gasCost: gasSwap, validateStack: makeStackFunc(4, 0), valid: true, }, - SWAP4: operation{ + SWAP4: { execute: makeSwap(4), gasCost: gasSwap, validateStack: makeStackFunc(5, 0), valid: true, }, - SWAP5: operation{ + SWAP5: { execute: makeSwap(5), gasCost: gasSwap, validateStack: makeStackFunc(6, 0), valid: true, }, - SWAP6: operation{ + SWAP6: { execute: makeSwap(6), gasCost: gasSwap, validateStack: makeStackFunc(7, 0), valid: true, }, - SWAP7: operation{ + SWAP7: { execute: makeSwap(7), gasCost: gasSwap, validateStack: makeStackFunc(8, 0), valid: true, }, - SWAP8: operation{ + SWAP8: { execute: makeSwap(8), gasCost: gasSwap, validateStack: makeStackFunc(9, 0), valid: true, }, - SWAP9: operation{ + SWAP9: { execute: makeSwap(9), gasCost: gasSwap, validateStack: makeStackFunc(10, 0), valid: true, }, - SWAP10: operation{ + SWAP10: { execute: makeSwap(10), gasCost: gasSwap, validateStack: makeStackFunc(11, 0), valid: true, }, - SWAP11: operation{ + SWAP11: { execute: makeSwap(11), gasCost: gasSwap, validateStack: makeStackFunc(12, 0), valid: true, }, - SWAP12: operation{ + SWAP12: { execute: makeSwap(12), gasCost: gasSwap, validateStack: makeStackFunc(13, 0), valid: true, }, - SWAP13: operation{ + SWAP13: { execute: makeSwap(13), gasCost: gasSwap, validateStack: makeStackFunc(14, 0), valid: true, }, - SWAP14: operation{ + SWAP14: { execute: makeSwap(14), gasCost: gasSwap, validateStack: makeStackFunc(15, 0), valid: true, }, - SWAP15: operation{ + SWAP15: { execute: makeSwap(15), gasCost: gasSwap, validateStack: makeStackFunc(16, 0), valid: true, }, - SWAP16: operation{ + SWAP16: { execute: makeSwap(16), gasCost: gasSwap, validateStack: makeStackFunc(17, 0), valid: true, }, - PUSH1: operation{ + PUSH1: { execute: makePush(1, big.NewInt(1)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH2: operation{ + PUSH2: { execute: makePush(2, big.NewInt(2)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH3: operation{ + PUSH3: { execute: makePush(3, big.NewInt(3)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH4: operation{ + PUSH4: { execute: makePush(4, big.NewInt(4)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH5: operation{ + PUSH5: { execute: makePush(5, big.NewInt(5)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH6: operation{ + PUSH6: { execute: makePush(6, big.NewInt(6)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH7: operation{ + PUSH7: { execute: makePush(7, big.NewInt(7)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH8: operation{ + PUSH8: { execute: makePush(8, big.NewInt(8)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH9: operation{ + PUSH9: { execute: makePush(9, big.NewInt(9)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH10: operation{ + PUSH10: { execute: makePush(10, big.NewInt(10)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH11: operation{ + PUSH11: { execute: makePush(11, big.NewInt(11)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH12: operation{ + PUSH12: { execute: makePush(12, big.NewInt(12)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH13: operation{ + PUSH13: { execute: makePush(13, big.NewInt(13)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH14: operation{ + PUSH14: { execute: makePush(14, big.NewInt(14)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH15: operation{ + PUSH15: { execute: makePush(15, big.NewInt(15)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH16: operation{ + PUSH16: { execute: makePush(16, big.NewInt(16)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH17: operation{ + PUSH17: { execute: makePush(17, big.NewInt(17)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH18: operation{ + PUSH18: { execute: makePush(18, big.NewInt(18)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH19: operation{ + PUSH19: { execute: makePush(19, big.NewInt(19)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH20: operation{ + PUSH20: { execute: makePush(20, big.NewInt(20)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH21: operation{ + PUSH21: { execute: makePush(21, big.NewInt(21)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH22: operation{ + PUSH22: { execute: makePush(22, big.NewInt(22)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH23: operation{ + PUSH23: { execute: makePush(23, big.NewInt(23)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH24: operation{ + PUSH24: { execute: makePush(24, big.NewInt(24)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH25: operation{ + PUSH25: { execute: makePush(25, big.NewInt(25)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH26: operation{ + PUSH26: { execute: makePush(26, big.NewInt(26)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH27: operation{ + PUSH27: { execute: makePush(27, big.NewInt(27)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH28: operation{ + PUSH28: { execute: makePush(28, big.NewInt(28)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH29: operation{ + PUSH29: { execute: makePush(29, big.NewInt(29)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH30: operation{ + PUSH30: { execute: makePush(30, big.NewInt(30)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH31: operation{ + PUSH31: { execute: makePush(31, big.NewInt(31)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - PUSH32: operation{ + PUSH32: { execute: makePush(32, big.NewInt(32)), gasCost: gasPush, validateStack: makeStackFunc(0, 1), valid: true, }, - DUP1: operation{ + DUP1: { execute: makeDup(1), gasCost: gasDup, validateStack: makeStackFunc(1, 1), valid: true, }, - DUP2: operation{ + DUP2: { execute: makeDup(2), gasCost: gasDup, validateStack: makeStackFunc(2, 1), valid: true, }, - DUP3: operation{ + DUP3: { execute: makeDup(3), gasCost: gasDup, validateStack: makeStackFunc(3, 1), valid: true, }, - DUP4: operation{ + DUP4: { execute: makeDup(4), gasCost: gasDup, validateStack: makeStackFunc(4, 1), valid: true, }, - DUP5: operation{ + DUP5: { execute: makeDup(5), gasCost: gasDup, validateStack: makeStackFunc(5, 1), valid: true, }, - DUP6: operation{ + DUP6: { execute: makeDup(6), gasCost: gasDup, validateStack: makeStackFunc(6, 1), valid: true, }, - DUP7: operation{ + DUP7: { execute: makeDup(7), gasCost: gasDup, validateStack: makeStackFunc(7, 1), valid: true, }, - DUP8: operation{ + DUP8: { execute: makeDup(8), gasCost: gasDup, validateStack: makeStackFunc(8, 1), valid: true, }, - DUP9: operation{ + DUP9: { execute: makeDup(9), gasCost: gasDup, validateStack: makeStackFunc(9, 1), valid: true, }, - DUP10: operation{ + DUP10: { execute: makeDup(10), gasCost: gasDup, validateStack: makeStackFunc(10, 1), valid: true, }, - DUP11: operation{ + DUP11: { execute: makeDup(11), gasCost: gasDup, validateStack: makeStackFunc(11, 1), valid: true, }, - DUP12: operation{ + DUP12: { execute: makeDup(12), gasCost: gasDup, validateStack: makeStackFunc(12, 1), valid: true, }, - DUP13: operation{ + DUP13: { execute: makeDup(13), gasCost: gasDup, validateStack: makeStackFunc(13, 1), valid: true, }, - DUP14: operation{ + DUP14: { execute: makeDup(14), gasCost: gasDup, validateStack: makeStackFunc(14, 1), valid: true, }, - DUP15: operation{ + DUP15: { execute: makeDup(15), gasCost: gasDup, validateStack: makeStackFunc(15, 1), valid: true, }, - DUP16: operation{ + DUP16: { execute: makeDup(16), gasCost: gasDup, validateStack: makeStackFunc(16, 1), |