UnifiedAst unifiedAst =
getCompiler(module).precompile(logger, module, rpo, declEntryPts, null, jjsOptions,
rpo.getPermuationCount() == 1, precompilationMetrics);
if (jjsOptions.isCompilerMetricsEnabled()) {
ModuleMetricsArtifact moduleMetrics = new ModuleMetricsArtifact();
moduleMetrics.setSourceFiles(module.getAllSourceFiles());
// The initial type list has to be gathered before the call to
// precompile().
moduleMetrics.setInitialTypes(initialTypeOracleTypes);
// The elapsed time in ModuleMetricsArtifact represents time
// which could be done once for all permutations.
moduleMetrics.setElapsedMilliseconds(moduleLoadFinished - startTimeMilliseconds);
unifiedAst.setModuleMetrics(moduleMetrics);
}
// Merge all identical permutations together.
List<Permutation> permutations =