* Compute a value for all of the constants in the libraries being analyzed.
*/
private void performConstantEvaluation() {
TimeCounterHandle timeCounter = PerformanceStatistics.resolve.start();
try {
ConstantValueComputer computer = new ConstantValueComputer(
typeProvider,
analysisContext.getDeclaredVariables());
for (Library library : librariesInCycles) {
for (Source source : library.getCompilationUnitSources()) {
try {
CompilationUnit unit = library.getAST(source);
if (unit != null) {
computer.add(unit);
}
} catch (AnalysisException exception) {
AnalysisEngine.getInstance().getLogger().logError(
"Internal Error: Could not access AST for " + source.getFullName()
+ " during constant evaluation",
exception);
}
}
}
computer.computeValues();
} finally {
timeCounter.stop();
}
}