summaryrefslogtreecommitdiff
path: root/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/interpreter/InstructionImpact.java
blob: 1af23a4cdb270507acb0bcb3fb5e6170ea8269a2 (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
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
/*
 * Copyright 2000-2014 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jetbrains.java.decompiler.code.interpreter;

import org.jetbrains.java.decompiler.code.CodeConstants;
import org.jetbrains.java.decompiler.code.Instruction;
import org.jetbrains.java.decompiler.struct.consts.ConstantPool;
import org.jetbrains.java.decompiler.struct.consts.LinkConstant;
import org.jetbrains.java.decompiler.struct.consts.PrimitiveConstant;
import org.jetbrains.java.decompiler.struct.gen.DataPoint;
import org.jetbrains.java.decompiler.struct.gen.MethodDescriptor;
import org.jetbrains.java.decompiler.struct.gen.VarType;
import org.jetbrains.java.decompiler.util.ListStack;

public class InstructionImpact {

  // {read, write}
  private static final int[][][] stack_impact = {

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

  private static final int[] arr_type = new int[]{
    CodeConstants.TYPE_BOOLEAN,
    CodeConstants.TYPE_CHAR,
    CodeConstants.TYPE_FLOAT,
    CodeConstants.TYPE_DOUBLE,
    CodeConstants.TYPE_BYTE,
    CodeConstants.TYPE_SHORT,
    CodeConstants.TYPE_INT,
    CodeConstants.TYPE_LONG
  };


  // Sonderbehandlung
  //	null,			//		public final static int		opc_aconst_null = 1;
  //	null, 			//		public final static int		opc_ldc = 18;
  //	null, 			//		public final static int		opc_ldc_w = 19;
  //	null, 			//		public final static int		opc_ldc2_w = 20;
  //	null,			//		public final static int		opc_aload = 25;
  //	null,			//		public final static int		opc_aaload = 50;
  //	null,			//		public final static int		opc_astore = 58;
  //	null, 			//		public final static int		opc_dup = 89;
  //	null, 			//		public final static int		opc_dup_x1 = 90;
  //	null, 			//		public final static int		opc_dup_x2 = 91;
  //	null, 			//		public final static int		opc_dup2 = 92;
  //	null, 			//		public final static int		opc_dup2_x1 = 93;
  //	null, 			//		public final static int		opc_dup2_x2 = 94;
  //	null, 			//		public final static int		opc_swap = 95;
  //	null, 			//		public final static int		opc_getstatic = 178;
  //	null, 			//		public final static int		opc_putstatic = 179;
  //	null, 			//		public final static int		opc_getfield = 180;
  //	null, 			//		public final static int		opc_putfield = 181;
  //	null, 			//		public final static int		opc_invokevirtual = 182;
  //	null, 			//		public final static int		opc_invokespecial = 183;
  //	null, 			//		public final static int		opc_invokestatic = 184;
  //	null, 			//		public final static int		opc_invokeinterface = 185;
  //	null,			//		public final static int		opc_new = 187;
  //	null,			//		public final static int		opc_newarray = 188;
  //	null,			//		public final static int		opc_anewarray = 189;
  //	null, 			//		public final static int		opc_athrow = 191;
  //	null,			//		public final static int		opc_checkcast = 192;
  //	null,			//		public final static int		opc_instanceof = 193;
  //	null, 			//		public final static int		opc_multianewarray = 197;


  public static void stepTypes(DataPoint data, Instruction instr, ConstantPool pool) {

    ListStack<VarType> stack = data.getStack();
    int[][] arr = stack_impact[instr.opcode];

    if (arr != null) {
      // simple types only

      int[] read = arr[0];
      int[] write = arr[1];

      if (read != null) {
        int depth = 0;
        for (int i = 0; i < read.length; i++) {
          int type = read[i];
          depth++;
          if (type == CodeConstants.TYPE_LONG ||
              type == CodeConstants.TYPE_DOUBLE) {
            depth++;
          }
        }

        stack.removeMultiple(depth);
      }

      if (write != null) {
        for (int i = 0; i < write.length; i++) {
          int type = write[i];
          stack.push(new VarType(type));
          if (type == CodeConstants.TYPE_LONG ||
              type == CodeConstants.TYPE_DOUBLE) {
            stack.push(new VarType(CodeConstants.TYPE_GROUP2EMPTY));
          }
        }
      }
    }
    else {
      // Sonderbehandlung
      processSpecialInstructions(data, instr, pool);
    }
  }

  private static void processSpecialInstructions(DataPoint data, Instruction instr, ConstantPool pool) {

    VarType var1;
    PrimitiveConstant cn;
    LinkConstant ck;

    ListStack<VarType> stack = data.getStack();

    switch (instr.opcode) {
      case CodeConstants.opc_aconst_null:
        stack.push(new VarType(CodeConstants.TYPE_NULL, 0, null));
        break;
      case CodeConstants.opc_ldc:
      case CodeConstants.opc_ldc_w:
      case CodeConstants.opc_ldc2_w:
        cn = pool.getPrimitiveConstant(instr.getOperand(0));
        switch (cn.type) {
          case CodeConstants.CONSTANT_Integer:
            stack.push(new VarType(CodeConstants.TYPE_INT));
            break;
          case CodeConstants.CONSTANT_Float:
            stack.push(new VarType(CodeConstants.TYPE_FLOAT));
            break;
          case CodeConstants.CONSTANT_Long:
            stack.push(new VarType(CodeConstants.TYPE_LONG));
            stack.push(new VarType(CodeConstants.TYPE_GROUP2EMPTY));
            break;
          case CodeConstants.CONSTANT_Double:
            stack.push(new VarType(CodeConstants.TYPE_DOUBLE));
            stack.push(new VarType(CodeConstants.TYPE_GROUP2EMPTY));
            break;
          case CodeConstants.CONSTANT_String:
            stack.push(new VarType(CodeConstants.TYPE_OBJECT, 0, "java/lang/String"));
            break;
          case CodeConstants.CONSTANT_Class:
            stack.push(new VarType(CodeConstants.TYPE_OBJECT, 0, "java/lang/Class"));
            break;
        }
        break;
      case CodeConstants.opc_aload:
        var1 = data.getVariable(instr.getOperand(0));
        if (var1 != null) {
          stack.push(var1);
        }
        else {
          stack.push(new VarType(CodeConstants.TYPE_OBJECT, 0, null));
        }
        break;
      case CodeConstants.opc_aaload:
        var1 = stack.pop(2);
        stack.push(new VarType(var1.type, var1.arraydim - 1, var1.value));
        break;
      case CodeConstants.opc_astore:
        data.setVariable(instr.getOperand(0), stack.pop());
        break;
      case CodeConstants.opc_dup:
      case CodeConstants.opc_dup_x1:
      case CodeConstants.opc_dup_x2:
        int depth1 = 88 - instr.opcode;
        stack.insertByOffset(depth1, stack.getByOffset(-1).copy());
        break;
      case CodeConstants.opc_dup2:
      case CodeConstants.opc_dup2_x1:
      case CodeConstants.opc_dup2_x2:
        int depth2 = 90 - instr.opcode;
        stack.insertByOffset(depth2, stack.getByOffset(-2).copy());
        stack.insertByOffset(depth2, stack.getByOffset(-1).copy());
        break;
      case CodeConstants.opc_swap:
        var1 = stack.pop();
        stack.insertByOffset(-1, var1);
        break;
      case CodeConstants.opc_getfield:
        stack.pop();
      case CodeConstants.opc_getstatic:
        ck = pool.getLinkConstant(instr.getOperand(0));
        var1 = new VarType(ck.descriptor);
        stack.push(var1);
        if (var1.stack_size == 2) {
          stack.push(new VarType(CodeConstants.TYPE_GROUP2EMPTY));
        }
        break;
      case CodeConstants.opc_putfield:
        stack.pop();
      case CodeConstants.opc_putstatic:
        ck = pool.getLinkConstant(instr.getOperand(0));
        var1 = new VarType(ck.descriptor);
        stack.pop(var1.stack_size);
        break;
      case CodeConstants.opc_invokevirtual:
      case CodeConstants.opc_invokespecial:
      case CodeConstants.opc_invokeinterface:
        stack.pop();
      case CodeConstants.opc_invokestatic:
      case CodeConstants.opc_invokedynamic:
        if (instr.opcode != CodeConstants.opc_invokedynamic || instr.bytecode_version >= CodeConstants.BYTECODE_JAVA_7) {
          ck = pool.getLinkConstant(instr.getOperand(0));
          MethodDescriptor md = MethodDescriptor.parseDescriptor(ck.descriptor);
          for (int i = 0; i < md.params.length; i++) {
            stack.pop(md.params[i].stack_size);
          }
          if (md.ret.type != CodeConstants.TYPE_VOID) {
            stack.push(md.ret);
            if (md.ret.stack_size == 2) {
              stack.push(new VarType(CodeConstants.TYPE_GROUP2EMPTY));
            }
          }
        }
        break;
      case CodeConstants.opc_new:
        cn = pool.getPrimitiveConstant(instr.getOperand(0));
        stack.push(new VarType(CodeConstants.TYPE_OBJECT, 0, cn.getString()));
        break;
      case CodeConstants.opc_newarray:
        stack.pop();
        var1 = new VarType(arr_type[instr.getOperand(0) - 4]);
        var1.arraydim = 1;
        stack.push(var1);
        break;
      case CodeConstants.opc_athrow:
        var1 = stack.pop();
        stack.clear();
        stack.push(var1);
        break;
      case CodeConstants.opc_checkcast:
      case CodeConstants.opc_instanceof:
        stack.pop();
        cn = pool.getPrimitiveConstant(instr.getOperand(0));
        stack.push(new VarType(CodeConstants.TYPE_OBJECT, 0, cn.getString()));
        break;
      case CodeConstants.opc_anewarray:
      case CodeConstants.opc_multianewarray:
        int dimensions = (instr.opcode == CodeConstants.opc_anewarray) ? 1 : instr.getOperand(1);
        stack.pop(dimensions);
        cn = pool.getPrimitiveConstant(instr.getOperand(0));
        if (cn.isArray) {
          var1 = new VarType(CodeConstants.TYPE_OBJECT, 0, cn.getString());
          var1.arraydim += dimensions;
          stack.push(var1);
        }
        else {
          stack.push(new VarType(CodeConstants.TYPE_OBJECT, dimensions, cn.getString()));
        }
    }
  }
}