docs: private void compile(ICompilationUnit[] sourceUnits, boolean lastRound) {
          this.stats.startTime = System.currentTimeMillis();
          try {
              // build and record parsed units
              reportProgress(Messages.compilation_beginningToCompile);
  
              if (this.options.complianceLevel >= ClassFileConstants.JDK9) {
                  // in Java 9 the compiler must never ask the oracle for a module that is contained in the input units:
                  sortModuleDeclarationsFirst(sourceUnits);
              }
              if (this.annotationProcessorManager == null) {
                  beginToCompile(sourceUnits);
              } else {
                  ICompilationUnit[] originalUnits = sourceUnits.clone(); // remember source units in case a source type collision occurs
                  try {
                      beginToCompile(sourceUnits);
                      if (!lastRound) {
                          processAnnotations();
                      }
                      if (!this.options.generateClassFiles) {
                          // -proc:only was set on the command line
                          return;
                      }
                  } catch (SourceTypeCollisionException e) {
                      backupAptProblems();
                      reset();
                      // a generated type was referenced before it was created
                      // the compiler either created a MissingType or found a BinaryType for it
                      // so add the processor's generated files & start over,
                      // but remember to only pass the generated files to the annotation processor
                      int originalLength = originalUnits.length;
                      int newProcessedLength = e.newAnnotationProcessorUnits.length;
                      ICompilationUnit[] combinedUnits = new ICompilationUnit[originalLength + newProcessedLength];
                      System.arraycopy(originalUnits, 0, combinedUnits, 0, originalLength);
                      System.arraycopy(e.newAnnotationProcessorUnits, 0, combinedUnits, originalLength, newProcessedLength);
                      this.annotationProcessorStartIndex  = originalLength;
                      compile(combinedUnits, e.isLastRound);
                      return;
                  }
              }
              // Restore the problems before the results are processed and cleaned up.
              restoreAptProblems();
              processCompiledUnits(0, lastRound);
          } catch (AbortCompilation e) {
              this.handleInternalException(e, null);
          }
          if (this.options.verbose) {
              if (this.totalUnits > 1) {
                  this.out.println(
                          Messages.bind(Messages.compilation_units, String.valueOf(this.totalUnits)));
              } else {
                  this.out.println(
                          Messages.bind(Messages.compilation_unit, String.valueOf(this.totalUnits)));
              }
          }
      }