| 822 | } |
| 823 | |
| 824 | public void visitLdcInsn (final Object cst) { |
| 825 | Item i = cw.newCst(cst); |
| 826 | if (computeMaxs) { |
| 827 | int size; |
| 828 | // computes the stack size variation |
| 829 | if (i.type == ClassWriter.LONG || i.type == ClassWriter.DOUBLE) { |
| 830 | size = stackSize + 2; |
| 831 | } else { |
| 832 | size = stackSize + 1; |
| 833 | } |
| 834 | // updates current and max stack sizes |
| 835 | if (size > maxStackSize) { |
| 836 | maxStackSize = size; |
| 837 | } |
| 838 | stackSize = size; |
| 839 | } |
| 840 | // adds the instruction to the bytecode of the method |
| 841 | int index = i.index; |
| 842 | if (i.type == ClassWriter.LONG || i.type == ClassWriter.DOUBLE) { |
| 843 | code.put12(20 /*LDC2_W*/, index); |
| 844 | } else if (index >= 256) { |
| 845 | code.put12(19 /*LDC_W*/, index); |
| 846 | } else { |
| 847 | code.put11(Constants.LDC, index); |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | public void visitIincInsn (final int var, final int increment) { |
| 852 | if (computeMaxs) { |