code: public <T1 extends SourceFile, T2 extends SourceFile> Result compile(
        List<T1> externs, List<T2> inputs, CompilerOptions options) {
      // The compile method should only be called once.
      checkState(jsRoot == null);
  
      try {
        init(externs, inputs, options);
        if (options.printConfig) {
          printConfig(System.err);
        }
        if (!hasErrors()) {
          parseForCompilation();
        }
        if (!hasErrors()) {
          if (options.getInstrumentForCoverageOnly()) {
            // TODO(bradfordcsmith): The option to instrument for coverage only should belong to the
            //     runner, not the compiler.
            instrumentForCoverage();
          } else {
            stage1Passes();
            if (!hasErrors()) {
              stage2Passes();
            }
          }
          performPostCompilationTasks();
        }
      } finally {
        generateReport();
      }
      return getResult();
    }
docs: Compiles a list of inputs.
  
  <p>This is a convenience method to wrap up all the work of compilation, including
  generating the error and warning report.
  
  <p>NOTE: All methods called here must be public, because client code must be able to replicate
  and customize this.