public void visitJumpInsn()

in instrumentation/src/com/intellij/rt/coverage/instrumentation/CoverageEnumerator.java [71:97]


  public void visitJumpInsn(final int opcode, final Label label) {
    if (myData.hasNoLinesInCurrentMethod() || !myBranchCoverage || myData.isIgnoreSection()) {
      super.visitJumpInsn(opcode, label);
      return;
    }
    boolean jumpInstrumented = false;
    if (opcode != Opcodes.GOTO && opcode != Opcodes.JSR) {
      LineData lineData = myData.getLineData(myCurrentLine);
      if (lineData != null) {
        Label trueLabel = new Label();
        Label falseLabel = new Label();
        myData.addJump(lineData, trueLabel, falseLabel);
        onNewJump(label, trueLabel, falseLabel);

        jumpInstrumented = true;
        super.visitJumpInsn(opcode, trueLabel);
        super.visitJumpInsn(Opcodes.GOTO, falseLabel);
        super.visitLabel(trueLabel);  // true hit will be inserted here
        super.visitJumpInsn(Opcodes.GOTO, label);
        super.visitLabel(falseLabel); // false hit will be inserted here
      }
    }

    if (!jumpInstrumented) {
      super.visitJumpInsn(opcode, label);
    }
  }