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