1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730
|
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public interface RuntimeConstants {
/* Signature Characters */
char SIGC_VOID = 'V';
String SIG_VOID = "V";
char SIGC_BOOLEAN = 'Z';
String SIG_BOOLEAN = "Z";
char SIGC_BYTE = 'B';
String SIG_BYTE = "B";
char SIGC_CHAR = 'C';
String SIG_CHAR = "C";
char SIGC_SHORT = 'S';
String SIG_SHORT = "S";
char SIGC_INT = 'I';
String SIG_INT = "I";
char SIGC_LONG = 'J';
String SIG_LONG = "J";
char SIGC_FLOAT = 'F';
String SIG_FLOAT = "F";
char SIGC_DOUBLE = 'D';
String SIG_DOUBLE = "D";
char SIGC_ARRAY = '[';
String SIG_ARRAY = "[";
char SIGC_CLASS = 'L';
String SIG_CLASS = "L";
char SIGC_METHOD = '(';
String SIG_METHOD = "(";
char SIGC_ENDCLASS = ';';
String SIG_ENDCLASS = ";";
char SIGC_ENDMETHOD = ')';
String SIG_ENDMETHOD = ")";
char SIGC_PACKAGE = '/';
String SIG_PACKAGE = "/";
/* Class File Constants */
int JAVA_MAGIC = 0xcafebabe;
int JAVA_MIN_SUPPORTED_VERSION = 45;
int JAVA_MAX_SUPPORTED_VERSION = 48;
int JAVA_MAX_SUPPORTED_MINOR_VERSION = 0;
/* Generate class file version for 1.1 by default */
int JAVA_DEFAULT_VERSION = 45;
int JAVA_DEFAULT_MINOR_VERSION = 3;
/* Constant table */
int CONSTANT_UTF8 = 1;
int CONSTANT_UNICODE = 2;
int CONSTANT_INTEGER = 3;
int CONSTANT_FLOAT = 4;
int CONSTANT_LONG = 5;
int CONSTANT_DOUBLE = 6;
int CONSTANT_CLASS = 7;
int CONSTANT_STRING = 8;
int CONSTANT_FIELD = 9;
int CONSTANT_METHOD = 10;
int CONSTANT_INTERFACEMETHOD = 11;
int CONSTANT_NAMEANDTYPE = 12;
/* Access and modifier flags */
int ACC_PUBLIC = 0x00000001;
int ACC_PRIVATE = 0x00000002;
int ACC_PROTECTED = 0x00000004;
int ACC_STATIC = 0x00000008;
int ACC_FINAL = 0x00000010;
int ACC_SYNCHRONIZED = 0x00000020;
int ACC_VOLATILE = 0x00000040;
int ACC_TRANSIENT = 0x00000080;
int ACC_NATIVE = 0x00000100;
int ACC_INTERFACE = 0x00000200;
int ACC_ABSTRACT = 0x00000400;
int ACC_SUPER = 0x00000020;
int ACC_STRICT = 0x00000800;
/* Type codes */
int T_CLASS = 0x00000002;
int T_BOOLEAN = 0x00000004;
int T_CHAR = 0x00000005;
int T_FLOAT = 0x00000006;
int T_DOUBLE = 0x00000007;
int T_BYTE = 0x00000008;
int T_SHORT = 0x00000009;
int T_INT = 0x0000000a;
int T_LONG = 0x0000000b;
/* Opcodes */
int opc_try = -3;
int opc_dead = -2;
int opc_label = -1;
int opc_nop = 0;
int opc_aconst_null = 1;
int opc_iconst_m1 = 2;
int opc_iconst_0 = 3;
int opc_iconst_1 = 4;
int opc_iconst_2 = 5;
int opc_iconst_3 = 6;
int opc_iconst_4 = 7;
int opc_iconst_5 = 8;
int opc_lconst_0 = 9;
int opc_lconst_1 = 10;
int opc_fconst_0 = 11;
int opc_fconst_1 = 12;
int opc_fconst_2 = 13;
int opc_dconst_0 = 14;
int opc_dconst_1 = 15;
int opc_bipush = 16;
int opc_sipush = 17;
int opc_ldc = 18;
int opc_ldc_w = 19;
int opc_ldc2_w = 20;
int opc_iload = 21;
int opc_lload = 22;
int opc_fload = 23;
int opc_dload = 24;
int opc_aload = 25;
int opc_iload_0 = 26;
int opc_iload_1 = 27;
int opc_iload_2 = 28;
int opc_iload_3 = 29;
int opc_lload_0 = 30;
int opc_lload_1 = 31;
int opc_lload_2 = 32;
int opc_lload_3 = 33;
int opc_fload_0 = 34;
int opc_fload_1 = 35;
int opc_fload_2 = 36;
int opc_fload_3 = 37;
int opc_dload_0 = 38;
int opc_dload_1 = 39;
int opc_dload_2 = 40;
int opc_dload_3 = 41;
int opc_aload_0 = 42;
int opc_aload_1 = 43;
int opc_aload_2 = 44;
int opc_aload_3 = 45;
int opc_iaload = 46;
int opc_laload = 47;
int opc_faload = 48;
int opc_daload = 49;
int opc_aaload = 50;
int opc_baload = 51;
int opc_caload = 52;
int opc_saload = 53;
int opc_istore = 54;
int opc_lstore = 55;
int opc_fstore = 56;
int opc_dstore = 57;
int opc_astore = 58;
int opc_istore_0 = 59;
int opc_istore_1 = 60;
int opc_istore_2 = 61;
int opc_istore_3 = 62;
int opc_lstore_0 = 63;
int opc_lstore_1 = 64;
int opc_lstore_2 = 65;
int opc_lstore_3 = 66;
int opc_fstore_0 = 67;
int opc_fstore_1 = 68;
int opc_fstore_2 = 69;
int opc_fstore_3 = 70;
int opc_dstore_0 = 71;
int opc_dstore_1 = 72;
int opc_dstore_2 = 73;
int opc_dstore_3 = 74;
int opc_astore_0 = 75;
int opc_astore_1 = 76;
int opc_astore_2 = 77;
int opc_astore_3 = 78;
int opc_iastore = 79;
int opc_lastore = 80;
int opc_fastore = 81;
int opc_dastore = 82;
int opc_aastore = 83;
int opc_bastore = 84;
int opc_castore = 85;
int opc_sastore = 86;
int opc_pop = 87;
int opc_pop2 = 88;
int opc_dup = 89;
int opc_dup_x1 = 90;
int opc_dup_x2 = 91;
int opc_dup2 = 92;
int opc_dup2_x1 = 93;
int opc_dup2_x2 = 94;
int opc_swap = 95;
int opc_iadd = 96;
int opc_ladd = 97;
int opc_fadd = 98;
int opc_dadd = 99;
int opc_isub = 100;
int opc_lsub = 101;
int opc_fsub = 102;
int opc_dsub = 103;
int opc_imul = 104;
int opc_lmul = 105;
int opc_fmul = 106;
int opc_dmul = 107;
int opc_idiv = 108;
int opc_ldiv = 109;
int opc_fdiv = 110;
int opc_ddiv = 111;
int opc_irem = 112;
int opc_lrem = 113;
int opc_frem = 114;
int opc_drem = 115;
int opc_ineg = 116;
int opc_lneg = 117;
int opc_fneg = 118;
int opc_dneg = 119;
int opc_ishl = 120;
int opc_lshl = 121;
int opc_ishr = 122;
int opc_lshr = 123;
int opc_iushr = 124;
int opc_lushr = 125;
int opc_iand = 126;
int opc_land = 127;
int opc_ior = 128;
int opc_lor = 129;
int opc_ixor = 130;
int opc_lxor = 131;
int opc_iinc = 132;
int opc_i2l = 133;
int opc_i2f = 134;
int opc_i2d = 135;
int opc_l2i = 136;
int opc_l2f = 137;
int opc_l2d = 138;
int opc_f2i = 139;
int opc_f2l = 140;
int opc_f2d = 141;
int opc_d2i = 142;
int opc_d2l = 143;
int opc_d2f = 144;
int opc_i2b = 145;
int opc_i2c = 146;
int opc_i2s = 147;
int opc_lcmp = 148;
int opc_fcmpl = 149;
int opc_fcmpg = 150;
int opc_dcmpl = 151;
int opc_dcmpg = 152;
int opc_ifeq = 153;
int opc_ifne = 154;
int opc_iflt = 155;
int opc_ifge = 156;
int opc_ifgt = 157;
int opc_ifle = 158;
int opc_if_icmpeq = 159;
int opc_if_icmpne = 160;
int opc_if_icmplt = 161;
int opc_if_icmpge = 162;
int opc_if_icmpgt = 163;
int opc_if_icmple = 164;
int opc_if_acmpeq = 165;
int opc_if_acmpne = 166;
int opc_goto = 167;
int opc_jsr = 168;
int opc_ret = 169;
int opc_tableswitch = 170;
int opc_lookupswitch = 171;
int opc_ireturn = 172;
int opc_lreturn = 173;
int opc_freturn = 174;
int opc_dreturn = 175;
int opc_areturn = 176;
int opc_return = 177;
int opc_getstatic = 178;
int opc_putstatic = 179;
int opc_getfield = 180;
int opc_putfield = 181;
int opc_invokevirtual = 182;
int opc_invokespecial = 183;
int opc_invokestatic = 184;
int opc_invokeinterface = 185;
int opc_xxxunusedxxx = 186;
int opc_new = 187;
int opc_newarray = 188;
int opc_anewarray = 189;
int opc_arraylength = 190;
int opc_athrow = 191;
int opc_checkcast = 192;
int opc_instanceof = 193;
int opc_monitorenter = 194;
int opc_monitorexit = 195;
int opc_wide = 196;
int opc_multianewarray = 197;
int opc_ifnull = 198;
int opc_ifnonnull = 199;
int opc_goto_w = 200;
int opc_jsr_w = 201;
int opc_breakpoint = 202;
/* Opcode Names */
String opcNames[] = {
"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",
"xxxunusedxxx",
"new",
"newarray",
"anewarray",
"arraylength",
"athrow",
"checkcast",
"instanceof",
"monitorenter",
"monitorexit",
"wide",
"multianewarray",
"ifnull",
"ifnonnull",
"goto_w",
"jsr_w",
"breakpoint"
};
/* Opcode Lengths */
int opcLengths[] = {
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
2,
3,
3,
2,
2,
2,
2,
2,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
3,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
2,
99,
99,
1,
1,
1,
1,
1,
1,
3,
3,
3,
3,
3,
3,
3,
5,
0,
3,
2,
3,
1,
1,
3,
3,
1,
1,
0,
4,
3,
3,
5,
5,
1
};
}
|