synchronized (cacheLock) {
MapIterator<Source, SourceEntry> iterator = cache.iterator();
while (iterator.moveNext()) {
SourceEntry sourceEntry = iterator.getValue();
if (sourceEntry instanceof DartEntry) {
Source source = iterator.getKey();
DartEntry dartEntry = (DartEntry) sourceEntry;
SourceKind kind = dartEntry.getValue(DartEntry.SOURCE_KIND);
// get library independent values
statistics.putCacheItem(dartEntry, SourceEntry.LINE_INFO);
statistics.putCacheItem(dartEntry, DartEntry.PARSE_ERRORS);
statistics.putCacheItem(dartEntry, DartEntry.PARSED_UNIT);
statistics.putCacheItem(dartEntry, DartEntry.SOURCE_KIND);
if (kind == SourceKind.LIBRARY) {
statistics.putCacheItem(dartEntry, DartEntry.ELEMENT);
statistics.putCacheItem(dartEntry, DartEntry.EXPORTED_LIBRARIES);
statistics.putCacheItem(dartEntry, DartEntry.IMPORTED_LIBRARIES);
statistics.putCacheItem(dartEntry, DartEntry.INCLUDED_PARTS);
statistics.putCacheItem(dartEntry, DartEntry.IS_CLIENT);
statistics.putCacheItem(dartEntry, DartEntry.IS_LAUNCHABLE);
// The public namespace isn't computed by performAnalysisTask() and therefore isn't
// interesting.
//statistics.putCacheItem(dartEntry, DartEntry.PUBLIC_NAMESPACE);
}
// get library-specific values
Source[] librarySources = getLibrariesContaining(source);
for (Source librarySource : librarySources) {
statistics.putCacheItemInLibrary(dartEntry, librarySource, DartEntry.RESOLUTION_ERRORS);
statistics.putCacheItemInLibrary(dartEntry, librarySource, DartEntry.RESOLVED_UNIT);
if (generateSdkErrors || !source.isInSystemLibrary()) {
statistics.putCacheItemInLibrary(
dartEntry,
librarySource,
DartEntry.VERIFICATION_ERRORS);
if (hintsEnabled) {