}
branch.log(TreeLogger.INFO, "Validation succeeded");
} else {
TreeLogger branch = logger.branch(TreeLogger.INFO,
"Precompiling module " + module.getName());
PropertyPermutations allPermutations = new PropertyPermutations(
module.getProperties());
int potentialPermutations = allPermutations.size();
int permutationsPerIteration = options.getMaxPermsPerPrecompile();
if (permutationsPerIteration <= 0) {
permutationsPerIteration = potentialPermutations;
}
/*
* The potential number of permutations to precompile >= the actual
* number of permutations that end up being precompiled, because some of
* the permutations might collapse due to identical rebind results. So
* we have to track these two counts and ids separately.
*/
int actualPermutations = 0;
for (int potentialFirstPerm = 0; potentialFirstPerm < potentialPermutations; potentialFirstPerm += permutationsPerIteration) {
int numPermsToPrecompile = Math.min(potentialPermutations
- potentialFirstPerm, permutationsPerIteration);
// Select only the range of property permutations that we want
PropertyPermutations localPermutations = new PropertyPermutations(
allPermutations, potentialFirstPerm, numPermsToPrecompile);
Precompilation precompilation = precompile(branch, options, module,
actualPermutations, localPermutations, options.getGenDir(),
compilerWorkDir, options.getDumpSignatureFile());