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

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

Issue 2686843003: Don't re-read files when compute their analysis results. (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 | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | 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 f5694fbea868efbb725b70e9ae6ee69f2743ffab..37d4a25118885ddfdf88bfbbc65fcb068b1da11c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -542,10 +542,10 @@ class AnalysisDriver {
* If the driver has the cached analysis result for the file, it is returned.
*
* Otherwise causes the analysis state to transition to "analyzing" (if it is
- * not in that state already), the driver will read the file and produce the
- * analysis result for it, which is consistent with the current file state
- * (including the new state of the file), prior to the next time the analysis
- * state transitions to "idle".
+ * not in that state already), the driver will produce the analysis result for
+ * it, which is consistent with the current file state (including new states
+ * of the files previously reported using [changeFile]), prior to the next
+ * time the analysis state transitions to "idle".
*/
Future<AnalysisResult> getResult(String path) {
if (!_fileTracker.fsState.hasUri(path)) {
@@ -701,7 +701,7 @@ class AnalysisDriver {
// We need the fully resolved unit, or the result is not cached.
return _logger.run('Compute analysis result for $path', () {
- FileState file = _fileTracker.verifyApiSignature(path);
+ FileState file = fsState.getFileForPath(path);
// Prepare the library file - the file itself, or the known library.
FileState library = getLibraryFile(file);
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698