github.com/murrekatt/go-ethereum@v1.5.8-0.20170123175102-fc52f2c007fb/core/vm/jump_table.go (about) 1 // Copyright 2015 The go-ethereum Authors 2 // This file is part of the go-ethereum library. 3 // 4 // The go-ethereum library is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Lesser General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // The go-ethereum library is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Lesser General Public License for more details. 13 // 14 // You should have received a copy of the GNU Lesser General Public License 15 // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. 16 17 package vm 18 19 import ( 20 "math/big" 21 22 "github.com/ethereum/go-ethereum/params" 23 ) 24 25 type ( 26 executionFunc func(pc *uint64, env *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) 27 gasFunc func(params.GasTable, *EVM, *Contract, *Stack, *Memory, *big.Int) *big.Int 28 stackValidationFunc func(*Stack) error 29 memorySizeFunc func(*Stack) *big.Int 30 ) 31 32 type operation struct { 33 // op is the operation function 34 execute executionFunc 35 // gasCost is the gas function and returns the gas required for execution 36 gasCost gasFunc 37 // validateStack validates the stack (size) for the operation 38 validateStack stackValidationFunc 39 // memorySize returns the memory size required for the operation 40 memorySize memorySizeFunc 41 // halts indicates whether the operation shoult halt further execution 42 // and return 43 halts bool 44 // jumps indicates whether operation made a jump. This prevents the program 45 // counter from further incrementing. 46 jumps bool 47 // valid is used to check whether the retrieved operation is valid and known 48 valid bool 49 } 50 51 var defaultJumpTable = NewJumpTable() 52 53 func NewJumpTable() [256]operation { 54 return [256]operation{ 55 ADD: { 56 execute: opAdd, 57 gasCost: constGasFunc(GasFastestStep), 58 validateStack: makeStackFunc(2, 1), 59 valid: true, 60 }, 61 SUB: { 62 execute: opSub, 63 gasCost: constGasFunc(GasFastestStep), 64 validateStack: makeStackFunc(2, 1), 65 valid: true, 66 }, 67 MUL: { 68 execute: opMul, 69 gasCost: constGasFunc(GasFastStep), 70 validateStack: makeStackFunc(2, 1), 71 valid: true, 72 }, 73 DIV: { 74 execute: opDiv, 75 gasCost: constGasFunc(GasFastStep), 76 validateStack: makeStackFunc(2, 1), 77 valid: true, 78 }, 79 SDIV: { 80 execute: opSdiv, 81 gasCost: constGasFunc(GasFastStep), 82 validateStack: makeStackFunc(2, 1), 83 valid: true, 84 }, 85 MOD: { 86 execute: opMod, 87 gasCost: constGasFunc(GasFastStep), 88 validateStack: makeStackFunc(2, 1), 89 valid: true, 90 }, 91 SMOD: { 92 execute: opSmod, 93 gasCost: constGasFunc(GasFastStep), 94 validateStack: makeStackFunc(2, 1), 95 valid: true, 96 }, 97 EXP: { 98 execute: opExp, 99 gasCost: gasExp, 100 validateStack: makeStackFunc(2, 1), 101 valid: true, 102 }, 103 SIGNEXTEND: { 104 execute: opSignExtend, 105 gasCost: constGasFunc(GasFastStep), 106 validateStack: makeStackFunc(2, 1), 107 valid: true, 108 }, 109 NOT: { 110 execute: opNot, 111 gasCost: constGasFunc(GasFastestStep), 112 validateStack: makeStackFunc(1, 1), 113 valid: true, 114 }, 115 LT: { 116 execute: opLt, 117 gasCost: constGasFunc(GasFastestStep), 118 validateStack: makeStackFunc(2, 1), 119 valid: true, 120 }, 121 GT: { 122 execute: opGt, 123 gasCost: constGasFunc(GasFastestStep), 124 validateStack: makeStackFunc(2, 1), 125 valid: true, 126 }, 127 SLT: { 128 execute: opSlt, 129 gasCost: constGasFunc(GasFastestStep), 130 validateStack: makeStackFunc(2, 1), 131 valid: true, 132 }, 133 SGT: { 134 execute: opSgt, 135 gasCost: constGasFunc(GasFastestStep), 136 validateStack: makeStackFunc(2, 1), 137 valid: true, 138 }, 139 EQ: { 140 execute: opEq, 141 gasCost: constGasFunc(GasFastestStep), 142 validateStack: makeStackFunc(2, 1), 143 valid: true, 144 }, 145 ISZERO: { 146 execute: opIszero, 147 gasCost: constGasFunc(GasFastestStep), 148 validateStack: makeStackFunc(1, 1), 149 valid: true, 150 }, 151 AND: { 152 execute: opAnd, 153 gasCost: constGasFunc(GasFastestStep), 154 validateStack: makeStackFunc(2, 1), 155 valid: true, 156 }, 157 OR: { 158 execute: opOr, 159 gasCost: constGasFunc(GasFastestStep), 160 validateStack: makeStackFunc(2, 1), 161 valid: true, 162 }, 163 XOR: { 164 execute: opXor, 165 gasCost: constGasFunc(GasFastestStep), 166 validateStack: makeStackFunc(2, 1), 167 valid: true, 168 }, 169 BYTE: { 170 execute: opByte, 171 gasCost: constGasFunc(GasFastestStep), 172 validateStack: makeStackFunc(2, 1), 173 valid: true, 174 }, 175 ADDMOD: { 176 execute: opAddmod, 177 gasCost: constGasFunc(GasMidStep), 178 validateStack: makeStackFunc(3, 1), 179 valid: true, 180 }, 181 MULMOD: { 182 execute: opMulmod, 183 gasCost: constGasFunc(GasMidStep), 184 validateStack: makeStackFunc(3, 1), 185 valid: true, 186 }, 187 SHA3: { 188 execute: opSha3, 189 gasCost: gasSha3, 190 validateStack: makeStackFunc(2, 1), 191 memorySize: memorySha3, 192 valid: true, 193 }, 194 ADDRESS: { 195 execute: opAddress, 196 gasCost: constGasFunc(GasQuickStep), 197 validateStack: makeStackFunc(0, 1), 198 valid: true, 199 }, 200 BALANCE: { 201 execute: opBalance, 202 gasCost: gasBalance, 203 validateStack: makeStackFunc(0, 1), 204 valid: true, 205 }, 206 ORIGIN: { 207 execute: opOrigin, 208 gasCost: constGasFunc(GasQuickStep), 209 validateStack: makeStackFunc(0, 1), 210 valid: true, 211 }, 212 CALLER: { 213 execute: opCaller, 214 gasCost: constGasFunc(GasQuickStep), 215 validateStack: makeStackFunc(0, 1), 216 valid: true, 217 }, 218 CALLVALUE: { 219 execute: opCallValue, 220 gasCost: constGasFunc(GasQuickStep), 221 validateStack: makeStackFunc(0, 1), 222 valid: true, 223 }, 224 CALLDATALOAD: { 225 execute: opCalldataLoad, 226 gasCost: constGasFunc(GasFastestStep), 227 validateStack: makeStackFunc(1, 1), 228 valid: true, 229 }, 230 CALLDATASIZE: { 231 execute: opCalldataSize, 232 gasCost: constGasFunc(GasQuickStep), 233 validateStack: makeStackFunc(0, 1), 234 valid: true, 235 }, 236 CALLDATACOPY: { 237 execute: opCalldataCopy, 238 gasCost: gasCalldataCopy, 239 validateStack: makeStackFunc(3, 1), 240 memorySize: memoryCalldataCopy, 241 valid: true, 242 }, 243 CODESIZE: { 244 execute: opCodeSize, 245 gasCost: constGasFunc(GasQuickStep), 246 validateStack: makeStackFunc(0, 1), 247 valid: true, 248 }, 249 EXTCODESIZE: { 250 execute: opExtCodeSize, 251 gasCost: gasExtCodeSize, 252 validateStack: makeStackFunc(1, 1), 253 valid: true, 254 }, 255 CODECOPY: { 256 execute: opCodeCopy, 257 gasCost: gasCodeCopy, 258 validateStack: makeStackFunc(3, 0), 259 memorySize: memoryCodeCopy, 260 valid: true, 261 }, 262 EXTCODECOPY: { 263 execute: opExtCodeCopy, 264 gasCost: gasExtCodeCopy, 265 validateStack: makeStackFunc(4, 0), 266 memorySize: memoryExtCodeCopy, 267 valid: true, 268 }, 269 GASPRICE: { 270 execute: opGasprice, 271 gasCost: constGasFunc(GasQuickStep), 272 validateStack: makeStackFunc(0, 1), 273 valid: true, 274 }, 275 BLOCKHASH: { 276 execute: opBlockhash, 277 gasCost: constGasFunc(GasExtStep), 278 validateStack: makeStackFunc(1, 1), 279 valid: true, 280 }, 281 COINBASE: { 282 execute: opCoinbase, 283 gasCost: constGasFunc(GasQuickStep), 284 validateStack: makeStackFunc(0, 1), 285 valid: true, 286 }, 287 TIMESTAMP: { 288 execute: opTimestamp, 289 gasCost: constGasFunc(GasQuickStep), 290 validateStack: makeStackFunc(0, 1), 291 valid: true, 292 }, 293 NUMBER: { 294 execute: opNumber, 295 gasCost: constGasFunc(GasQuickStep), 296 validateStack: makeStackFunc(0, 1), 297 valid: true, 298 }, 299 DIFFICULTY: { 300 execute: opDifficulty, 301 gasCost: constGasFunc(GasQuickStep), 302 validateStack: makeStackFunc(0, 1), 303 valid: true, 304 }, 305 GASLIMIT: { 306 execute: opGasLimit, 307 gasCost: constGasFunc(GasQuickStep), 308 validateStack: makeStackFunc(0, 1), 309 valid: true, 310 }, 311 POP: { 312 execute: opPop, 313 gasCost: constGasFunc(GasQuickStep), 314 validateStack: makeStackFunc(1, 0), 315 valid: true, 316 }, 317 MLOAD: { 318 execute: opMload, 319 gasCost: gasMLoad, 320 validateStack: makeStackFunc(1, 1), 321 memorySize: memoryMLoad, 322 valid: true, 323 }, 324 MSTORE: { 325 execute: opMstore, 326 gasCost: gasMStore, 327 validateStack: makeStackFunc(2, 0), 328 memorySize: memoryMStore, 329 valid: true, 330 }, 331 MSTORE8: { 332 execute: opMstore8, 333 gasCost: gasMStore8, 334 memorySize: memoryMStore8, 335 validateStack: makeStackFunc(2, 0), 336 337 valid: true, 338 }, 339 SLOAD: { 340 execute: opSload, 341 gasCost: gasSLoad, 342 validateStack: makeStackFunc(1, 1), 343 valid: true, 344 }, 345 SSTORE: { 346 execute: opSstore, 347 gasCost: gasSStore, 348 validateStack: makeStackFunc(2, 0), 349 valid: true, 350 }, 351 JUMPDEST: { 352 execute: opJumpdest, 353 gasCost: constGasFunc(params.JumpdestGas), 354 validateStack: makeStackFunc(0, 0), 355 valid: true, 356 }, 357 PC: { 358 execute: opPc, 359 gasCost: constGasFunc(GasQuickStep), 360 validateStack: makeStackFunc(0, 1), 361 valid: true, 362 }, 363 MSIZE: { 364 execute: opMsize, 365 gasCost: constGasFunc(GasQuickStep), 366 validateStack: makeStackFunc(0, 1), 367 valid: true, 368 }, 369 GAS: { 370 execute: opGas, 371 gasCost: constGasFunc(GasQuickStep), 372 validateStack: makeStackFunc(0, 1), 373 valid: true, 374 }, 375 CREATE: { 376 execute: opCreate, 377 gasCost: gasCreate, 378 validateStack: makeStackFunc(3, 1), 379 memorySize: memoryCreate, 380 valid: true, 381 }, 382 CALL: { 383 execute: opCall, 384 gasCost: gasCall, 385 validateStack: makeStackFunc(7, 1), 386 memorySize: memoryCall, 387 valid: true, 388 }, 389 CALLCODE: { 390 execute: opCallCode, 391 gasCost: gasCallCode, 392 validateStack: makeStackFunc(7, 1), 393 memorySize: memoryCall, 394 valid: true, 395 }, 396 DELEGATECALL: { 397 execute: opDelegateCall, 398 gasCost: gasDelegateCall, 399 validateStack: makeStackFunc(6, 1), 400 memorySize: memoryDelegateCall, 401 valid: true, 402 }, 403 RETURN: { 404 execute: opReturn, 405 gasCost: gasReturn, 406 validateStack: makeStackFunc(2, 0), 407 memorySize: memoryReturn, 408 halts: true, 409 valid: true, 410 }, 411 SUICIDE: { 412 execute: opSuicide, 413 gasCost: gasSuicide, 414 validateStack: makeStackFunc(1, 0), 415 halts: true, 416 valid: true, 417 }, 418 JUMP: { 419 execute: opJump, 420 gasCost: constGasFunc(GasMidStep), 421 validateStack: makeStackFunc(1, 0), 422 jumps: true, 423 valid: true, 424 }, 425 JUMPI: { 426 execute: opJumpi, 427 gasCost: constGasFunc(GasSlowStep), 428 validateStack: makeStackFunc(2, 0), 429 jumps: true, 430 valid: true, 431 }, 432 STOP: { 433 execute: opStop, 434 gasCost: constGasFunc(Zero), 435 validateStack: makeStackFunc(0, 0), 436 halts: true, 437 valid: true, 438 }, 439 LOG0: { 440 execute: makeLog(0), 441 gasCost: makeGasLog(0), 442 validateStack: makeStackFunc(2, 0), 443 memorySize: memoryLog, 444 valid: true, 445 }, 446 LOG1: { 447 execute: makeLog(1), 448 gasCost: makeGasLog(1), 449 validateStack: makeStackFunc(3, 0), 450 memorySize: memoryLog, 451 valid: true, 452 }, 453 LOG2: { 454 execute: makeLog(2), 455 gasCost: makeGasLog(2), 456 validateStack: makeStackFunc(4, 0), 457 memorySize: memoryLog, 458 valid: true, 459 }, 460 LOG3: { 461 execute: makeLog(3), 462 gasCost: makeGasLog(3), 463 validateStack: makeStackFunc(5, 0), 464 memorySize: memoryLog, 465 valid: true, 466 }, 467 LOG4: { 468 execute: makeLog(4), 469 gasCost: makeGasLog(4), 470 validateStack: makeStackFunc(6, 0), 471 memorySize: memoryLog, 472 valid: true, 473 }, 474 SWAP1: { 475 execute: makeSwap(1), 476 gasCost: gasSwap, 477 validateStack: makeStackFunc(2, 0), 478 valid: true, 479 }, 480 SWAP2: { 481 execute: makeSwap(2), 482 gasCost: gasSwap, 483 validateStack: makeStackFunc(3, 0), 484 valid: true, 485 }, 486 SWAP3: { 487 execute: makeSwap(3), 488 gasCost: gasSwap, 489 validateStack: makeStackFunc(4, 0), 490 valid: true, 491 }, 492 SWAP4: { 493 execute: makeSwap(4), 494 gasCost: gasSwap, 495 validateStack: makeStackFunc(5, 0), 496 valid: true, 497 }, 498 SWAP5: { 499 execute: makeSwap(5), 500 gasCost: gasSwap, 501 validateStack: makeStackFunc(6, 0), 502 valid: true, 503 }, 504 SWAP6: { 505 execute: makeSwap(6), 506 gasCost: gasSwap, 507 validateStack: makeStackFunc(7, 0), 508 valid: true, 509 }, 510 SWAP7: { 511 execute: makeSwap(7), 512 gasCost: gasSwap, 513 validateStack: makeStackFunc(8, 0), 514 valid: true, 515 }, 516 SWAP8: { 517 execute: makeSwap(8), 518 gasCost: gasSwap, 519 validateStack: makeStackFunc(9, 0), 520 valid: true, 521 }, 522 SWAP9: { 523 execute: makeSwap(9), 524 gasCost: gasSwap, 525 validateStack: makeStackFunc(10, 0), 526 valid: true, 527 }, 528 SWAP10: { 529 execute: makeSwap(10), 530 gasCost: gasSwap, 531 validateStack: makeStackFunc(11, 0), 532 valid: true, 533 }, 534 SWAP11: { 535 execute: makeSwap(11), 536 gasCost: gasSwap, 537 validateStack: makeStackFunc(12, 0), 538 valid: true, 539 }, 540 SWAP12: { 541 execute: makeSwap(12), 542 gasCost: gasSwap, 543 validateStack: makeStackFunc(13, 0), 544 valid: true, 545 }, 546 SWAP13: { 547 execute: makeSwap(13), 548 gasCost: gasSwap, 549 validateStack: makeStackFunc(14, 0), 550 valid: true, 551 }, 552 SWAP14: { 553 execute: makeSwap(14), 554 gasCost: gasSwap, 555 validateStack: makeStackFunc(15, 0), 556 valid: true, 557 }, 558 SWAP15: { 559 execute: makeSwap(15), 560 gasCost: gasSwap, 561 validateStack: makeStackFunc(16, 0), 562 valid: true, 563 }, 564 SWAP16: { 565 execute: makeSwap(16), 566 gasCost: gasSwap, 567 validateStack: makeStackFunc(17, 0), 568 valid: true, 569 }, 570 PUSH1: { 571 execute: makePush(1, big.NewInt(1)), 572 gasCost: gasPush, 573 validateStack: makeStackFunc(0, 1), 574 valid: true, 575 }, 576 PUSH2: { 577 execute: makePush(2, big.NewInt(2)), 578 gasCost: gasPush, 579 validateStack: makeStackFunc(0, 1), 580 valid: true, 581 }, 582 PUSH3: { 583 execute: makePush(3, big.NewInt(3)), 584 gasCost: gasPush, 585 validateStack: makeStackFunc(0, 1), 586 valid: true, 587 }, 588 PUSH4: { 589 execute: makePush(4, big.NewInt(4)), 590 gasCost: gasPush, 591 validateStack: makeStackFunc(0, 1), 592 valid: true, 593 }, 594 PUSH5: { 595 execute: makePush(5, big.NewInt(5)), 596 gasCost: gasPush, 597 validateStack: makeStackFunc(0, 1), 598 valid: true, 599 }, 600 PUSH6: { 601 execute: makePush(6, big.NewInt(6)), 602 gasCost: gasPush, 603 validateStack: makeStackFunc(0, 1), 604 valid: true, 605 }, 606 PUSH7: { 607 execute: makePush(7, big.NewInt(7)), 608 gasCost: gasPush, 609 validateStack: makeStackFunc(0, 1), 610 valid: true, 611 }, 612 PUSH8: { 613 execute: makePush(8, big.NewInt(8)), 614 gasCost: gasPush, 615 validateStack: makeStackFunc(0, 1), 616 valid: true, 617 }, 618 PUSH9: { 619 execute: makePush(9, big.NewInt(9)), 620 gasCost: gasPush, 621 validateStack: makeStackFunc(0, 1), 622 valid: true, 623 }, 624 PUSH10: { 625 execute: makePush(10, big.NewInt(10)), 626 gasCost: gasPush, 627 validateStack: makeStackFunc(0, 1), 628 valid: true, 629 }, 630 PUSH11: { 631 execute: makePush(11, big.NewInt(11)), 632 gasCost: gasPush, 633 validateStack: makeStackFunc(0, 1), 634 valid: true, 635 }, 636 PUSH12: { 637 execute: makePush(12, big.NewInt(12)), 638 gasCost: gasPush, 639 validateStack: makeStackFunc(0, 1), 640 valid: true, 641 }, 642 PUSH13: { 643 execute: makePush(13, big.NewInt(13)), 644 gasCost: gasPush, 645 validateStack: makeStackFunc(0, 1), 646 valid: true, 647 }, 648 PUSH14: { 649 execute: makePush(14, big.NewInt(14)), 650 gasCost: gasPush, 651 validateStack: makeStackFunc(0, 1), 652 valid: true, 653 }, 654 PUSH15: { 655 execute: makePush(15, big.NewInt(15)), 656 gasCost: gasPush, 657 validateStack: makeStackFunc(0, 1), 658 valid: true, 659 }, 660 PUSH16: { 661 execute: makePush(16, big.NewInt(16)), 662 gasCost: gasPush, 663 validateStack: makeStackFunc(0, 1), 664 valid: true, 665 }, 666 PUSH17: { 667 execute: makePush(17, big.NewInt(17)), 668 gasCost: gasPush, 669 validateStack: makeStackFunc(0, 1), 670 valid: true, 671 }, 672 PUSH18: { 673 execute: makePush(18, big.NewInt(18)), 674 gasCost: gasPush, 675 validateStack: makeStackFunc(0, 1), 676 valid: true, 677 }, 678 PUSH19: { 679 execute: makePush(19, big.NewInt(19)), 680 gasCost: gasPush, 681 validateStack: makeStackFunc(0, 1), 682 valid: true, 683 }, 684 PUSH20: { 685 execute: makePush(20, big.NewInt(20)), 686 gasCost: gasPush, 687 validateStack: makeStackFunc(0, 1), 688 valid: true, 689 }, 690 PUSH21: { 691 execute: makePush(21, big.NewInt(21)), 692 gasCost: gasPush, 693 validateStack: makeStackFunc(0, 1), 694 valid: true, 695 }, 696 PUSH22: { 697 execute: makePush(22, big.NewInt(22)), 698 gasCost: gasPush, 699 validateStack: makeStackFunc(0, 1), 700 valid: true, 701 }, 702 PUSH23: { 703 execute: makePush(23, big.NewInt(23)), 704 gasCost: gasPush, 705 validateStack: makeStackFunc(0, 1), 706 valid: true, 707 }, 708 PUSH24: { 709 execute: makePush(24, big.NewInt(24)), 710 gasCost: gasPush, 711 validateStack: makeStackFunc(0, 1), 712 valid: true, 713 }, 714 PUSH25: { 715 execute: makePush(25, big.NewInt(25)), 716 gasCost: gasPush, 717 validateStack: makeStackFunc(0, 1), 718 valid: true, 719 }, 720 PUSH26: { 721 execute: makePush(26, big.NewInt(26)), 722 gasCost: gasPush, 723 validateStack: makeStackFunc(0, 1), 724 valid: true, 725 }, 726 PUSH27: { 727 execute: makePush(27, big.NewInt(27)), 728 gasCost: gasPush, 729 validateStack: makeStackFunc(0, 1), 730 valid: true, 731 }, 732 PUSH28: { 733 execute: makePush(28, big.NewInt(28)), 734 gasCost: gasPush, 735 validateStack: makeStackFunc(0, 1), 736 valid: true, 737 }, 738 PUSH29: { 739 execute: makePush(29, big.NewInt(29)), 740 gasCost: gasPush, 741 validateStack: makeStackFunc(0, 1), 742 valid: true, 743 }, 744 PUSH30: { 745 execute: makePush(30, big.NewInt(30)), 746 gasCost: gasPush, 747 validateStack: makeStackFunc(0, 1), 748 valid: true, 749 }, 750 PUSH31: { 751 execute: makePush(31, big.NewInt(31)), 752 gasCost: gasPush, 753 validateStack: makeStackFunc(0, 1), 754 valid: true, 755 }, 756 PUSH32: { 757 execute: makePush(32, big.NewInt(32)), 758 gasCost: gasPush, 759 validateStack: makeStackFunc(0, 1), 760 valid: true, 761 }, 762 DUP1: { 763 execute: makeDup(1), 764 gasCost: gasDup, 765 validateStack: makeStackFunc(1, 1), 766 valid: true, 767 }, 768 DUP2: { 769 execute: makeDup(2), 770 gasCost: gasDup, 771 validateStack: makeStackFunc(2, 1), 772 valid: true, 773 }, 774 DUP3: { 775 execute: makeDup(3), 776 gasCost: gasDup, 777 validateStack: makeStackFunc(3, 1), 778 valid: true, 779 }, 780 DUP4: { 781 execute: makeDup(4), 782 gasCost: gasDup, 783 validateStack: makeStackFunc(4, 1), 784 valid: true, 785 }, 786 DUP5: { 787 execute: makeDup(5), 788 gasCost: gasDup, 789 validateStack: makeStackFunc(5, 1), 790 valid: true, 791 }, 792 DUP6: { 793 execute: makeDup(6), 794 gasCost: gasDup, 795 validateStack: makeStackFunc(6, 1), 796 valid: true, 797 }, 798 DUP7: { 799 execute: makeDup(7), 800 gasCost: gasDup, 801 validateStack: makeStackFunc(7, 1), 802 valid: true, 803 }, 804 DUP8: { 805 execute: makeDup(8), 806 gasCost: gasDup, 807 validateStack: makeStackFunc(8, 1), 808 valid: true, 809 }, 810 DUP9: { 811 execute: makeDup(9), 812 gasCost: gasDup, 813 validateStack: makeStackFunc(9, 1), 814 valid: true, 815 }, 816 DUP10: { 817 execute: makeDup(10), 818 gasCost: gasDup, 819 validateStack: makeStackFunc(10, 1), 820 valid: true, 821 }, 822 DUP11: { 823 execute: makeDup(11), 824 gasCost: gasDup, 825 validateStack: makeStackFunc(11, 1), 826 valid: true, 827 }, 828 DUP12: { 829 execute: makeDup(12), 830 gasCost: gasDup, 831 validateStack: makeStackFunc(12, 1), 832 valid: true, 833 }, 834 DUP13: { 835 execute: makeDup(13), 836 gasCost: gasDup, 837 validateStack: makeStackFunc(13, 1), 838 valid: true, 839 }, 840 DUP14: { 841 execute: makeDup(14), 842 gasCost: gasDup, 843 validateStack: makeStackFunc(14, 1), 844 valid: true, 845 }, 846 DUP15: { 847 execute: makeDup(15), 848 gasCost: gasDup, 849 validateStack: makeStackFunc(15, 1), 850 valid: true, 851 }, 852 DUP16: { 853 execute: makeDup(16), 854 gasCost: gasDup, 855 validateStack: makeStackFunc(16, 1), 856 valid: true, 857 }, 858 } 859 }