| 882 | } |
| 883 | |
| 884 | @Override |
| 885 | public void visitIntInsn(final int opcode, final int operand) { |
| 886 | lastBytecodeOffset = code.length; |
| 887 | // Add the instruction to the bytecode of the method. |
| 888 | if (opcode == Opcodes.SIPUSH) { |
| 889 | code.put12(opcode, operand); |
| 890 | } else { // BIPUSH or NEWARRAY |
| 891 | code.put11(opcode, operand); |
| 892 | } |
| 893 | // If needed, update the maximum stack size and number of locals, and stack map frames. |
| 894 | if (currentBasicBlock != null) { |
| 895 | if (compute == COMPUTE_ALL_FRAMES || compute == COMPUTE_INSERTED_FRAMES) { |
| 896 | currentBasicBlock.frame.execute(opcode, operand, null, null); |
| 897 | } else if (opcode != Opcodes.NEWARRAY) { |
| 898 | // The stack size delta is 1 for BIPUSH or SIPUSH, and 0 for NEWARRAY. |
| 899 | int size = relativeStackSize + 1; |
| 900 | if (size > maxRelativeStackSize) { |
| 901 | maxRelativeStackSize = size; |
| 902 | } |
| 903 | relativeStackSize = size; |
| 904 | } |
| 905 | } |
| 906 | } |
| 907 | |
| 908 | @Override |
| 909 | public void visitVarInsn(final int opcode, final int var) { |