1 9 package com.vladium.jcd.opcodes; 10 11 15 public 16 interface IOpcodes 17 { 18 20 int _nop = 0x00; int _aconst_null = 0x01; int _iconst_m1 = 0x02; int _iconst_0 = 0x03; int _iconst_1 = 0x04; int _iconst_2 = 0x05; int _iconst_3 = 0x06; int _iconst_4 = 0x07; int _iconst_5 = 0x08; int _lconst_0 = 0x09; int _lconst_1 = 0x0A; int _fconst_0 = 0x0B; int _fconst_1 = 0x0C; int _fconst_2 = 0x0D; int _dconst_0 = 0x0E; int _dconst_1 = 0x0F; int _bipush = 0x10; int _sipush = 0x11; int _ldc = 0x12; int _ldc_w = 0x13; int _ldc2_w = 0x14; int _iload = 0x15; int _lload = 0x16; int _fload = 0x17; int _dload = 0x18; int _aload = 0x19; int _iload_0 = 0x1A; int _iload_1 = 0x1B; int _iload_2 = 0x1C; int _iload_3 = 0x1D; int _lload_0 = 0x1E; int _lload_1 = 0x1F; int _lload_2 = 0x20; int _lload_3 = 0x21; int _fload_0 = 0x22; int _fload_1 = 0x23; int _fload_2 = 0x24; int _fload_3 = 0x25; int _dload_0 = 0x26; int _dload_1 = 0x27; int _dload_2 = 0x28; int _dload_3 = 0x29; int _aload_0 = 0x2A; int _aload_1 = 0x2B; int _aload_2 = 0x2C; int _aload_3 = 0x2D; int _iaload = 0x2E; int _laload = 0x2F; int _faload = 0x30; int _daload = 0x31; int _aaload = 0x32; int _baload = 0x33; int _caload = 0x34; int _saload = 0x35; int _istore = 0x36; int _lstore = 0x37; int _fstore = 0x38; int _dstore = 0x39; int _astore = 0x3A; int _istore_0 = 0x3B; int _istore_1 = 0x3C; int _istore_2 = 0x3D; int _istore_3 = 0x3E; int _lstore_0 = 0x3F; int _lstore_1 = 0x40; int _lstore_2 = 0x41; int _lstore_3 = 0x42; int _fstore_0 = 0x43; int _fstore_1 = 0x44; int _fstore_2 = 0x45; int _fstore_3 = 0x46; int _dstore_0 = 0x47; int _dstore_1 = 0x48; int _dstore_2 = 0x49; int _dstore_3 = 0x4A; int _astore_0 = 0x4B; int _astore_1 = 0x4C; int _astore_2 = 0x4D; int _astore_3 = 0x4E; int _iastore = 0x4F; int _lastore = 0x50; int _fastore = 0x51; int _dastore = 0x52; int _aastore = 0x53; int _bastore = 0x54; int _castore = 0x55; int _sastore = 0x56; int _pop = 0x57; int _pop2 = 0x58; int _dup = 0x59; int _dup_x1 = 0x5A; int _dup_x2 = 0x5B; int _dup2 = 0x5C; int _dup2_x1 = 0x5D; int _dup2_x2 = 0x5E; int _swap = 0x5F; int _iadd = 0x60; int _ladd = 0x61; int _fadd = 0x62; int _dadd = 0x63; int _isub = 0x64; int _lsub = 0x65; int _fsub = 0x66; int _dsub = 0x67; int _imul = 0x68; int _lmul = 0x69; int _fmul = 0x6A; int _dmul = 0x6B; int _idiv = 0x6C; int _ldiv = 0x6D; int _fdiv = 0x6E; int _ddiv = 0x6F; int _irem = 0x70; int _lrem = 0x71; int _frem = 0x72; int _drem = 0x73; int _ineg = 0x74; int _lneg = 0x75; int _fneg = 0x76; int _dneg = 0x77; int _ishl = 0x78; int _lshl = 0x79; int _ishr = 0x7A; int _lshr = 0x7B; int _iushr = 0x7C; int _lushr = 0x7D; int _iand = 0x7E; int _land = 0x7F; int _ior = 0x80; int _lor = 0x81; int _ixor = 0x82; int _lxor = 0x83; int _iinc = 0x84; int _i2l = 0x85; int _i2f = 0x86; int _i2d = 0x87; int _l2i = 0x88; int _l2f = 0x89; int _l2d = 0x8A; int _f2i = 0x8B; int _f2l = 0x8C; int _f2d = 0x8D; int _d2i = 0x8E; int _d2l = 0x8F; int _d2f = 0x90; int _i2b = 0x91; int _i2c = 0x92; int _i2s = 0x93; int _lcmp = 0x94; int _fcmpl = 0x95; int _fcmpg = 0x96; int _dcmpl = 0x97; int _dcmpg = 0x98; int _ifeq = 0x99; int _ifne = 0x9A; int _iflt = 0x9B; int _ifge = 0x9C; int _ifgt = 0x9D; int _ifle = 0x9E; int _if_icmpeq = 0x9F; int _if_icmpne = 0xA0; int _if_icmplt = 0xA1; int _if_icmpge = 0xA2; int _if_icmpgt = 0xA3; int _if_icmple = 0xA4; int _if_acmpeq = 0xA5; int _if_acmpne = 0xA6; int _goto = 0xA7; int _jsr = 0xA8; int _ret = 0xA9; int _tableswitch = 0xAA; int _lookupswitch = 0xAB; int _ireturn = 0xAC; int _lreturn = 0xAD; int _freturn = 0xAE; int _dreturn = 0xAF; int _areturn = 0xB0; int _return = 0xB1; int _getstatic = 0xB2; int _putstatic = 0xB3; int _getfield = 0xB4; int _putfield = 0xB5; int _invokevirtual = 0xB6; int _invokespecial = 0xB7; int _invokestatic = 0xB8; int _invokeinterface = 0xB9; int _unused = 0xBA; int _new = 0xBB; int _newarray = 0xBC; int _anewarray = 0xBD; int _arraylength = 0xBE; int _athrow = 0xBF; int _checkcast = 0xC0; int _instanceof = 0xC1; int _monitorenter = 0xC2; int _monitorexit = 0xC3; int _wide = 0xC4; int _multianewarray = 0xC5; int _ifnull = 0xC6; int _ifnonnull = 0xC7; int _goto_w = 0xC8; int _jsr_w = 0xC9; int _breakpoint = 0xCA; int _impdep1 = 0xFE; int _impdep2 = 0xFF; 228 229 String [] MNEMONICS = 230 { 231 "nop", "aconst_null", "iconst_m1", "iconst_0", "iconst_1", "iconst_2", "iconst_3", "iconst_4", "iconst_5", "lconst_0", "lconst_1", "fconst_0", "fconst_1", "fconst_2", "dconst_0", "dconst_1", "bipush", "sipush", "ldc", "ldc_w", "ldc2_w", "iload", "lload", "fload", "dload", "aload", "iload_0", "iload_1", "iload_2", "iload_3", "lload_0", "lload_1", "lload_2", "lload_3", "fload_0", "fload_1", "fload_2", "fload_3", "dload_0", "dload_1", "dload_2", "dload_3", "aload_0", "aload_1", "aload_2", "aload_3", "iaload", "laload", "faload", "daload", "aaload", "baload", "caload", "saload", "istore", "lstore", "fstore", "dstore", "astore", "istore_0", "istore_1", "istore_2", "istore_3", "lstore_0", "lstore_1", "lstore_2", "lstore_3", "fstore_0", "fstore_1", "fstore_2", "fstore_3", "dstore_0", "dstore_1", "dstore_2", "dstore_3", "astore_0", "astore_1", "astore_2", "astore_3", "iastore", "lastore", "fastore", "dastore", "aastore", "bastore", "castore", "sastore", "pop", "pop2", "dup", "dup_x1", "dup_x2", "dup2", "dup2_x1", "dup2_x2", "swap", "iadd", "ladd", "fadd", "dadd", "isub", "lsub", "fsub", "dsub", "imul", "lmul", "fmul", "dmul", "idiv", "ldiv", "fdiv", "ddiv", "irem", "lrem", "frem", "drem", "ineg", "lneg", "fneg", "dneg", "ishl", "lshl", "ishr", "lshr", "iushr", "lushr", "iand", "land", "ior", "lor", "ixor", "lxor", "iinc", "i2l", "i2f", "i2d", "l2i", "l2f", "l2d", "f2i", "f2l", "f2d", "d2i", "d2l", "d2f", "i2b", "i2c", "i2s", "lcmp", "fcmpl", "fcmpg", "dcmpl", "dcmpg", "ifeq", "ifne", "iflt", "ifge", "ifgt", "ifle", "if_icmpeq", "if_icmpne", "if_icmplt", "if_icmpge", "if_icmpgt", "if_icmple", "if_acmpeq", "if_acmpne", "goto", "jsr", "ret", "tableswitch", "lookupswitch", "ireturn", "lreturn", "freturn", "dreturn", "areturn", "return", "getstatic", "putstatic", "getfield", "putfield", "invokevirtual", "invokespecial", "invokestatic", "invokeinterface", "unused", "new", "newarray", "anewarray", "arraylength", "athrow", "checkcast", "instanceof", "monitorenter", "monitorexit", "[wide]", "multianewarray", "ifnull", "ifnonnull", "goto_w", "jsr_w" }; 434 435 436 boolean [] CONDITIONAL_BRANCHES = clinit._CONDITIONAL_BRANCHES; 437 boolean [] COMPOUND_CONDITIONAL_BRANCHES = clinit._COMPOUND_CONDITIONAL_BRANCHES; 438 boolean [] UNCONDITIONAL_BRANCHES = clinit._UNCONDITIONAL_BRANCHES; 439 boolean [] BRANCHES = clinit._BRANCHES; 440 441 int [] NARROW_SIZE = clinit._NARROW_SIZE; int [] WIDE_SIZE = clinit._WIDE_SIZE; 444 445 static final class clinit 446 { 447 static final boolean [] _CONDITIONAL_BRANCHES; 448 static final boolean [] _COMPOUND_CONDITIONAL_BRANCHES; 449 static final boolean [] _UNCONDITIONAL_BRANCHES; 450 static final boolean [] _BRANCHES; 451 static final int [] _NARROW_SIZE; 452 static final int [] _WIDE_SIZE; 453 454 static 455 { 456 final int opcodeCount = MNEMONICS.length; 457 458 _CONDITIONAL_BRANCHES = new boolean [opcodeCount]; 459 460 _CONDITIONAL_BRANCHES [_ifeq] = true; 461 _CONDITIONAL_BRANCHES [_iflt] = true; 462 _CONDITIONAL_BRANCHES [_ifle] = true; 463 _CONDITIONAL_BRANCHES [_ifne] = true; 464 _CONDITIONAL_BRANCHES [_ifgt] = true; 465 _CONDITIONAL_BRANCHES [_ifge] = true; 466 _CONDITIONAL_BRANCHES [_ifnull] = true; 467 _CONDITIONAL_BRANCHES [_ifnonnull] = true; 468 _CONDITIONAL_BRANCHES [_if_icmpeq] = true; 469 _CONDITIONAL_BRANCHES [_if_icmpne] = true; 470 _CONDITIONAL_BRANCHES [_if_icmplt] = true; 471 _CONDITIONAL_BRANCHES [_if_icmpgt] = true; 472 _CONDITIONAL_BRANCHES [_if_icmple] = true; 473 _CONDITIONAL_BRANCHES [_if_icmpge] = true; 474 _CONDITIONAL_BRANCHES [_if_acmpeq] = true; 475 _CONDITIONAL_BRANCHES [_if_acmpne] = true; 476 477 478 _COMPOUND_CONDITIONAL_BRANCHES = new boolean [opcodeCount]; 479 480 _COMPOUND_CONDITIONAL_BRANCHES [_tableswitch] = true; 481 _COMPOUND_CONDITIONAL_BRANCHES [_lookupswitch] = true; 482 483 484 _UNCONDITIONAL_BRANCHES = new boolean [opcodeCount]; 485 486 _UNCONDITIONAL_BRANCHES [_goto] = true; 487 _UNCONDITIONAL_BRANCHES [_goto_w] = true; 488 _UNCONDITIONAL_BRANCHES [_jsr] = true; 489 _UNCONDITIONAL_BRANCHES [_jsr_w] = true; 490 _UNCONDITIONAL_BRANCHES [_ret] = true; 491 492 _UNCONDITIONAL_BRANCHES [_ireturn] = true; 493 _UNCONDITIONAL_BRANCHES [_lreturn] = true; 494 _UNCONDITIONAL_BRANCHES [_freturn] = true; 495 _UNCONDITIONAL_BRANCHES [_dreturn] = true; 496 _UNCONDITIONAL_BRANCHES [_areturn] = true; 497 _UNCONDITIONAL_BRANCHES [_return] = true; 498 499 _UNCONDITIONAL_BRANCHES [_athrow] = true; 500 501 502 _BRANCHES = new boolean [opcodeCount]; 503 504 for (int o = 0; o < opcodeCount; ++ o) 505 if (_CONDITIONAL_BRANCHES [o]) _BRANCHES [o] = true; 506 507 for (int o = 0; o < opcodeCount; ++ o) 508 if (_COMPOUND_CONDITIONAL_BRANCHES [o]) _BRANCHES [o] = true; 509 510 for (int o = 0; o < opcodeCount; ++ o) 511 if (_UNCONDITIONAL_BRANCHES [o]) _BRANCHES [o] = true; 512 513 514 _NARROW_SIZE = new int [opcodeCount]; 515 516 for (int o = 0; o < opcodeCount; ++ o) _NARROW_SIZE [o] = 1; 517 518 _NARROW_SIZE [_bipush] = 2; 519 _NARROW_SIZE [_sipush] = 3; 520 521 _NARROW_SIZE [_ldc] = 2; 522 _NARROW_SIZE [_ldc_w] = 3; 523 _NARROW_SIZE [_ldc2_w] = 3; 524 525 _NARROW_SIZE [_iload] = 2; 526 _NARROW_SIZE [_lload] = 2; 527 _NARROW_SIZE [_fload] = 2; 528 _NARROW_SIZE [_dload] = 2; 529 _NARROW_SIZE [_aload] = 2; 530 _NARROW_SIZE [_istore] = 2; 531 _NARROW_SIZE [_lstore] = 2; 532 _NARROW_SIZE [_fstore] = 2; 533 _NARROW_SIZE [_dstore] = 2; 534 _NARROW_SIZE [_astore] = 2; 535 536 _NARROW_SIZE [_iinc] = 3; 537 538 _NARROW_SIZE [_ifeq] = 3; 539 _NARROW_SIZE [_ifne] = 3; 540 _NARROW_SIZE [_iflt] = 3; 541 _NARROW_SIZE [_ifge] = 3; 542 _NARROW_SIZE [_ifgt] = 3; 543 _NARROW_SIZE [_ifle] = 3; 544 _NARROW_SIZE [_if_icmpeq] = 3; 545 _NARROW_SIZE [_if_icmpne] = 3; 546 _NARROW_SIZE [_if_icmplt] = 3; 547 _NARROW_SIZE [_if_icmpge] = 3; 548 _NARROW_SIZE [_if_icmpgt] = 3; 549 _NARROW_SIZE [_if_icmple] = 3; 550 _NARROW_SIZE [_if_acmpeq] = 3; 551 _NARROW_SIZE [_if_acmpne] = 3; 552 _NARROW_SIZE [_goto] = 3; 553 _NARROW_SIZE [_jsr] = 3; 554 _NARROW_SIZE [_ifnull] = 3; 555 _NARROW_SIZE [_ifnonnull] = 3; 556 557 _NARROW_SIZE [_ret] = 2; 558 559 _NARROW_SIZE [_lookupswitch] = -1; _NARROW_SIZE [_tableswitch] = 0; 562 _NARROW_SIZE [_getstatic] = 3; 563 _NARROW_SIZE [_putstatic] = 3; 564 _NARROW_SIZE [_getfield] = 3; 565 _NARROW_SIZE [_putfield] = 3; 566 567 _NARROW_SIZE [_invokevirtual] = 3; 568 _NARROW_SIZE [_invokespecial] = 3; 569 _NARROW_SIZE [_invokestatic] = 3; 570 571 _NARROW_SIZE [_invokeinterface] = 5; 572 573 _NARROW_SIZE [_new] = 3; 574 _NARROW_SIZE [_checkcast] = 3; 575 _NARROW_SIZE [_instanceof] = 3; 576 577 _NARROW_SIZE [_newarray] = 2; 578 _NARROW_SIZE [_anewarray] = 3; 579 _NARROW_SIZE [_multianewarray] = 4; 580 581 _NARROW_SIZE [_goto_w] = 5; 582 _NARROW_SIZE [_jsr_w] = 5; 583 584 585 _WIDE_SIZE = (int []) _NARROW_SIZE.clone (); 586 587 _WIDE_SIZE [_iload] = 3; 588 _WIDE_SIZE [_lload] = 3; 589 _WIDE_SIZE [_fload] = 3; 590 _WIDE_SIZE [_dload] = 3; 591 _WIDE_SIZE [_aload] = 3; 592 _WIDE_SIZE [_istore] = 3; 593 _WIDE_SIZE [_lstore] = 3; 594 _WIDE_SIZE [_fstore] = 3; 595 _WIDE_SIZE [_dstore] = 3; 596 _WIDE_SIZE [_astore] = 3; 597 598 _WIDE_SIZE [_iinc] = 5; 599 600 _WIDE_SIZE [_ret] = 3; 601 } 602 603 } 605 } 608 | Popular Tags |