1 // jq_ClassFileConstants.java, created Mon Feb 5 23:23:20 2001 by joewhaley
2 // Copyright (C) 2001-3 John Whaley <jwhaley@alum.mit.edu>
3 // Licensed under the terms of the GNU LGPL; see COPYING for details.
4 package joeq.Class;
5
6 /*
7 * @author John Whaley <jwhaley@alum.mit.edu>
8 * @version $Id: jq_ClassFileConstants.java 2210 2005-03-14 20:25:54Z joewhaley $
9 */
10 public interface jq_ClassFileConstants {
11
12 /* ClassFile format: common access flags for classes(C), methods(M) and fields(F)
13 (VM Spec Chapter 4.7) */
14 char ACC_PUBLIC = 0x0001; // C, M, F
15 char ACC_PRIVATE = 0x0002; // M, F
16 char ACC_PROTECTED = 0x0004; // M, F
17 char ACC_STATIC = 0x0008; // M, F
18 char ACC_FINAL = 0x0010; // C, M, F
19 char ACC_SYNCHRONIZED = 0x0020; // same value M, F
20 char ACC_SUPER = 0x0020; // same value C
21 char ACC_VOLATILE = 0x0040; // M Declared volatile; cannot be cached
22 char ACC_TRANSIENT = 0x0080; // M
23 char ACC_NATIVE = 0x0100; // F
24 char ACC_INTERFACE = 0x0200; // C
25 char ACC_ABSTRACT = 0x0400; // C, F
26 char ACC_STRICT = 0x0800; // F Declared strictfp; floating-point mode is FP-strict
27
28 /* Each item in the constant_pool table must begin with
29 a 1-byte tag indicating the kind of cp_info entry.
30 The contents of the info array vary with the value of tag.
31 Each tag byte must be followed by two or more bytes
32 giving information about the specific constant.
33 The format of the additional information varies with
34 the tag value. Tag values are given below.
35 (VM Spec Chapter 4.4) */
36
37 byte CONSTANT_Class = 7;
38 byte CONSTANT_FieldRef = 9;
39 byte CONSTANT_MethodRef = 10;
40 byte CONSTANT_InterfaceMethodRef = 11;
41 byte CONSTANT_String = 8;
42 byte CONSTANT_Integer = 3;
43 byte CONSTANT_Float = 4;
44 byte CONSTANT_Long = 5;
45 byte CONSTANT_Double = 6;
46 byte CONSTANT_NameAndType = 12;
47 byte CONSTANT_Utf8 = 1;
48 byte CONSTANT_ResolvedClass = 13; // doesn't exist in class file.
49 byte CONSTANT_ResolvedSFieldRef = 14; // doesn't exist in class file.
50 byte CONSTANT_ResolvedIFieldRef = 15; // doesn't exist in class file.
51 byte CONSTANT_ResolvedSMethodRef = 16; // doesn't exist in class file.
52 byte CONSTANT_ResolvedIMethodRef = 17; // doesn't exist in class file.
53
54 /* A descriptor is a string representing the type of a field
55 or method. Descriptors are represented in the class file
56 format using UTF-8 strings. Followings are the BaseType
57 characters corresponding to respective types.
58 (VM Spec Chapter 4.3) */
59 byte TC_BYTE = (byte)'B'; // signed byte
60 byte TC_CHAR = (byte)'C'; // Unicode character
61 byte TC_DOUBLE = (byte)'D'; // double-precision floating-point value
62 byte TC_FLOAT = (byte)'F'; // single-precision floating-point value
63 byte TC_INT = (byte)'I'; // integer
64 byte TC_LONG = (byte)'J'; // long integer
65 byte TC_CLASS = (byte)'L'; // L<classname>; an instance of class <classname>
66 byte TC_CLASSEND = (byte)';'; //
67 byte TC_SHORT = (byte)'S'; // signed short
68 byte TC_BOOLEAN = (byte)'Z'; // true or false
69 byte TC_ARRAY = (byte)'['; // one array dimension
70 byte TC_PARAM = (byte)'('; //
71 byte TC_PARAMEND = (byte)')'; //
72 byte TC_VOID = (byte)'V'; // indicates that the method returns no value(void)
73
74 byte T_BOOLEAN = 4;
75 byte T_CHAR = 5;
76 byte T_FLOAT = 6;
77 byte T_DOUBLE = 7;
78 byte T_BYTE = 8;
79 byte T_SHORT = 9;
80 byte T_INT = 10;
81 byte T_LONG = 11;
82
83 // We have seen a reference to this class/member (for example, in the constant
84 // pool of another class), but it has not been loaded, and therefore we know
85 // nothing about it other than its name.
86 byte STATE_UNLOADED = 0;
87 // A thread is in the process of loading the constant pool for this class.
88 // (see verify pass 1 Jvm spec 4.9.1)
89 byte STATE_LOADING1 = 1;
90 // A thread has finished loading the constant pool, and is loading the class
91 // members and other information.
92 byte STATE_LOADING2 = 2;
93 // A thread has finished loading the class, and is now merging in implementation
94 // classes.
95 byte STATE_LOADING3 = 3;
96 // An error occurred while loading this class.
97 byte STATE_LOADERROR = 4;
98 // This class has been loaded and all members have been created.
99 byte STATE_LOADED = 5;
100 // A thread is in the process of verifying this class. (Jvm spec 2.17.3)
101 // (see verify pass 2 Jvm spec 4.9.1)
102 // It checks the code in each declared method in the class.
103 byte STATE_VERIFYING = 6;
104 // This class has failed verification.
105 byte STATE_VERIFYERROR = 7;
106 // This class has been successfully verified.
107 byte STATE_VERIFIED = 8;
108 // A thread is in the process of preparing this class. (Jvm spec 2.17.3)
109 // Preparation lays out the object fields and creates a method table.
110 // Static fields are created and initialized in the NEXT step.
111 byte STATE_PREPARING = 9;
112 // This class has failed preparation.
113 byte STATE_PREPAREERROR = 10;
114 // This class has been prepared.
115 byte STATE_PREPARED = 11;
116 // A thread is creating the static fields for the class, and initializing the
117 // ones that have ConstantValue attributes.
118 byte STATE_SFINITIALIZING = 12;
119 // This class has failed static field initialization.
120 byte STATE_SFINITERROR = 13;
121 // This class has its static fields created and initialized.
122 byte STATE_SFINITIALIZED = 14;
123 // A thread is in the process of compiling stubs for the methods in this class.
124 byte STATE_COMPILING = 15;
125 // The class has stubs compiled for all of its methods.
126 byte STATE_COMPILED = 16;
127 // A thread is in the process of initializing this class. (Jvm spec 2.17.4-5)
128 // Initialization is triggered when code is about to execute that will create
129 // an instance, execute a static method, or use or assign a nonconstant static
130 // field.
131 byte STATE_CLSINITIALIZING = 17;
132 byte STATE_CLSINITRUNNING = 18;
133 // An error occurred during initialization! This resulted in a throwing of
134 // a NoClassDefFoundError, ExceptionInInitializerError, or OutOfMemoryError
135 // for the initializing thread. Any further attempts to initialize should
136 // result in the throwing of a NoClassDefFoundError.
137 byte STATE_CLSINITERROR = 19;
138 // This class has been fully initialized!
139 byte STATE_CLSINITIALIZED = 20;
140
141 /***
142 * Illegal codes
143 */
144 short UNDEFINED = -1;
145 short UNPREDICTABLE = -2;
146 short RESERVED = -3;
147 String ILLEGAL_OPCODE = "<illegal opcode>";
148 String ILLEGAL_TYPE = "<illegal type>";
149
150 /*** Java VM opcodes.
151 * (VM Spec Chapter 6)
152 */
153 short jbc_NOP = 0;
154 short jbc_ACONST_NULL = 1;
155 short jbc_ICONST_M1 = 2;
156 short jbc_ICONST_0 = 3;
157 short jbc_ICONST_1 = 4;
158 short jbc_ICONST_2 = 5;
159 short jbc_ICONST_3 = 6;
160 short jbc_ICONST_4 = 7;
161 short jbc_ICONST_5 = 8;
162 short jbc_LCONST_0 = 9;
163 short jbc_LCONST_1 = 10;
164 short jbc_FCONST_0 = 11;
165 short jbc_FCONST_1 = 12;
166 short jbc_FCONST_2 = 13;
167 short jbc_DCONST_0 = 14;
168 short jbc_DCONST_1 = 15;
169 short jbc_BIPUSH = 16;
170 short jbc_SIPUSH = 17;
171 short jbc_LDC = 18;
172 short jbc_LDC_W = 19;
173 short jbc_LDC2_W = 20;
174 short jbc_ILOAD = 21;
175 short jbc_LLOAD = 22;
176 short jbc_FLOAD = 23;
177 short jbc_DLOAD = 24;
178 short jbc_ALOAD = 25;
179 short jbc_ILOAD_0 = 26;
180 short jbc_ILOAD_1 = 27;
181 short jbc_ILOAD_2 = 28;
182 short jbc_ILOAD_3 = 29;
183 short jbc_LLOAD_0 = 30;
184 short jbc_LLOAD_1 = 31;
185 short jbc_LLOAD_2 = 32;
186 short jbc_LLOAD_3 = 33;
187 short jbc_FLOAD_0 = 34;
188 short jbc_FLOAD_1 = 35;
189 short jbc_FLOAD_2 = 36;
190 short jbc_FLOAD_3 = 37;
191 short jbc_DLOAD_0 = 38;
192 short jbc_DLOAD_1 = 39;
193 short jbc_DLOAD_2 = 40;
194 short jbc_DLOAD_3 = 41;
195 short jbc_ALOAD_0 = 42;
196 short jbc_ALOAD_1 = 43;
197 short jbc_ALOAD_2 = 44;
198 short jbc_ALOAD_3 = 45;
199 short jbc_IALOAD = 46;
200 short jbc_LALOAD = 47;
201 short jbc_FALOAD = 48;
202 short jbc_DALOAD = 49;
203 short jbc_AALOAD = 50;
204 short jbc_BALOAD = 51;
205 short jbc_CALOAD = 52;
206 short jbc_SALOAD = 53;
207 short jbc_ISTORE = 54;
208 short jbc_LSTORE = 55;
209 short jbc_FSTORE = 56;
210 short jbc_DSTORE = 57;
211 short jbc_ASTORE = 58;
212 short jbc_ISTORE_0 = 59;
213 short jbc_ISTORE_1 = 60;
214 short jbc_ISTORE_2 = 61;
215 short jbc_ISTORE_3 = 62;
216 short jbc_LSTORE_0 = 63;
217 short jbc_LSTORE_1 = 64;
218 short jbc_LSTORE_2 = 65;
219 short jbc_LSTORE_3 = 66;
220 short jbc_FSTORE_0 = 67;
221 short jbc_FSTORE_1 = 68;
222 short jbc_FSTORE_2 = 69;
223 short jbc_FSTORE_3 = 70;
224 short jbc_DSTORE_0 = 71;
225 short jbc_DSTORE_1 = 72;
226 short jbc_DSTORE_2 = 73;
227 short jbc_DSTORE_3 = 74;
228 short jbc_ASTORE_0 = 75;
229 short jbc_ASTORE_1 = 76;
230 short jbc_ASTORE_2 = 77;
231 short jbc_ASTORE_3 = 78;
232 short jbc_IASTORE = 79;
233 short jbc_LASTORE = 80;
234 short jbc_FASTORE = 81;
235 short jbc_DASTORE = 82;
236 short jbc_AASTORE = 83;
237 short jbc_BASTORE = 84;
238 short jbc_CASTORE = 85;
239 short jbc_SASTORE = 86;
240 short jbc_POP = 87;
241 short jbc_POP2 = 88;
242 short jbc_DUP = 89;
243 short jbc_DUP_X1 = 90;
244 short jbc_DUP_X2 = 91;
245 short jbc_DUP2 = 92;
246 short jbc_DUP2_X1 = 93;
247 short jbc_DUP2_X2 = 94;
248 short jbc_SWAP = 95;
249 short jbc_IADD = 96;
250 short jbc_LADD = 97;
251 short jbc_FADD = 98;
252 short jbc_DADD = 99;
253 short jbc_ISUB = 100;
254 short jbc_LSUB = 101;
255 short jbc_FSUB = 102;
256 short jbc_DSUB = 103;
257 short jbc_IMUL = 104;
258 short jbc_LMUL = 105;
259 short jbc_FMUL = 106;
260 short jbc_DMUL = 107;
261 short jbc_IDIV = 108;
262 short jbc_LDIV = 109;
263 short jbc_FDIV = 110;
264 short jbc_DDIV = 111;
265 short jbc_IREM = 112;
266 short jbc_LREM = 113;
267 short jbc_FREM = 114;
268 short jbc_DREM = 115;
269 short jbc_INEG = 116;
270 short jbc_LNEG = 117;
271 short jbc_FNEG = 118;
272 short jbc_DNEG = 119;
273 short jbc_ISHL = 120;
274 short jbc_LSHL = 121;
275 short jbc_ISHR = 122;
276 short jbc_LSHR = 123;
277 short jbc_IUSHR = 124;
278 short jbc_LUSHR = 125;
279 short jbc_IAND = 126;
280 short jbc_LAND = 127;
281 short jbc_IOR = 128;
282 short jbc_LOR = 129;
283 short jbc_IXOR = 130;
284 short jbc_LXOR = 131;
285 short jbc_IINC = 132;
286 short jbc_I2L = 133;
287 short jbc_I2F = 134;
288 short jbc_I2D = 135;
289 short jbc_L2I = 136;
290 short jbc_L2F = 137;
291 short jbc_L2D = 138;
292 short jbc_F2I = 139;
293 short jbc_F2L = 140;
294 short jbc_F2D = 141;
295 short jbc_D2I = 142;
296 short jbc_D2L = 143;
297 short jbc_D2F = 144;
298 short jbc_I2B = 145;
299 short jbc_INT2BYTE = 145; // Old notion
300 short jbc_I2C = 146;
301 short jbc_INT2CHAR = 146; // Old notion
302 short jbc_I2S = 147;
303 short jbc_INT2SHORT = 147; // Old notion
304 short jbc_LCMP = 148;
305 short jbc_FCMPL = 149;
306 short jbc_FCMPG = 150;
307 short jbc_DCMPL = 151;
308 short jbc_DCMPG = 152;
309 short jbc_IFEQ = 153;
310 short jbc_IFNE = 154;
311 short jbc_IFLT = 155;
312 short jbc_IFGE = 156;
313 short jbc_IFGT = 157;
314 short jbc_IFLE = 158;
315 short jbc_IF_ICMPEQ = 159;
316 short jbc_IF_ICMPNE = 160;
317 short jbc_IF_ICMPLT = 161;
318 short jbc_IF_ICMPGE = 162;
319 short jbc_IF_ICMPGT = 163;
320 short jbc_IF_ICMPLE = 164;
321 short jbc_IF_ACMPEQ = 165;
322 short jbc_IF_ACMPNE = 166;
323 short jbc_GOTO = 167;
324 short jbc_JSR = 168;
325 short jbc_RET = 169;
326 short jbc_TABLESWITCH = 170;
327 short jbc_LOOKUPSWITCH = 171;
328 short jbc_IRETURN = 172;
329 short jbc_LRETURN = 173;
330 short jbc_FRETURN = 174;
331 short jbc_DRETURN = 175;
332 short jbc_ARETURN = 176;
333 short jbc_RETURN = 177;
334 short jbc_GETSTATIC = 178;
335 short jbc_PUTSTATIC = 179;
336 short jbc_GETFIELD = 180;
337 short jbc_PUTFIELD = 181;
338 short jbc_INVOKEVIRTUAL = 182;
339 short jbc_INVOKESPECIAL = 183;
340 short jbc_INVOKENONVIRTUAL = 183; // Old name in JDK 1.0
341 short jbc_INVOKESTATIC = 184;
342 short jbc_INVOKEINTERFACE = 185;
343 short jbc_NEW = 187;
344 short jbc_NEWARRAY = 188;
345 short jbc_ANEWARRAY = 189;
346 short jbc_ARRAYLENGTH = 190;
347 short jbc_ATHROW = 191;
348 short jbc_CHECKCAST = 192;
349 short jbc_INSTANCEOF = 193;
350 short jbc_MONITORENTER = 194;
351 short jbc_MONITOREXIT = 195;
352 short jbc_WIDE = 196;
353 short jbc_MULTIANEWARRAY = 197;
354 short jbc_IFNULL = 198;
355 short jbc_IFNONNULL = 199;
356 short jbc_GOTO_W = 200;
357 short jbc_JSR_W = 201;
358
359 /***
360 * Non-legal opcodes, may be used by JVM internally.
361 */
362 short jbc_BREAKPOINT = 202;
363
364 /***
365 * Number of byte code operands, i.e., number of bytes after the tag byte
366 * itself.
367 */
368 short[] NO_OF_OPERANDS = {
369 0/*nop*/, 0/*aconst_null*/, 0/*iconst_m1*/, 0/*iconst_0*/,
370 0/*iconst_1*/, 0/*iconst_2*/, 0/*iconst_3*/, 0/*iconst_4*/,
371 0/*iconst_5*/, 0/*lconst_0*/, 0/*lconst_1*/, 0/*fconst_0*/,
372 0/*fconst_1*/, 0/*fconst_2*/, 0/*dconst_0*/, 0/*dconst_1*/,
373 1/*bipush*/, 2/*sipush*/, 1/*ldc*/, 2/*ldc_w*/, 2/*ldc2_w*/,
374 1/*iload*/, 1/*lload*/, 1/*fload*/, 1/*dload*/, 1/*aload*/,
375 0/*iload_0*/, 0/*iload_1*/, 0/*iload_2*/, 0/*iload_3*/,
376 0/*lload_0*/, 0/*lload_1*/, 0/*lload_2*/, 0/*lload_3*/,
377 0/*fload_0*/, 0/*fload_1*/, 0/*fload_2*/, 0/*fload_3*/,
378 0/*dload_0*/, 0/*dload_1*/, 0/*dload_2*/, 0/*dload_3*/,
379 0/*aload_0*/, 0/*aload_1*/, 0/*aload_2*/, 0/*aload_3*/,
380 0/*iaload*/, 0/*laload*/, 0/*faload*/, 0/*daload*/,
381 0/*aaload*/, 0/*baload*/, 0/*caload*/, 0/*saload*/,
382 1/*istore*/, 1/*lstore*/, 1/*fstore*/, 1/*dstore*/,
383 1/*astore*/, 0/*istore_0*/, 0/*istore_1*/, 0/*istore_2*/,
384 0/*istore_3*/, 0/*lstore_0*/, 0/*lstore_1*/, 0/*lstore_2*/,
385 0/*lstore_3*/, 0/*fstore_0*/, 0/*fstore_1*/, 0/*fstore_2*/,
386 0/*fstore_3*/, 0/*dstore_0*/, 0/*dstore_1*/, 0/*dstore_2*/,
387 0/*dstore_3*/, 0/*astore_0*/, 0/*astore_1*/, 0/*astore_2*/,
388 0/*astore_3*/, 0/*iastore*/, 0/*lastore*/, 0/*fastore*/,
389 0/*dastore*/, 0/*aastore*/, 0/*bastore*/, 0/*castore*/,
390 0/*sastore*/, 0/*pop*/, 0/*pop2*/, 0/*dup*/, 0/*dup_x1*/,
391 0/*dup_x2*/, 0/*dup2*/, 0/*dup2_x1*/, 0/*dup2_x2*/, 0/*swap*/,
392 0/*iadd*/, 0/*ladd*/, 0/*fadd*/, 0/*dadd*/, 0/*isub*/,
393 0/*lsub*/, 0/*fsub*/, 0/*dsub*/, 0/*imul*/, 0/*lmul*/,
394 0/*fmul*/, 0/*dmul*/, 0/*idiv*/, 0/*ldiv*/, 0/*fdiv*/,
395 0/*ddiv*/, 0/*irem*/, 0/*lrem*/, 0/*frem*/, 0/*drem*/,
396 0/*ineg*/, 0/*lneg*/, 0/*fneg*/, 0/*dneg*/, 0/*ishl*/,
397 0/*lshl*/, 0/*ishr*/, 0/*lshr*/, 0/*iushr*/, 0/*lushr*/,
398 0/*iand*/, 0/*land*/, 0/*ior*/, 0/*lor*/, 0/*ixor*/, 0/*lxor*/,
399 2/*iinc*/, 0/*i2l*/, 0/*i2f*/, 0/*i2d*/, 0/*l2i*/, 0/*l2f*/,
400 0/*l2d*/, 0/*f2i*/, 0/*f2l*/, 0/*f2d*/, 0/*d2i*/, 0/*d2l*/,
401 0/*d2f*/, 0/*i2b*/, 0/*i2c*/, 0/*i2s*/, 0/*lcmp*/, 0/*fcmpl*/,
402 0/*fcmpg*/, 0/*dcmpl*/, 0/*dcmpg*/, 2/*ifeq*/, 2/*ifne*/,
403 2/*iflt*/, 2/*ifge*/, 2/*ifgt*/, 2/*ifle*/, 2/*if_icmpeq*/,
404 2/*if_icmpne*/, 2/*if_icmplt*/, 2/*if_icmpge*/, 2/*if_icmpgt*/,
405 2/*if_icmple*/, 2/*if_acmpeq*/, 2/*if_acmpne*/, 2/*goto*/,
406 2/*jsr*/, 1/*ret*/, UNPREDICTABLE/*tableswitch*/, UNPREDICTABLE/*lookupswitch*/,
407 0/*ireturn*/, 0/*lreturn*/, 0/*freturn*/,
408 0/*dreturn*/, 0/*areturn*/, 0/*return*/,
409 2/*getstatic*/, 2/*putstatic*/, 2/*getfield*/,
410 2/*putfield*/, 2/*invokevirtual*/, 2/*invokespecial*/, 2/*invokestatic*/,
411 4/*invokeinterface*/, UNDEFINED, 2/*new*/,
412 1/*newarray*/, 2/*anewarray*/,
413 0/*arraylength*/, 0/*athrow*/, 2/*checkcast*/,
414 2/*instanceof*/, 0/*monitorenter*/,
415 0/*monitorexit*/, UNPREDICTABLE/*wide*/, 3/*multianewarray*/,
416 2/*ifnull*/, 2/*ifnonnull*/, 4/*goto_w*/,
417 4/*jsr_w*/, 0/*breakpoint*/, UNDEFINED,
418 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
419 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
420 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
421 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
422 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
423 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
424 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
425 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
426 UNDEFINED, UNDEFINED, RESERVED/*impdep1*/, RESERVED/*impdep2*/
427 };
428
429 /***
430 * How the byte code operands are to be interpreted.
431 */
432 short[][] TYPE_OF_OPERANDS = {
433 {}/*nop*/, {}/*aconst_null*/, {}/*iconst_m1*/, {}/*iconst_0*/,
434 {}/*iconst_1*/, {}/*iconst_2*/, {}/*iconst_3*/, {}/*iconst_4*/,
435 {}/*iconst_5*/, {}/*lconst_0*/, {}/*lconst_1*/, {}/*fconst_0*/,
436 {}/*fconst_1*/, {}/*fconst_2*/, {}/*dconst_0*/, {}/*dconst_1*/,
437 {T_BYTE}/*bipush*/, {T_SHORT}/*sipush*/, {T_BYTE}/*ldc*/,
438 {T_SHORT}/*ldc_w*/, {T_SHORT}/*ldc2_w*/,
439 {T_BYTE}/*iload*/, {T_BYTE}/*lload*/, {T_BYTE}/*fload*/,
440 {T_BYTE}/*dload*/, {T_BYTE}/*aload*/, {}/*iload_0*/,
441 {}/*iload_1*/, {}/*iload_2*/, {}/*iload_3*/, {}/*lload_0*/,
442 {}/*lload_1*/, {}/*lload_2*/, {}/*lload_3*/, {}/*fload_0*/,
443 {}/*fload_1*/, {}/*fload_2*/, {}/*fload_3*/, {}/*dload_0*/,
444 {}/*dload_1*/, {}/*dload_2*/, {}/*dload_3*/, {}/*aload_0*/,
445 {}/*aload_1*/, {}/*aload_2*/, {}/*aload_3*/, {}/*iaload*/,
446 {}/*laload*/, {}/*faload*/, {}/*daload*/, {}/*aaload*/,
447 {}/*baload*/, {}/*caload*/, {}/*saload*/, {T_BYTE}/*istore*/,
448 {T_BYTE}/*lstore*/, {T_BYTE}/*fstore*/, {T_BYTE}/*dstore*/,
449 {T_BYTE}/*astore*/, {}/*istore_0*/, {}/*istore_1*/,
450 {}/*istore_2*/, {}/*istore_3*/, {}/*lstore_0*/, {}/*lstore_1*/,
451 {}/*lstore_2*/, {}/*lstore_3*/, {}/*fstore_0*/, {}/*fstore_1*/,
452 {}/*fstore_2*/, {}/*fstore_3*/, {}/*dstore_0*/, {}/*dstore_1*/,
453 {}/*dstore_2*/, {}/*dstore_3*/, {}/*astore_0*/, {}/*astore_1*/,
454 {}/*astore_2*/, {}/*astore_3*/, {}/*iastore*/, {}/*lastore*/,
455 {}/*fastore*/, {}/*dastore*/, {}/*aastore*/, {}/*bastore*/,
456 {}/*castore*/, {}/*sastore*/, {}/*pop*/, {}/*pop2*/, {}/*dup*/,
457 {}/*dup_x1*/, {}/*dup_x2*/, {}/*dup2*/, {}/*dup2_x1*/,
458 {}/*dup2_x2*/, {}/*swap*/, {}/*iadd*/, {}/*ladd*/, {}/*fadd*/,
459 {}/*dadd*/, {}/*isub*/, {}/*lsub*/, {}/*fsub*/, {}/*dsub*/,
460 {}/*imul*/, {}/*lmul*/, {}/*fmul*/, {}/*dmul*/, {}/*idiv*/,
461 {}/*ldiv*/, {}/*fdiv*/, {}/*ddiv*/, {}/*irem*/, {}/*lrem*/,
462 {}/*frem*/, {}/*drem*/, {}/*ineg*/, {}/*lneg*/, {}/*fneg*/,
463 {}/*dneg*/, {}/*ishl*/, {}/*lshl*/, {}/*ishr*/, {}/*lshr*/,
464 {}/*iushr*/, {}/*lushr*/, {}/*iand*/, {}/*land*/, {}/*ior*/,
465 {}/*lor*/, {}/*ixor*/, {}/*lxor*/, {T_BYTE, T_BYTE}/*iinc*/,
466 {}/*i2l*/, {}/*i2f*/, {}/*i2d*/, {}/*l2i*/, {}/*l2f*/, {}/*l2d*/,
467 {}/*f2i*/, {}/*f2l*/, {}/*f2d*/, {}/*d2i*/, {}/*d2l*/, {}/*d2f*/,
468 {}/*i2b*/, {}/*i2c*/,{}/*i2s*/, {}/*lcmp*/, {}/*fcmpl*/,
469 {}/*fcmpg*/, {}/*dcmpl*/, {}/*dcmpg*/, {T_SHORT}/*ifeq*/,
470 {T_SHORT}/*ifne*/, {T_SHORT}/*iflt*/, {T_SHORT}/*ifge*/,
471 {T_SHORT}/*ifgt*/, {T_SHORT}/*ifle*/, {T_SHORT}/*if_icmpeq*/,
472 {T_SHORT}/*if_icmpne*/, {T_SHORT}/*if_icmplt*/,
473 {T_SHORT}/*if_icmpge*/, {T_SHORT}/*if_icmpgt*/,
474 {T_SHORT}/*if_icmple*/, {T_SHORT}/*if_acmpeq*/,
475 {T_SHORT}/*if_acmpne*/, {T_SHORT}/*goto*/, {T_SHORT}/*jsr*/,
476 {T_BYTE}/*ret*/, {}/*tableswitch*/, {}/*lookupswitch*/,
477 {}/*ireturn*/, {}/*lreturn*/, {}/*freturn*/, {}/*dreturn*/,
478 {}/*areturn*/, {}/*return*/, {T_SHORT}/*getstatic*/,
479 {T_SHORT}/*putstatic*/, {T_SHORT}/*getfield*/,
480 {T_SHORT}/*putfield*/, {T_SHORT}/*invokevirtual*/,
481 {T_SHORT}/*invokespecial*/, {T_SHORT}/*invokestatic*/,
482 {T_SHORT, T_BYTE, T_BYTE}/*invokeinterface*/, {},
483 {T_SHORT}/*new*/, {T_BYTE}/*newarray*/,
484 {T_SHORT}/*anewarray*/, {}/*arraylength*/, {}/*athrow*/,
485 {T_SHORT}/*checkcast*/, {T_SHORT}/*instanceof*/,
486 {}/*monitorenter*/, {}/*monitorexit*/, {T_BYTE}/*wide*/,
487 {T_SHORT, T_BYTE}/*multianewarray*/, {T_SHORT}/*ifnull*/,
488 {T_SHORT}/*ifnonnull*/, {T_INT}/*goto_w*/, {T_INT}/*jsr_w*/,
489 {}/*breakpoint*/, {}, {}, {}, {}, {}, {}, {},
490 {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},
491 {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},
492 {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},
493 {}/*impdep1*/, {}/*impdep2*/
494 };
495
496 /***
497 * Names of opcodes.
498 */
499 String[] OPCODE_NAMES = {
500 "nop", "aconst_null", "iconst_m1", "iconst_0", "iconst_1",
501 "iconst_2", "iconst_3", "iconst_4", "iconst_5", "lconst_0",
502 "lconst_1", "fconst_0", "fconst_1", "fconst_2", "dconst_0",
503 "dconst_1", "bipush", "sipush", "ldc", "ldc_w", "ldc2_w", "iload",
504 "lload", "fload", "dload", "aload", "iload_0", "iload_1", "iload_2",
505 "iload_3", "lload_0", "lload_1", "lload_2", "lload_3", "fload_0",
506 "fload_1", "fload_2", "fload_3", "dload_0", "dload_1", "dload_2",
507 "dload_3", "aload_0", "aload_1", "aload_2", "aload_3", "iaload",
508 "laload", "faload", "daload", "aaload", "baload", "caload", "saload",
509 "istore", "lstore", "fstore", "dstore", "astore", "istore_0",
510 "istore_1", "istore_2", "istore_3", "lstore_0", "lstore_1",
511 "lstore_2", "lstore_3", "fstore_0", "fstore_1", "fstore_2",
512 "fstore_3", "dstore_0", "dstore_1", "dstore_2", "dstore_3",
513 "astore_0", "astore_1", "astore_2", "astore_3", "iastore", "lastore",
514 "fastore", "dastore", "aastore", "bastore", "castore", "sastore",
515 "pop", "pop2", "dup", "dup_x1", "dup_x2", "dup2", "dup2_x1",
516 "dup2_x2", "swap", "iadd", "ladd", "fadd", "dadd", "isub", "lsub",
517 "fsub", "dsub", "imul", "lmul", "fmul", "dmul", "idiv", "ldiv",
518 "fdiv", "ddiv", "irem", "lrem", "frem", "drem", "ineg", "lneg",
519 "fneg", "dneg", "ishl", "lshl", "ishr", "lshr", "iushr", "lushr",
520 "iand", "land", "ior", "lor", "ixor", "lxor", "iinc", "i2l", "i2f",
521 "i2d", "l2i", "l2f", "l2d", "f2i", "f2l", "f2d", "d2i", "d2l", "d2f",
522 "i2b", "i2c", "i2s", "lcmp", "fcmpl", "fcmpg",
523 "dcmpl", "dcmpg", "ifeq", "ifne", "iflt", "ifge", "ifgt", "ifle",
524 "if_icmpeq", "if_icmpne", "if_icmplt", "if_icmpge", "if_icmpgt",
525 "if_icmple", "if_acmpeq", "if_acmpne", "goto", "jsr", "ret",
526 "tableswitch", "lookupswitch", "ireturn", "lreturn", "freturn",
527 "dreturn", "areturn", "return", "getstatic", "putstatic", "getfield",
528 "putfield", "invokevirtual", "invokespecial", "invokestatic",
529 "invokeinterface", ILLEGAL_OPCODE, "new", "newarray", "anewarray",
530 "arraylength", "athrow", "checkcast", "instanceof", "monitorenter",
531 "monitorexit", "wide", "multianewarray", "ifnull", "ifnonnull",
532 "goto_w", "jsr_w", "breakpoint", ILLEGAL_OPCODE, ILLEGAL_OPCODE,
533 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
534 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
535 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
536 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
537 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
538 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
539 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
540 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
541 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
542 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
543 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
544 ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
545 ILLEGAL_OPCODE, "impdep1", "impdep2"
546 };
547
548 /***
549 * Number of words consumed on operand stack by instructions.
550 */
551 int[] CONSUME_STACK = {
552 0/*nop*/, 0/*aconst_null*/, 0/*iconst_m1*/, 0/*iconst_0*/, 0/*iconst_1*/,
553 0/*iconst_2*/, 0/*iconst_3*/, 0/*iconst_4*/, 0/*iconst_5*/, 0/*lconst_0*/,
554 0/*lconst_1*/, 0/*fconst_0*/, 0/*fconst_1*/, 0/*fconst_2*/, 0/*dconst_0*/,
555 0/*dconst_1*/, 0/*bipush*/, 0/*sipush*/, 0/*ldc*/, 0/*ldc_w*/, 0/*ldc2_w*/, 0/*iload*/,
556 0/*lload*/, 0/*fload*/, 0/*dload*/, 0/*aload*/, 0/*iload_0*/, 0/*iload_1*/, 0/*iload_2*/,
557 0/*iload_3*/, 0/*lload_0*/, 0/*lload_1*/, 0/*lload_2*/, 0/*lload_3*/, 0/*fload_0*/,
558 0/*fload_1*/, 0/*fload_2*/, 0/*fload_3*/, 0/*dload_0*/, 0/*dload_1*/, 0/*dload_2*/,
559 0/*dload_3*/, 0/*aload_0*/, 0/*aload_1*/, 0/*aload_2*/, 0/*aload_3*/, 2/*iaload*/,
560 2/*laload*/, 2/*faload*/, 2/*daload*/, 2/*aaload*/, 2/*baload*/, 2/*caload*/, 2/*saload*/,
561 1/*istore*/, 2/*lstore*/, 1/*fstore*/, 2/*dstore*/, 1/*astore*/, 1/*istore_0*/,
562 1/*istore_1*/, 1/*istore_2*/, 1/*istore_3*/, 2/*lstore_0*/, 2/*lstore_1*/,
563 2/*lstore_2*/, 2/*lstore_3*/, 1/*fstore_0*/, 1/*fstore_1*/, 1/*fstore_2*/,
564 1/*fstore_3*/, 2/*dstore_0*/, 2/*dstore_1*/, 2/*dstore_2*/, 2/*dstore_3*/,
565 1/*astore_0*/, 1/*astore_1*/, 1/*astore_2*/, 1/*astore_3*/, 3/*iastore*/, 4/*lastore*/,
566 3/*fastore*/, 4/*dastore*/, 3/*aastore*/, 3/*bastore*/, 3/*castore*/, 3/*sastore*/,
567 1/*pop*/, 2/*pop2*/, 1/*dup*/, 2/*dup_x1*/, 3/*dup_x2*/, 2/*dup2*/, 3/*dup2_x1*/,
568 4/*dup2_x2*/, 2/*swap*/, 2/*iadd*/, 4/*ladd*/, 2/*fadd*/, 4/*dadd*/, 2/*isub*/, 4/*lsub*/,
569 2/*fsub*/, 4/*dsub*/, 2/*imul*/, 4/*lmul*/, 2/*fmul*/, 4/*dmul*/, 2/*idiv*/, 4/*ldiv*/,
570 2/*fdiv*/, 4/*ddiv*/, 2/*irem*/, 4/*lrem*/, 2/*frem*/, 4/*drem*/, 1/*ineg*/, 2/*lneg*/,
571 1/*fneg*/, 2/*dneg*/, 2/*ishl*/, 3/*lshl*/, 2/*ishr*/, 3/*lshr*/, 2/*iushr*/, 3/*lushr*/,
572 2/*iand*/, 4/*land*/, 2/*ior*/, 4/*lor*/, 2/*ixor*/, 4/*lxor*/, 0/*iinc*/,
573 1/*i2l*/, 1/*i2f*/, 1/*i2d*/, 2/*l2i*/, 2/*l2f*/, 2/*l2d*/, 1/*f2i*/, 1/*f2l*/,
574 1/*f2d*/, 2/*d2i*/, 2/*d2l*/, 2/*d2f*/, 1/*i2b*/, 1/*i2c*/, 1/*i2s*/,
575 4/*lcmp*/, 2/*fcmpl*/, 2/*fcmpg*/, 4/*dcmpl*/, 4/*dcmpg*/, 1/*ifeq*/, 1/*ifne*/,
576 1/*iflt*/, 1/*ifge*/, 1/*ifgt*/, 1/*ifle*/, 2/*if_icmpeq*/, 2/*if_icmpne*/, 2/*if_icmplt*/,
577 2 /*if_icmpge*/, 2/*if_icmpgt*/, 2/*if_icmple*/, 2/*if_acmpeq*/, 2/*if_acmpne*/,
578 0/*goto*/, 0/*jsr*/, 0/*ret*/, 1/*tableswitch*/, 1/*lookupswitch*/, 1/*ireturn*/,
579 2/*lreturn*/, 1/*freturn*/, 2/*dreturn*/, 1/*areturn*/, 0/*return*/, 0/*getstatic*/,
580 UNPREDICTABLE/*putstatic*/, 1/*getfield*/, UNPREDICTABLE/*putfield*/,
581 UNPREDICTABLE/*invokevirtual*/, UNPREDICTABLE/*invokespecial*/,
582 UNPREDICTABLE/*invokestatic*/,
583 UNPREDICTABLE/*invokeinterface*/, UNDEFINED, 0/*new*/, 1/*newarray*/, 1/*anewarray*/,
584 1/*arraylength*/, 1/*athrow*/, 1/*checkcast*/, 1/*instanceof*/, 1/*monitorenter*/,
585 1/*monitorexit*/, 0/*wide*/, UNPREDICTABLE/*multianewarray*/, 1/*ifnull*/, 1/*ifnonnull*/,
586 0/*goto_w*/, 0/*jsr_w*/, 0/*breakpoint*/, UNDEFINED, UNDEFINED,
587 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
588 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
589 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
590 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
591 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
592 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
593 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
594 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
595 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
596 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
597 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
598 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
599 UNDEFINED, UNPREDICTABLE/*impdep1*/, UNPREDICTABLE/*impdep2*/
600 };
601
602 /***
603 * Number of words produced onto operand stack by instructions.
604 */
605 int[] PRODUCE_STACK = {
606 0/*nop*/, 1/*aconst_null*/, 1/*iconst_m1*/, 1/*iconst_0*/, 1/*iconst_1*/,
607 1/*iconst_2*/, 1/*iconst_3*/, 1/*iconst_4*/, 1/*iconst_5*/, 2/*lconst_0*/,
608 2/*lconst_1*/, 1/*fconst_0*/, 1/*fconst_1*/, 1/*fconst_2*/, 2/*dconst_0*/,
609 2/*dconst_1*/, 1/*bipush*/, 1/*sipush*/, 1/*ldc*/, 1/*ldc_w*/, 2/*ldc2_w*/, 1/*iload*/,
610 2/*lload*/, 1/*fload*/, 2/*dload*/, 1/*aload*/, 1/*iload_0*/, 1/*iload_1*/, 1/*iload_2*/,
611 1/*iload_3*/, 2/*lload_0*/, 2/*lload_1*/, 2/*lload_2*/, 2/*lload_3*/, 1/*fload_0*/,
612 1/*fload_1*/, 1/*fload_2*/, 1/*fload_3*/, 2/*dload_0*/, 2/*dload_1*/, 2/*dload_2*/,
613 2/*dload_3*/, 1/*aload_0*/, 1/*aload_1*/, 1/*aload_2*/, 1/*aload_3*/, 1/*iaload*/,
614 2/*laload*/, 1/*faload*/, 2/*daload*/, 1/*aaload*/, 1/*baload*/, 1/*caload*/, 1/*saload*/,
615 0/*istore*/, 0/*lstore*/, 0/*fstore*/, 0/*dstore*/, 0/*astore*/, 0/*istore_0*/,
616 0/*istore_1*/, 0/*istore_2*/, 0/*istore_3*/, 0/*lstore_0*/, 0/*lstore_1*/,
617 0/*lstore_2*/, 0/*lstore_3*/, 0/*fstore_0*/, 0/*fstore_1*/, 0/*fstore_2*/,
618 0/*fstore_3*/, 0/*dstore_0*/, 0/*dstore_1*/, 0/*dstore_2*/, 0/*dstore_3*/,
619 0/*astore_0*/, 0/*astore_1*/, 0/*astore_2*/, 0/*astore_3*/, 0/*iastore*/, 0/*lastore*/,
620 0/*fastore*/, 0/*dastore*/, 0/*aastore*/, 0/*bastore*/, 0/*castore*/, 0/*sastore*/,
621 0/*pop*/, 0/*pop2*/, 2/*dup*/, 3/*dup_x1*/, 4/*dup_x2*/, 4/*dup2*/, 5/*dup2_x1*/,
622 6/*dup2_x2*/, 2/*swap*/, 1/*iadd*/, 2/*ladd*/, 1/*fadd*/, 2/*dadd*/, 1/*isub*/, 2/*lsub*/,
623 1/*fsub*/, 2/*dsub*/, 1/*imul*/, 2/*lmul*/, 1/*fmul*/, 2/*dmul*/, 1/*idiv*/, 2/*ldiv*/,
624 1/*fdiv*/, 2/*ddiv*/, 1/*irem*/, 2/*lrem*/, 1/*frem*/, 2/*drem*/, 1/*ineg*/, 2/*lneg*/,
625 1/*fneg*/, 2/*dneg*/, 1/*ishl*/, 2/*lshl*/, 1/*ishr*/, 2/*lshr*/, 1/*iushr*/, 2/*lushr*/,
626 1/*iand*/, 2/*land*/, 1/*ior*/, 2/*lor*/, 1/*ixor*/, 2/*lxor*/,
627 0/*iinc*/, 2/*i2l*/, 1/*i2f*/, 2/*i2d*/, 1/*l2i*/, 1/*l2f*/, 2/*l2d*/, 1/*f2i*/,
628 2/*f2l*/, 2/*f2d*/, 1/*d2i*/, 2/*d2l*/, 1/*d2f*/,
629 1/*i2b*/, 1/*i2c*/, 1/*i2s*/, 1/*lcmp*/, 1/*fcmpl*/, 1/*fcmpg*/,
630 1/*dcmpl*/, 1/*dcmpg*/, 0/*ifeq*/, 0/*ifne*/, 0/*iflt*/, 0/*ifge*/, 0/*ifgt*/, 0/*ifle*/,
631 0/*if_icmpeq*/, 0/*if_icmpne*/, 0/*if_icmplt*/, 0/*if_icmpge*/, 0/*if_icmpgt*/,
632 0/*if_icmple*/, 0/*if_acmpeq*/, 0/*if_acmpne*/, 0/*goto*/, 1/*jsr*/, 0/*ret*/,
633 0/*tableswitch*/, 0/*lookupswitch*/, 0/*ireturn*/, 0/*lreturn*/, 0/*freturn*/,
634 0/*dreturn*/, 0/*areturn*/, 0/*return*/, UNPREDICTABLE/*getstatic*/, 0/*putstatic*/,
635 UNPREDICTABLE/*getfield*/, 0/*putfield*/, UNPREDICTABLE/*invokevirtual*/,
636 UNPREDICTABLE/*invokespecial*/, UNPREDICTABLE/*invokestatic*/,
637 UNPREDICTABLE/*invokeinterface*/, UNDEFINED, 1/*new*/, 1/*newarray*/, 1/*anewarray*/,
638 1/*arraylength*/, 1/*athrow*/, 1/*checkcast*/, 1/*instanceof*/, 0/*monitorenter*/,
639 0/*monitorexit*/, 0/*wide*/, 1/*multianewarray*/, 0/*ifnull*/, 0/*ifnonnull*/,
640 0/*goto_w*/, 1/*jsr_w*/, 0/*breakpoint*/, UNDEFINED, UNDEFINED,
641 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
642 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
643 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
644 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
645 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
646 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
647 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
648 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
649 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
650 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
651 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
652 UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
653 UNDEFINED, UNPREDICTABLE/*impdep1*/, UNPREDICTABLE/*impdep2*/
654 };
655
656 }