| 580 | } |
| 581 | |
| 582 | public void visitIntInsn (final int opcode, final int operand) { |
| 583 | if (computeMaxs && opcode != Constants.NEWARRAY) { |
| 584 | // updates current and max stack sizes only if opcode == NEWARRAY |
| 585 | // (stack size variation = 0 for BIPUSH or SIPUSH) |
| 586 | int size = stackSize + 1; |
| 587 | if (size > maxStackSize) { |
| 588 | maxStackSize = size; |
| 589 | } |
| 590 | stackSize = size; |
| 591 | } |
| 592 | // adds the instruction to the bytecode of the method |
| 593 | if (opcode == Constants.SIPUSH) { |
| 594 | code.put12(opcode, operand); |
| 595 | } else { // BIPUSH or NEWARRAY |
| 596 | code.put11(opcode, operand); |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | public void visitVarInsn (final int opcode, final int var) { |
| 601 | if (computeMaxs) { |