summaryrefslogtreecommitdiffstats
path: root/src/de/fernflower/code/CodeConstants.java
blob: a6617f1014b550e14afb0fa650fba06510f1f0d5 (plain)
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
/*
 *    Fernflower - The Analytical Java Decompiler
 *    http://www.reversed-java.com
 *
 *    (C) 2008 - 2010, Stiver
 *
 *    This software is NEITHER public domain NOR free software 
 *    as per GNU License. See license.txt for more details.
 *
 *    This software is distributed WITHOUT ANY WARRANTY; without 
 *    even the implied warranty of MERCHANTABILITY or FITNESS FOR 
 *    A PARTICULAR PURPOSE. 
 */

package de.fernflower.code;

public interface CodeConstants {

	// ----------------------------------------------------------------------
	// VARIABLE TYPES
	// ----------------------------------------------------------------------

	public final static int TYPE_BYTE = 0;
	public final static int TYPE_CHAR = 1;
	public final static int TYPE_DOUBLE = 2;
	public final static int TYPE_FLOAT = 3;
	public final static int TYPE_INT = 4;
	public final static int TYPE_LONG = 5;
	public final static int TYPE_SHORT = 6;
	public final static int TYPE_BOOLEAN = 7;
	public final static int TYPE_OBJECT = 8;
	public final static int TYPE_ADDRESS = 9;
	public final static int TYPE_VOID = 10;
	public final static int TYPE_ANY = 11;
	public final static int TYPE_GROUP2EMPTY = 12;
	public final static int TYPE_NULL = 13;
	public final static int TYPE_NOTINITIALIZED = 14;
	public final static int TYPE_BYTECHAR = 15;
	public final static int TYPE_SHORTCHAR = 16;
	public final static int TYPE_UNKNOWN = 17;
	public final static int TYPE_GENVAR = 18;

	// ----------------------------------------------------------------------
	// VARIABLE TYPE FAMILIES
	// ----------------------------------------------------------------------

	public final static int TYPE_FAMILY_UNKNOWN = 0;
	public final static int TYPE_FAMILY_BOOLEAN = 1;
	public final static int TYPE_FAMILY_INTEGER = 2;
	public final static int TYPE_FAMILY_FLOAT = 3;
	public final static int TYPE_FAMILY_LONG = 4;
	public final static int TYPE_FAMILY_DOUBLE = 5;
	public final static int TYPE_FAMILY_OBJECT = 6;
	
	// ----------------------------------------------------------------------
	// MODULE CONSTANTS
	// ----------------------------------------------------------------------

	public final static int STACKSIZE_SIMPLE = 1;
	public final static int STACKSIZE_DOUBLE = 2;
	
	public final static int VAR_LOCAL = 0;
	public final static int VAR_STACK = 1;
	
	public final static int VAR_WRITE = 0;
	public final static int VAR_READ = 1;
	
	
	// ----------------------------------------------------------------------
	// ACCESS FLAGS
	// ----------------------------------------------------------------------
	
	public final static int ACC_PUBLIC = 0x0001;
	public final static int ACC_PRIVATE = 0x0002;
	public final static int ACC_PROTECTED = 0x0004;
	public final static int ACC_STATIC = 0x0008;
	public final static int ACC_FINAL = 0x0010;
	public final static int ACC_SYNCHRONIZED = 0x0020;
	public final static int ACC_NATIVE = 0x0100;
	public final static int ACC_ABSTRACT = 0x0400;
	public final static int ACC_STRICT = 0x0800;  
	public final static int ACC_VOLATILE = 0x0040;  
	public final static int ACC_BRIDGE = 0x0040;
	public final static int ACC_TRANSIENT = 0x0080;  
	public final static int ACC_VARARGS = 0x0080;
	public final static int ACC_SYNTHETIC = 0x1000;	
	public final static int ACC_ANNOTATION = 0x2000;	
	public final static int ACC_ENUM = 0x4000;	

	// ----------------------------------------------------------------------
	// CLASS FLAGS
	// ----------------------------------------------------------------------
	
	public final static int ACC_SUPER = 0x0020;  
	public final static int ACC_INTERFACE = 0x0200;  
	

	// ----------------------------------------------------------------------
	// DEPENDENCY CONSTANTS
	// ----------------------------------------------------------------------
	
	public final static int		DEP_CONSTANT = 0;
	public final static int		DEP_UNKNOWN = 1;
	public final static int		DEP_GENERAL = 2;
	public final static int		DEP_PARAMS = 4;
	public final static int		DEP_STATIC = 8;

	// ----------------------------------------------------------------------
	// INSTRUCTION GROUPS
	// ----------------------------------------------------------------------
	
	public final static int		GROUP_GENERAL = 1;
	public final static int		GROUP_JUMP = 2;
	public final static int		GROUP_SWITCH = 3;
	public final static int		GROUP_INVOCATION = 4;
	public final static int		GROUP_FIELDACCESS = 5;
	public final static int		GROUP_RETURN = 6;
	
	// ----------------------------------------------------------------------
	// POOL CONSTANTS
	// ----------------------------------------------------------------------
	
	public final static int		CONSTANT_Utf8 = 1;
	public final static int		CONSTANT_Integer = 3;
	public final static int		CONSTANT_Float = 4;
	public final static int		CONSTANT_Long = 5;
	public final static int		CONSTANT_Double = 6;
	public final static int		CONSTANT_Class = 7;
	public final static int		CONSTANT_String = 8;
	public final static int		CONSTANT_Fieldref = 9;
	public final static int		CONSTANT_Methodref = 10;
	public final static int		CONSTANT_InterfaceMethodref	 = 11;
	public final static int		CONSTANT_NameAndType = 12;
	public final static int		CONSTANT_MethodHandle = 15;
	public final static int		CONSTANT_MethodType = 16;
	public final static int		CONSTANT_InvokeDynamic = 18;
	
	
	// ----------------------------------------------------------------------
	// VM OPCODES
	// ----------------------------------------------------------------------

	public final static int		opc_nop = 0;	
	public final static int		opc_aconst_null = 1;	
	public final static int		opc_iconst_m1 = 2;   
	public final static int		opc_iconst_0 = 3;    
	public final static int		opc_iconst_1 = 4;    
	public final static int		opc_iconst_2 = 5;    
	public final static int		opc_iconst_3 = 6;    
	public final static int		opc_iconst_4 = 7;	 
	public final static int		opc_iconst_5 = 8;    
	public final static int		opc_lconst_0 = 9;    
	public final static int		opc_lconst_1 = 10;    
	public final static int		opc_fconst_0 = 11;    
	public final static int		opc_fconst_1 = 12;    
	public final static int		opc_fconst_2 = 13;    
	public final static int		opc_dconst_0 = 14;    
	public final static int		opc_dconst_1 = 15;    
	public final static int		opc_bipush = 16;	
	public final static int		opc_sipush = 17;	
	public final static int		opc_ldc = 18;		
	public final static int		opc_ldc_w = 19;		
	public final static int		opc_ldc2_w = 20;	
	public final static int		opc_iload = 21;		
	public final static int		opc_lload = 22;		
	public final static int		opc_fload = 23;		
	public final static int		opc_dload = 24;		
	public final static int		opc_aload = 25;		
	public final static int		opc_iload_0 = 26;		
	public final static int		opc_iload_1 = 27;		
	public final static int		opc_iload_2 = 28;		
	public final static int		opc_iload_3 = 29;		
	public final static int		opc_lload_0 = 30;		
	public final static int		opc_lload_1 = 31;		
	public final static int		opc_lload_2 = 32;		
	public final static int		opc_lload_3 = 33;		
	public final static int		opc_fload_0 = 34;		
	public final static int		opc_fload_1 = 35;		
	public final static int		opc_fload_2 = 36;		
	public final static int		opc_fload_3 = 37;		
	public final static int		opc_dload_0 = 38;		
	public final static int		opc_dload_1 = 39;		
	public final static int		opc_dload_2 = 40;		
	public final static int		opc_dload_3 = 41;		
	public final static int		opc_aload_0 = 42;		
	public final static int		opc_aload_1 = 43;		
	public final static int		opc_aload_2 = 44;		
	public final static int		opc_aload_3 = 45;		
	public final static int		opc_iaload = 46;		
	public final static int		opc_laload = 47;		
	public final static int		opc_faload = 48;		
	public final static int		opc_daload = 49;		
	public final static int		opc_aaload = 50;		
	public final static int		opc_baload = 51;		
	public final static int		opc_caload = 52;		
	public final static int		opc_saload = 53;		
	public final static int		opc_istore = 54;		
	public final static int		opc_lstore = 55;		
	public final static int		opc_fstore = 56;		
	public final static int		opc_dstore = 57;		
	public final static int		opc_astore = 58;		
	public final static int		opc_istore_0 = 59;		
	public final static int		opc_istore_1 = 60;		
	public final static int		opc_istore_2 = 61;		
	public final static int		opc_istore_3 = 62;		
	public final static int		opc_lstore_0 = 63;		
	public final static int		opc_lstore_1 = 64;		
	public final static int		opc_lstore_2 = 65;		
	public final static int		opc_lstore_3 = 66;		
	public final static int		opc_fstore_0 = 67;		
	public final static int		opc_fstore_1 = 68;		
	public final static int		opc_fstore_2 = 69;		
	public final static int		opc_fstore_3 = 70;		
	public final static int		opc_dstore_0 = 71;		
	public final static int		opc_dstore_1 = 72;		
	public final static int		opc_dstore_2 = 73;		
	public final static int		opc_dstore_3 = 74;		
	public final static int		opc_astore_0 = 75;		
	public final static int		opc_astore_1 = 76;		
	public final static int		opc_astore_2 = 77;		
	public final static int		opc_astore_3 = 78;		
	public final static int		opc_iastore = 79;		
	public final static int		opc_lastore = 80;		
	public final static int		opc_fastore = 81;		
	public final static int		opc_dastore = 82;		
	public final static int		opc_aastore = 83;		
	public final static int		opc_bastore = 84;		
	public final static int		opc_castore = 85;		
	public final static int		opc_sastore = 86;		
	public final static int		opc_pop = 87;		
	public final static int		opc_pop2 = 88;		
	public final static int		opc_dup = 89;		
	public final static int		opc_dup_x1 = 90;		
	public final static int		opc_dup_x2 = 91;		
	public final static int		opc_dup2 = 92;		
	public final static int		opc_dup2_x1 = 93;		
	public final static int		opc_dup2_x2 = 94;		
	public final static int		opc_swap = 95;		
	public final static int		opc_iadd = 96;		
	public final static int		opc_ladd = 97;		
	public final static int		opc_fadd = 98;		
	public final static int		opc_dadd = 99;		
	public final static int		opc_isub = 100;		
	public final static int		opc_lsub = 101;		
	public final static int		opc_fsub = 102;		
	public final static int		opc_dsub = 103;		
	public final static int		opc_imul = 104;		
	public final static int		opc_lmul = 105;		
	public final static int		opc_fmul = 106;		
	public final static int		opc_dmul = 107;		
	public final static int		opc_idiv = 108;		
	public final static int		opc_ldiv = 109;		
	public final static int		opc_fdiv = 110;		
	public final static int		opc_ddiv = 111;		
	public final static int		opc_irem = 112;		
	public final static int		opc_lrem = 113;		
	public final static int		opc_frem = 114;		
	public final static int		opc_drem = 115;		
	public final static int		opc_ineg = 116;		
	public final static int		opc_lneg = 117;		
	public final static int		opc_fneg = 118;		
	public final static int		opc_dneg = 119;		
	public final static int		opc_ishl = 120;		
	public final static int		opc_lshl = 121;		
	public final static int		opc_ishr = 122;		
	public final static int		opc_lshr = 123;		
	public final static int		opc_iushr = 124;		
	public final static int		opc_lushr = 125;		
	public final static int		opc_iand = 126;		
	public final static int		opc_land = 127;		
	public final static int		opc_ior = 128;		
	public final static int		opc_lor = 129;		
	public final static int		opc_ixor = 130;		
	public final static int		opc_lxor = 131;		
	public final static int		opc_iinc = 132;		
	public final static int		opc_i2l = 133;		
	public final static int		opc_i2f = 134;		
	public final static int		opc_i2d = 135;		
	public final static int		opc_l2i = 136;		
	public final static int		opc_l2f = 137;		
	public final static int		opc_l2d = 138;		
	public final static int		opc_f2i = 139;		
	public final static int		opc_f2l = 140;		
	public final static int		opc_f2d = 141;		
	public final static int		opc_d2i = 142;		
	public final static int		opc_d2l = 143;		
	public final static int		opc_d2f = 144;		
	public final static int		opc_i2b = 145;		
	public final static int		opc_i2c = 146;		
	public final static int		opc_i2s = 147;		
	public final static int		opc_lcmp = 148;		
	public final static int		opc_fcmpl = 149;		
	public final static int		opc_fcmpg = 150;		
	public final static int		opc_dcmpl = 151;		
	public final static int		opc_dcmpg = 152;		
	public final static int		opc_ifeq = 153;		
	public final static int		opc_ifne = 154;		
	public final static int		opc_iflt = 155;		
	public final static int		opc_ifge = 156;		
	public final static int		opc_ifgt = 157;		
	public final static int		opc_ifle = 158;		
	public final static int		opc_if_icmpeq = 159;		
	public final static int		opc_if_icmpne = 160;		
	public final static int		opc_if_icmplt = 161;		
	public final static int		opc_if_icmpge = 162;		
	public final static int		opc_if_icmpgt = 163;		
	public final static int		opc_if_icmple = 164;		
	public final static int		opc_if_acmpeq = 165;		
	public final static int		opc_if_acmpne = 166;		
	public final static int		opc_goto = 167;				
	public final static int		opc_jsr = 168;				
	public final static int		opc_ret = 169;				
	public final static int		opc_tableswitch = 170;		
	public final static int		opc_lookupswitch = 171;		
	public final static int		opc_ireturn = 172;			
	public final static int		opc_lreturn = 173;			
	public final static int		opc_freturn = 174;			
	public final static int		opc_dreturn = 175;			
	public final static int		opc_areturn = 176;			
	public final static int		opc_return = 177;			
	public final static int		opc_getstatic = 178;		
	public final static int		opc_putstatic = 179;		
	public final static int		opc_getfield = 180;			
	public final static int		opc_putfield = 181;			
	public final static int		opc_invokevirtual = 182;	
	public final static int		opc_invokespecial = 183;	
	public final static int		opc_invokestatic = 184;		
	public final static int		opc_invokeinterface = 185;	
	public final static int		opc_xxxunusedxxx = 186;		
	public final static int		opc_new = 187;				
	public final static int		opc_newarray = 188;			
	public final static int		opc_anewarray = 189;		
	public final static int		opc_arraylength = 190;		
	public final static int		opc_athrow = 191;			
	public final static int		opc_checkcast = 192;		
	public final static int		opc_instanceof = 193;		
	public final static int		opc_monitorenter = 194;		
	public final static int		opc_monitorexit = 195;		
	public final static int		opc_wide = 196;				
	public final static int		opc_multianewarray = 197;	
	public final static int		opc_ifnull = 198;			
	public final static int		opc_ifnonnull = 199;		
	public final static int		opc_goto_w = 200;			
	public final static int		opc_jsr_w = 201;			
	
	
}