Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2703903002: Store analysis results for all parts of analyzed library. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index cba1690475d813ec5789ef17b96e31b303f42086..8931939e2c2489b2a3df293b4dd1861d4a155ba7 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -735,12 +735,15 @@ class AnalysisDriver {
libraryContext.store,
library);
Map<FileState, UnitAnalysisResult> results = analyzer.analyze();
- UnitAnalysisResult fileResult = results[file];
- resolvedUnit = fileResult.unit;
-
- // Store the result into the cache.
- bytes = _storeResolvedUnit(
- library, file, resolvedUnit, fileResult.errors);
+ for (FileState unitFile in results.keys) {
+ UnitAnalysisResult unitResult = results[unitFile];
+ List<int> unitBytes = _storeResolvedUnit(
+ library, unitFile, unitResult.unit, unitResult.errors);
+ if (unitFile == file) {
+ bytes = unitBytes;
+ resolvedUnit = unitResult.unit;
+ }
+ }
} else {
ResolutionResult resolutionResult =
libraryContext.resolveUnit(library.source, file.source);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698