public void visitBranchInstruction( Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction) { byte opcode = branchInstruction.opcode; // Evaluate the target instruction blocks. evaluateInstructionBlock(clazz, method, codeAttribute, offset + branchInstruction.branchOffset); // Evaluate the instructions after a subroutine branch. if (opcode == InstructionConstants.OP_JSR || opcode == InstructionConstants.OP_JSR_W) { // We assume subroutine calls (jsr and jsr_w instructions) don't // change the stack, other than popping the return value. stackSize -= 1; evaluateInstructionBlock( clazz, method, codeAttribute, offset + branchInstruction.length(offset)); } // Some branch instructions always end the current instruction block. exitInstructionBlock = opcode == InstructionConstants.OP_GOTO || opcode == InstructionConstants.OP_GOTO_W || opcode == InstructionConstants.OP_JSR || opcode == InstructionConstants.OP_JSR_W; }