00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef CLASSFILE_CONSTANTS_H
00038 #define CLASSFILE_CONSTANTS_H
00039
00040
00041
00042 #define JVM_ACC_PUBLIC 0x0001
00043 #define JVM_ACC_PRIVATE 0x0002
00044 #define JVM_ACC_PROTECTED 0x0004
00045 #define JVM_ACC_STATIC 0x0008
00046 #define JVM_ACC_FINAL 0x0010
00047 #define JVM_ACC_SYNCHRONIZED 0x0020
00048 #define JVM_ACC_SUPER 0x0020
00049 #define JVM_ACC_VOLATILE 0x0040
00050 #define JVM_ACC_TRANSIENT 0x0080
00051 #define JVM_ACC_VARARGS 0x0080
00052 #define JVM_ACC_NATIVE 0x0100
00053 #define JVM_ACC_INTERFACE 0x0200
00054 #define JVM_ACC_ABSTRACT 0x0400
00055 #define JVM_ACC_STRICT 0x0800
00056 #define JVM_ACC_SYNTHETIC 0x1000
00057 #define JVM_ACC_ANNOTATION 0x2000
00058 #define JVM_ACC_ENUM 0x4000
00059
00060 enum {
00061 JVM_CONSTANT_Utf8 = 1,
00062 JVM_CONSTANT_Unicode = 2,
00063 JVM_CONSTANT_Integer = 3,
00064 JVM_CONSTANT_Float = 4,
00065 JVM_CONSTANT_Long = 5,
00066 JVM_CONSTANT_Double = 6,
00067 JVM_CONSTANT_Class = 7,
00068 JVM_CONSTANT_String = 8,
00069 JVM_CONSTANT_Fieldref = 9,
00070 JVM_CONSTANT_Methodref = 10,
00071 JVM_CONSTANT_InterfaceMethodref = 11,
00072 JVM_CONSTANT_NameAndType = 12
00073 };
00074
00075
00076
00077 #define JVM_SIGNATURE_ARRAY '['
00078 #define JVM_SIGNATURE_BYTE 'B'
00079 #define JVM_SIGNATURE_CHAR 'C'
00080 #define JVM_SIGNATURE_CLASS 'L'
00081 #define JVM_SIGNATURE_ENDCLASS ';'
00082 #define JVM_SIGNATURE_ENUM 'E'
00083 #define JVM_SIGNATURE_FLOAT 'F'
00084 #define JVM_SIGNATURE_DOUBLE 'D'
00085 #define JVM_SIGNATURE_FUNC '('
00086 #define JVM_SIGNATURE_ENDFUNC ')'
00087 #define JVM_SIGNATURE_INT 'I'
00088 #define JVM_SIGNATURE_LONG 'J'
00089 #define JVM_SIGNATURE_SHORT 'S'
00090 #define JVM_SIGNATURE_VOID 'V'
00091 #define JVM_SIGNATURE_BOOLEAN 'Z'
00092
00093
00094
00095 enum {
00096 opc_nop = 0,
00097 opc_aconst_null = 1,
00098 opc_iconst_m1 = 2,
00099 opc_iconst_0 = 3,
00100 opc_iconst_1 = 4,
00101 opc_iconst_2 = 5,
00102 opc_iconst_3 = 6,
00103 opc_iconst_4 = 7,
00104 opc_iconst_5 = 8,
00105 opc_lconst_0 = 9,
00106 opc_lconst_1 = 10,
00107 opc_fconst_0 = 11,
00108 opc_fconst_1 = 12,
00109 opc_fconst_2 = 13,
00110 opc_dconst_0 = 14,
00111 opc_dconst_1 = 15,
00112 opc_bipush = 16,
00113 opc_sipush = 17,
00114 opc_ldc = 18,
00115 opc_ldc_w = 19,
00116 opc_ldc2_w = 20,
00117 opc_iload = 21,
00118 opc_lload = 22,
00119 opc_fload = 23,
00120 opc_dload = 24,
00121 opc_aload = 25,
00122 opc_iload_0 = 26,
00123 opc_iload_1 = 27,
00124 opc_iload_2 = 28,
00125 opc_iload_3 = 29,
00126 opc_lload_0 = 30,
00127 opc_lload_1 = 31,
00128 opc_lload_2 = 32,
00129 opc_lload_3 = 33,
00130 opc_fload_0 = 34,
00131 opc_fload_1 = 35,
00132 opc_fload_2 = 36,
00133 opc_fload_3 = 37,
00134 opc_dload_0 = 38,
00135 opc_dload_1 = 39,
00136 opc_dload_2 = 40,
00137 opc_dload_3 = 41,
00138 opc_aload_0 = 42,
00139 opc_aload_1 = 43,
00140 opc_aload_2 = 44,
00141 opc_aload_3 = 45,
00142 opc_iaload = 46,
00143 opc_laload = 47,
00144 opc_faload = 48,
00145 opc_daload = 49,
00146 opc_aaload = 50,
00147 opc_baload = 51,
00148 opc_caload = 52,
00149 opc_saload = 53,
00150 opc_istore = 54,
00151 opc_lstore = 55,
00152 opc_fstore = 56,
00153 opc_dstore = 57,
00154 opc_astore = 58,
00155 opc_istore_0 = 59,
00156 opc_istore_1 = 60,
00157 opc_istore_2 = 61,
00158 opc_istore_3 = 62,
00159 opc_lstore_0 = 63,
00160 opc_lstore_1 = 64,
00161 opc_lstore_2 = 65,
00162 opc_lstore_3 = 66,
00163 opc_fstore_0 = 67,
00164 opc_fstore_1 = 68,
00165 opc_fstore_2 = 69,
00166 opc_fstore_3 = 70,
00167 opc_dstore_0 = 71,
00168 opc_dstore_1 = 72,
00169 opc_dstore_2 = 73,
00170 opc_dstore_3 = 74,
00171 opc_astore_0 = 75,
00172 opc_astore_1 = 76,
00173 opc_astore_2 = 77,
00174 opc_astore_3 = 78,
00175 opc_iastore = 79,
00176 opc_lastore = 80,
00177 opc_fastore = 81,
00178 opc_dastore = 82,
00179 opc_aastore = 83,
00180 opc_bastore = 84,
00181 opc_castore = 85,
00182 opc_sastore = 86,
00183 opc_pop = 87,
00184 opc_pop2 = 88,
00185 opc_dup = 89,
00186 opc_dup_x1 = 90,
00187 opc_dup_x2 = 91,
00188 opc_dup2 = 92,
00189 opc_dup2_x1 = 93,
00190 opc_dup2_x2 = 94,
00191 opc_swap = 95,
00192 opc_iadd = 96,
00193 opc_ladd = 97,
00194 opc_fadd = 98,
00195 opc_dadd = 99,
00196 opc_isub = 100,
00197 opc_lsub = 101,
00198 opc_fsub = 102,
00199 opc_dsub = 103,
00200 opc_imul = 104,
00201 opc_lmul = 105,
00202 opc_fmul = 106,
00203 opc_dmul = 107,
00204 opc_idiv = 108,
00205 opc_ldiv = 109,
00206 opc_fdiv = 110,
00207 opc_ddiv = 111,
00208 opc_irem = 112,
00209 opc_lrem = 113,
00210 opc_frem = 114,
00211 opc_drem = 115,
00212 opc_ineg = 116,
00213 opc_lneg = 117,
00214 opc_fneg = 118,
00215 opc_dneg = 119,
00216 opc_ishl = 120,
00217 opc_lshl = 121,
00218 opc_ishr = 122,
00219 opc_lshr = 123,
00220 opc_iushr = 124,
00221 opc_lushr = 125,
00222 opc_iand = 126,
00223 opc_land = 127,
00224 opc_ior = 128,
00225 opc_lor = 129,
00226 opc_ixor = 130,
00227 opc_lxor = 131,
00228 opc_iinc = 132,
00229 opc_i2l = 133,
00230 opc_i2f = 134,
00231 opc_i2d = 135,
00232 opc_l2i = 136,
00233 opc_l2f = 137,
00234 opc_l2d = 138,
00235 opc_f2i = 139,
00236 opc_f2l = 140,
00237 opc_f2d = 141,
00238 opc_d2i = 142,
00239 opc_d2l = 143,
00240 opc_d2f = 144,
00241 opc_i2b = 145,
00242 opc_i2c = 146,
00243 opc_i2s = 147,
00244 opc_lcmp = 148,
00245 opc_fcmpl = 149,
00246 opc_fcmpg = 150,
00247 opc_dcmpl = 151,
00248 opc_dcmpg = 152,
00249 opc_ifeq = 153,
00250 opc_ifne = 154,
00251 opc_iflt = 155,
00252 opc_ifge = 156,
00253 opc_ifgt = 157,
00254 opc_ifle = 158,
00255 opc_if_icmpeq = 159,
00256 opc_if_icmpne = 160,
00257 opc_if_icmplt = 161,
00258 opc_if_icmpge = 162,
00259 opc_if_icmpgt = 163,
00260 opc_if_icmple = 164,
00261 opc_if_acmpeq = 165,
00262 opc_if_acmpne = 166,
00263 opc_goto = 167,
00264 opc_jsr = 168,
00265 opc_ret = 169,
00266 opc_tableswitch = 170,
00267 opc_lookupswitch = 171,
00268 opc_ireturn = 172,
00269 opc_lreturn = 173,
00270 opc_freturn = 174,
00271 opc_dreturn = 175,
00272 opc_areturn = 176,
00273 opc_return = 177,
00274 opc_getstatic = 178,
00275 opc_putstatic = 179,
00276 opc_getfield = 180,
00277 opc_putfield = 181,
00278 opc_invokevirtual = 182,
00279 opc_invokespecial = 183,
00280 opc_invokestatic = 184,
00281 opc_invokeinterface = 185,
00282 opc_xxxunusedxxx = 186,
00283 opc_new = 187,
00284 opc_newarray = 188,
00285 opc_anewarray = 189,
00286 opc_arraylength = 190,
00287 opc_athrow = 191,
00288 opc_checkcast = 192,
00289 opc_instanceof = 193,
00290 opc_monitorenter = 194,
00291 opc_monitorexit = 195,
00292 opc_wide = 196,
00293 opc_multianewarray = 197,
00294 opc_ifnull = 198,
00295 opc_ifnonnull = 199,
00296 opc_goto_w = 200,
00297 opc_jsr_w = 201,
00298 opc_MAX = 201
00299 };
00300
00301
00302
00303
00304 #define JVM_OPCODE_LENGTH_INITIALIZER { \
00305 1, \
00306 1, \
00307 1, \
00308 1, \
00309 1, \
00310 1, \
00311 1, \
00312 1, \
00313 1, \
00314 1, \
00315 1, \
00316 1, \
00317 1, \
00318 1, \
00319 1, \
00320 1, \
00321 2, \
00322 3, \
00323 2, \
00324 3, \
00325 3, \
00326 2, \
00327 2, \
00328 2, \
00329 2, \
00330 2, \
00331 1, \
00332 1, \
00333 1, \
00334 1, \
00335 1, \
00336 1, \
00337 1, \
00338 1, \
00339 1, \
00340 1, \
00341 1, \
00342 1, \
00343 1, \
00344 1, \
00345 1, \
00346 1, \
00347 1, \
00348 1, \
00349 1, \
00350 1, \
00351 1, \
00352 1, \
00353 1, \
00354 1, \
00355 1, \
00356 1, \
00357 1, \
00358 1, \
00359 2, \
00360 2, \
00361 2, \
00362 2, \
00363 2, \
00364 1, \
00365 1, \
00366 1, \
00367 1, \
00368 1, \
00369 1, \
00370 1, \
00371 1, \
00372 1, \
00373 1, \
00374 1, \
00375 1, \
00376 1, \
00377 1, \
00378 1, \
00379 1, \
00380 1, \
00381 1, \
00382 1, \
00383 1, \
00384 1, \
00385 1, \
00386 1, \
00387 1, \
00388 1, \
00389 1, \
00390 1, \
00391 1, \
00392 1, \
00393 1, \
00394 1, \
00395 1, \
00396 1, \
00397 1, \
00398 1, \
00399 1, \
00400 1, \
00401 1, \
00402 1, \
00403 1, \
00404 1, \
00405 1, \
00406 1, \
00407 1, \
00408 1, \
00409 1, \
00410 1, \
00411 1, \
00412 1, \
00413 1, \
00414 1, \
00415 1, \
00416 1, \
00417 1, \
00418 1, \
00419 1, \
00420 1, \
00421 1, \
00422 1, \
00423 1, \
00424 1, \
00425 1, \
00426 1, \
00427 1, \
00428 1, \
00429 1, \
00430 1, \
00431 1, \
00432 1, \
00433 1, \
00434 1, \
00435 1, \
00436 1, \
00437 3, \
00438 1, \
00439 1, \
00440 1, \
00441 1, \
00442 1, \
00443 1, \
00444 1, \
00445 1, \
00446 1, \
00447 1, \
00448 1, \
00449 1, \
00450 1, \
00451 1, \
00452 1, \
00453 1, \
00454 1, \
00455 1, \
00456 1, \
00457 1, \
00458 3, \
00459 3, \
00460 3, \
00461 3, \
00462 3, \
00463 3, \
00464 3, \
00465 3, \
00466 3, \
00467 3, \
00468 3, \
00469 3, \
00470 3, \
00471 3, \
00472 3, \
00473 3, \
00474 2, \
00475 99, \
00476 99, \
00477 1, \
00478 1, \
00479 1, \
00480 1, \
00481 1, \
00482 1, \
00483 3, \
00484 3, \
00485 3, \
00486 3, \
00487 3, \
00488 3, \
00489 3, \
00490 5, \
00491 0, \
00492 3, \
00493 2, \
00494 3, \
00495 1, \
00496 1, \
00497 3, \
00498 3, \
00499 1, \
00500 1, \
00501 0, \
00502 4, \
00503 3, \
00504 3, \
00505 5, \
00506 5 \
00507 }
00508
00509 #endif
00510