/
MethodBuilder.java
1534 lines (1220 loc) · 42.4 KB
/
MethodBuilder.java
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
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package org.isk.jvmhardcore.pjba.builder;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.isk.jvmhardcore.pjba.instruction.Instructions;
import org.isk.jvmhardcore.pjba.instruction.LookupswitchInstruction;
import org.isk.jvmhardcore.pjba.instruction.TableswitchInstruction;
import org.isk.jvmhardcore.pjba.instruction.interfaces.LabeledInstruction;
import org.isk.jvmhardcore.pjba.instruction.interfaces.SwitchInstruction;
import org.isk.jvmhardcore.pjba.structure.ClassFile;
import org.isk.jvmhardcore.pjba.structure.Instruction;
import org.isk.jvmhardcore.pjba.structure.Method;
import org.isk.jvmhardcore.pjba.structure.attribute.Code;
import org.isk.jvmhardcore.pjba.util.DescriptorCounter;
public class MethodBuilder {
final private static short SHORT_ZERO = 0;
final private ClassFileBuilder classFileBuilder;
final private Code code;
final private boolean eagerConstruction;
private int currentMethodLength;
final private List<InstructionWrapper> instructions;
final private List<InstructionWrapper> gotos;
final private List<InstructionWrapper> labels;
final private Map<String, InstructionWrapper> labelsAsMap;
final private Map<String, List<LabelWrapper>> labelAsArgs;
public MethodBuilder(ClassFileBuilder classFileBuilder, Method method, int parametersCount, boolean eagerConstruction) {
this.labelAsArgs = new HashMap<>();
this.classFileBuilder = classFileBuilder;
this.eagerConstruction = eagerConstruction;
if (eagerConstruction) {
this.instructions = null;
this.gotos = null;
this.labels = null;
this.labelsAsMap = new HashMap<>();
} else {
this.instructions = new LinkedList<>();
this.gotos = new LinkedList<>();
this.labels = new LinkedList<>();
this.labelsAsMap = null;
}
if (!method.accessFlagSet(Method.MODIFIER_ABSTRACT)) {
final int codeAttributeIndex = this.classFileBuilder.getClassFile().addConstantUTF8(Code.ATTRIBUTE_NAME);
this.code = new Code(codeAttributeIndex);
this.code.setParameterCount(parametersCount);
method.addAttibute(this.code);
} else {
this.code = null;
}
}
// -------------------------------------------------------------------------------------------------------------------
// Instructions
// -------------------------------------------------------------------------------------------------------------------
public MethodBuilder nop() {
this.instruction(Instructions.NOP);
return this;
}
public MethodBuilder aconst_null() {
this.instruction(Instructions.ACONST_NULL);
return this;
}
public MethodBuilder iconst_m1() {
this.instruction(Instructions.ICONST_M1);
return this;
}
public MethodBuilder iconst_0() {
this.instruction(Instructions.ICONST_0);
return this;
}
public MethodBuilder iconst_1() {
this.instruction(Instructions.ICONST_1);
return this;
}
public MethodBuilder iconst_2() {
this.instruction(Instructions.ICONST_2);
return this;
}
public MethodBuilder iconst_3() {
this.instruction(Instructions.ICONST_3);
return this;
}
public MethodBuilder iconst_4() {
this.instruction(Instructions.ICONST_4);
return this;
}
public MethodBuilder iconst_5() {
this.instruction(Instructions.ICONST_5);
return this;
}
public MethodBuilder lconst_0() {
this.instruction(Instructions.LCONST_0);
return this;
}
public MethodBuilder lconst_1() {
this.instruction(Instructions.LCONST_1);
return this;
}
public MethodBuilder fconst_0() {
this.instruction(Instructions.FCONST_0);
return this;
}
public MethodBuilder fconst_1() {
this.instruction(Instructions.FCONST_1);
return this;
}
public MethodBuilder fconst_2() {
this.instruction(Instructions.FCONST_2);
return this;
}
public MethodBuilder dconst_0() {
this.instruction(Instructions.DCONST_0);
return this;
}
public MethodBuilder dconst_1() {
this.instruction(Instructions.DCONST_1);
return this;
}
public MethodBuilder bipush(byte value) {
this.instruction(Instructions.bipush(value));
return this;
}
public MethodBuilder sipush(short value) {
this.instruction(Instructions.sipush(value));
return this;
}
public MethodBuilder ldc(String value) {
final int utf8Index = this.classFileBuilder.getClassFile().addConstantUTF8(value);
final int indexInCP = this.classFileBuilder.getClassFile().addConstantString(utf8Index);
this.internalLdc(indexInCP);
return this;
}
public MethodBuilder ldc(int value) {
final int indexInCP = this.classFileBuilder.getClassFile().addConstantInteger(value);
this.internalLdc(indexInCP);
return this;
}
public MethodBuilder ldc(float value) {
final int indexInCP = this.classFileBuilder.getClassFile().addConstantFloat(value);
this.internalLdc(indexInCP);
return this;
}
public MethodBuilder ldc(long value) {
final int indexInCP = this.classFileBuilder.getClassFile().addConstantLong(value);
this.instruction(Instructions.ldc2_w((short) indexInCP));
return this;
}
public MethodBuilder ldc(double value) {
final int indexInCP = this.classFileBuilder.getClassFile().addConstantDouble(value);
this.instruction(Instructions.ldc2_w((short) indexInCP));
return this;
}
private void internalLdc(final int indexInCP) {
if (indexInCP > 255) { // 255 = Byte.MAX_UNSIGNED_VALUE
this.instruction(Instructions.ldc_w((short) indexInCP));
} else {
this.instruction(Instructions.ldc((byte) indexInCP));
}
}
public MethodBuilder iload(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.iload((byte) indexInLV));
} else {
this.instruction(Instructions.wide_iload(indexInLV));
}
return this;
}
public MethodBuilder lload(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.lload((byte) indexInLV));
} else {
this.instruction(Instructions.wide_lload(indexInLV));
}
return this;
}
public MethodBuilder fload(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.fload((byte) indexInLV));
} else {
this.instruction(Instructions.wide_fload(indexInLV));
}
return this;
}
public MethodBuilder dload(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.dload((byte) indexInLV));
} else {
this.instruction(Instructions.wide_dload(indexInLV));
}
return this;
}
public MethodBuilder aload(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.aload((byte) indexInLV));
} else {
this.instruction(Instructions.wide_aload(indexInLV));
}
return this;
}
public MethodBuilder iload_0() {
this.instruction(Instructions.ILOAD_0);
return this;
}
public MethodBuilder iload_1() {
this.instruction(Instructions.ILOAD_1);
return this;
}
public MethodBuilder iload_2() {
this.instruction(Instructions.ILOAD_2);
return this;
}
public MethodBuilder iload_3() {
this.instruction(Instructions.ILOAD_3);
return this;
}
public MethodBuilder lload_0() {
this.instruction(Instructions.LLOAD_0);
return this;
}
public MethodBuilder lload_1() {
this.instruction(Instructions.LLOAD_1);
return this;
}
public MethodBuilder lload_2() {
this.instruction(Instructions.LLOAD_2);
return this;
}
public MethodBuilder lload_3() {
this.instruction(Instructions.LLOAD_3);
return this;
}
public MethodBuilder fload_0() {
this.instruction(Instructions.FLOAD_0);
return this;
}
public MethodBuilder fload_1() {
this.instruction(Instructions.FLOAD_1);
return this;
}
public MethodBuilder fload_2() {
this.instruction(Instructions.FLOAD_2);
return this;
}
public MethodBuilder fload_3() {
this.instruction(Instructions.FLOAD_3);
return this;
}
public MethodBuilder dload_0() {
this.instruction(Instructions.DLOAD_0);
return this;
}
public MethodBuilder dload_1() {
this.instruction(Instructions.DLOAD_1);
return this;
}
public MethodBuilder dload_2() {
this.instruction(Instructions.DLOAD_2);
return this;
}
public MethodBuilder dload_3() {
this.instruction(Instructions.DLOAD_3);
return this;
}
public MethodBuilder aload_0() {
this.instruction(Instructions.ALOAD_0);
return this;
}
public MethodBuilder aload_1() {
this.instruction(Instructions.ALOAD_1);
return this;
}
public MethodBuilder aload_2() {
this.instruction(Instructions.ALOAD_2);
return this;
}
public MethodBuilder aload_3() {
this.instruction(Instructions.ALOAD_3);
return this;
}
public MethodBuilder iaload() {
this.instruction(Instructions.IALOAD);
return this;
}
public MethodBuilder laload() {
this.instruction(Instructions.LALOAD);
return this;
}
public MethodBuilder faload() {
this.instruction(Instructions.FALOAD);
return this;
}
public MethodBuilder daload() {
this.instruction(Instructions.DALOAD);
return this;
}
public MethodBuilder aaload() {
this.instruction(Instructions.AALOAD);
return this;
}
public MethodBuilder baload() {
this.instruction(Instructions.BALOAD);
return this;
}
public MethodBuilder caload() {
this.instruction(Instructions.CALOAD);
return this;
}
public MethodBuilder saload() {
this.instruction(Instructions.SALOAD);
return this;
}
public MethodBuilder istore(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.istore((byte) indexInLV));
} else {
this.instruction(Instructions.wide_istore(indexInLV));
}
return this;
}
public MethodBuilder lstore(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.lstore((byte) indexInLV));
} else {
this.instruction(Instructions.wide_lstore(indexInLV));
}
return this;
}
public MethodBuilder fstore(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.fstore((byte) indexInLV));
} else {
this.instruction(Instructions.wide_fstore(indexInLV));
}
return this;
}
public MethodBuilder dstore(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.dstore((byte) indexInLV));
} else {
this.instruction(Instructions.wide_dstore(indexInLV));
}
return this;
}
public MethodBuilder astore(short indexInLV) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE) {
this.instruction(Instructions.astore((byte) indexInLV));
} else {
this.instruction(Instructions.wide_astore(indexInLV));
}
return this;
}
public MethodBuilder istore_0() {
this.instruction(Instructions.ISTORE_0);
return this;
}
public MethodBuilder istore_1() {
this.instruction(Instructions.ISTORE_1);
return this;
}
public MethodBuilder istore_2() {
this.instruction(Instructions.ISTORE_2);
return this;
}
public MethodBuilder istore_3() {
this.instruction(Instructions.ISTORE_3);
return this;
}
public MethodBuilder lstore_0() {
this.instruction(Instructions.LSTORE_0);
return this;
}
public MethodBuilder lstore_1() {
this.instruction(Instructions.LSTORE_1);
return this;
}
public MethodBuilder lstore_2() {
this.instruction(Instructions.LSTORE_2);
return this;
}
public MethodBuilder lstore_3() {
this.instruction(Instructions.LSTORE_3);
return this;
}
public MethodBuilder fstore_0() {
this.instruction(Instructions.FSTORE_0);
return this;
}
public MethodBuilder fstore_1() {
this.instruction(Instructions.FSTORE_1);
return this;
}
public MethodBuilder fstore_2() {
this.instruction(Instructions.FSTORE_2);
return this;
}
public MethodBuilder fstore_3() {
this.instruction(Instructions.FSTORE_3);
return this;
}
public MethodBuilder dstore_0() {
this.instruction(Instructions.DSTORE_0);
return this;
}
public MethodBuilder dstore_1() {
this.instruction(Instructions.DSTORE_1);
return this;
}
public MethodBuilder dstore_2() {
this.instruction(Instructions.DSTORE_2);
return this;
}
public MethodBuilder dstore_3() {
this.instruction(Instructions.DSTORE_3);
return this;
}
public MethodBuilder astore_0() {
this.instruction(Instructions.ASTORE_0);
return this;
}
public MethodBuilder astore_1() {
this.instruction(Instructions.ASTORE_1);
return this;
}
public MethodBuilder astore_2() {
this.instruction(Instructions.ASTORE_2);
return this;
}
public MethodBuilder astore_3() {
this.instruction(Instructions.ASTORE_3);
return this;
}
public MethodBuilder iastore() {
this.instruction(Instructions.IASTORE);
return this;
}
public MethodBuilder lastore() {
this.instruction(Instructions.LASTORE);
return this;
}
public MethodBuilder fastore() {
this.instruction(Instructions.FASTORE);
return this;
}
public MethodBuilder dastore() {
this.instruction(Instructions.DASTORE);
return this;
}
public MethodBuilder aastore() {
this.instruction(Instructions.AASTORE);
return this;
}
public MethodBuilder bastore() {
this.instruction(Instructions.BASTORE);
return this;
}
public MethodBuilder castore() {
this.instruction(Instructions.CASTORE);
return this;
}
public MethodBuilder sastore() {
this.instruction(Instructions.SASTORE);
return this;
}
public MethodBuilder pop() {
this.instruction(Instructions.POP);
return this;
}
public MethodBuilder pop2() {
this.instruction(Instructions.POP2);
return this;
}
public MethodBuilder dup() {
this.instruction(Instructions.DUP);
return this;
}
public MethodBuilder dup_x1() {
this.instruction(Instructions.DUP_X1);
return this;
}
public MethodBuilder dup_x2() {
this.instruction(Instructions.DUP_X2);
return this;
}
public MethodBuilder dup2() {
this.instruction(Instructions.DUP2);
return this;
}
public MethodBuilder dup2_x1() {
this.instruction(Instructions.DUP2_X1);
return this;
}
public MethodBuilder dup2_x2() {
this.instruction(Instructions.DUP2_X2);
return this;
}
public MethodBuilder swap() {
this.instruction(Instructions.SWAP);
return this;
}
public MethodBuilder iadd() {
this.instruction(Instructions.IADD);
return this;
}
public MethodBuilder ladd() {
this.instruction(Instructions.LADD);
return this;
}
public MethodBuilder fadd() {
this.instruction(Instructions.FADD);
return this;
}
public MethodBuilder dadd() {
this.instruction(Instructions.DADD);
return this;
}
public MethodBuilder isub() {
this.instruction(Instructions.ISUB);
return this;
}
public MethodBuilder lsub() {
this.instruction(Instructions.LSUB);
return this;
}
public MethodBuilder fsub() {
this.instruction(Instructions.FSUB);
return this;
}
public MethodBuilder dsub() {
this.instruction(Instructions.DSUB);
return this;
}
public MethodBuilder imul() {
this.instruction(Instructions.IMUL);
return this;
}
public MethodBuilder lmul() {
this.instruction(Instructions.LMUL);
return this;
}
public MethodBuilder fmul() {
this.instruction(Instructions.FMUL);
return this;
}
public MethodBuilder dmul() {
this.instruction(Instructions.DMUL);
return this;
}
public MethodBuilder idiv() {
this.instruction(Instructions.IDIV);
return this;
}
public MethodBuilder ldiv() {
this.instruction(Instructions.LDIV);
return this;
}
public MethodBuilder fdiv() {
this.instruction(Instructions.FDIV);
return this;
}
public MethodBuilder ddiv() {
this.instruction(Instructions.DDIV);
return this;
}
public MethodBuilder irem() {
this.instruction(Instructions.IREM);
return this;
}
public MethodBuilder lrem() {
this.instruction(Instructions.LREM);
return this;
}
public MethodBuilder frem() {
this.instruction(Instructions.FREM);
return this;
}
public MethodBuilder drem() {
this.instruction(Instructions.DREM);
return this;
}
public MethodBuilder ineg() {
this.instruction(Instructions.INEG);
return this;
}
public MethodBuilder lneg() {
this.instruction(Instructions.LNEG);
return this;
}
public MethodBuilder fneg() {
this.instruction(Instructions.FNEG);
return this;
}
public MethodBuilder dneg() {
this.instruction(Instructions.DNEG);
return this;
}
public MethodBuilder ishl() {
this.instruction(Instructions.ISHL);
return this;
}
public MethodBuilder lshl() {
this.instruction(Instructions.LSHL);
return this;
}
public MethodBuilder ishr() {
this.instruction(Instructions.ISHR);
return this;
}
public MethodBuilder lshr() {
this.instruction(Instructions.LSHR);
return this;
}
public MethodBuilder iushr() {
this.instruction(Instructions.IUSHR);
return this;
}
public MethodBuilder lushr() {
this.instruction(Instructions.LUSHR);
return this;
}
public MethodBuilder iand() {
this.instruction(Instructions.IAND);
return this;
}
public MethodBuilder land() {
this.instruction(Instructions.LAND);
return this;
}
public MethodBuilder ior() {
this.instruction(Instructions.IOR);
return this;
}
public MethodBuilder lor() {
this.instruction(Instructions.LOR);
return this;
}
public MethodBuilder ixor() {
this.instruction(Instructions.IXOR);
return this;
}
public MethodBuilder lxor() {
this.instruction(Instructions.LXOR);
return this;
}
public MethodBuilder iinc(short indexInLV, short constant) {
if (indexInLV >= Byte.MIN_VALUE && indexInLV <= Byte.MAX_VALUE
&& constant >= Byte.MIN_VALUE && constant <= Byte.MAX_VALUE) {
this.instruction(Instructions.iinc((byte) indexInLV, (byte) constant));
} else {
this.instruction(Instructions.wide_iinc(indexInLV, constant));
}
return this;
}
public MethodBuilder i2l() {
this.instruction(Instructions.I2L);
return this;
}
public MethodBuilder i2f() {
this.instruction(Instructions.I2F);
return this;
}
public MethodBuilder i2d() {
this.instruction(Instructions.I2D);
return this;
}
public MethodBuilder l2i() {
this.instruction(Instructions.L2I);
return this;
}
public MethodBuilder l2f() {
this.instruction(Instructions.L2F);
return this;
}
public MethodBuilder l2d() {
this.instruction(Instructions.L2D);
return this;
}
public MethodBuilder f2i() {
this.instruction(Instructions.F2I);
return this;
}
public MethodBuilder f2l() {
this.instruction(Instructions.F2L);
return this;
}
public MethodBuilder f2d() {
this.instruction(Instructions.F2D);
return this;
}
public MethodBuilder d2i() {
this.instruction(Instructions.D2I);
return this;
}
public MethodBuilder d2l() {
this.instruction(Instructions.D2L);
return this;
}
public MethodBuilder d2f() {
this.instruction(Instructions.D2F);
return this;
}
public MethodBuilder i2b() {
this.instruction(Instructions.I2B);
return this;
}
public MethodBuilder i2c() {
this.instruction(Instructions.I2C);
return this;
}
public MethodBuilder i2s() {
this.instruction(Instructions.I2S);
return this;
}
public MethodBuilder lcmp() {
this.instruction(Instructions.LCMP);
return this;
}
public MethodBuilder fcmpl() {
this.instruction(Instructions.FCMPL);
return this;
}
public MethodBuilder fcmpg() {
this.instruction(Instructions.FCMPG);
return this;
}
public MethodBuilder dcmpl() {
this.instruction(Instructions.DCMPL);
return this;
}
public MethodBuilder dcmpg() {
this.instruction(Instructions.DCMPG);
return this;
}
public MethodBuilder ifeq(String label) {
final Instruction instruction = Instructions.ifeq(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder ifne(String label) {
final Instruction instruction = Instructions.ifne(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder iflt(String label) {
final Instruction instruction = Instructions.iflt(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder ifge(String label) {
final Instruction instruction = Instructions.ifge(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder ifgt(String label) {
final Instruction instruction = Instructions.ifgt(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder ifle(String label) {
final Instruction instruction = Instructions.ifle(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder if_icmpeq(String label) {
final Instruction instruction = Instructions.if_icmpeq(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder if_icmpne(String label) {
final Instruction instruction = Instructions.if_icmpne(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder if_icmplt(String label) {
final Instruction instruction = Instructions.if_icmplt(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder if_icmpge(String label) {
final Instruction instruction = Instructions.if_icmpge(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder if_icmpgt(String label) {
final Instruction instruction = Instructions.if_icmpgt(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder if_icmple(String label) {
final Instruction instruction = Instructions.if_icmple(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder if_acmpeq(String label) {
final Instruction instruction = Instructions.if_acmpeq(SHORT_ZERO);
this.instruction(instruction, label);
return this;
}
public MethodBuilder if_acmpne(String label) {
final Instruction instruction = Instructions.if_acmpne(SHORT_ZERO);
this.instruction(instruction, label);
return this;