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

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 2486573002: Provide LINE_INFO using just UnlinkedUnit even though the full info is not available. (Closed)
Patch Set: Created 4 years, 1 month 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/lib/src/summary/package_bundle_reader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index d0a2104ba50a2596685d47b97f6497fd01448a8d..a255836fa0d6bf53378d91a3796bcdd8af7d081d 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -720,6 +720,12 @@ class AnalysisContextImpl implements InternalAnalysisContext {
CacheEntry entry = getCacheEntry(target);
CacheState state = entry.getState(descriptor);
if (state == CacheState.FLUSHED || state == CacheState.INVALID) {
+ // Check the result provider.
+ bool success = aboutToComputeResult(entry, descriptor);
+ if (success) {
+ return entry.getValue(descriptor);
+ }
+ // Compute the result.
driver.computeResult(target, descriptor);
entry = getCacheEntry(target);
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/package_bundle_reader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698