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

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

Issue 1555093005: Use SummarySdkAnalysisContext if the SDK has the analysis_summary file. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixes for review comments. Created 4 years, 11 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/lib/src/generated/sdk_io.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 88403fb59309d1a368dc6f227ce0392ef2d73eb2..ac3ace6b60aea7cddb20eba996750446286be647 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -486,6 +486,26 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
bool aboutToComputeResult(CacheEntry entry, ResultDescriptor result) {
+ AnalysisTarget target = entry.target;
+ // TYPE_PROVIDER
+ if (target is AnalysisContextTarget && result == TYPE_PROVIDER) {
+ DartSdk dartSdk = sourceFactory.dartSdk;
+ if (dartSdk != null) {
+ AnalysisContext sdkContext = dartSdk.context;
+ if (!identical(sdkContext, this) &&
+ sdkContext is InternalAnalysisContext) {
+ return sdkContext.aboutToComputeResult(entry, result);
+ }
+ }
+ }
+ // A result for a Source.
+ Source source = target.source;
+ if (source != null) {
+ InternalAnalysisContext context = _cache.getContextFor(source);
+ if (!identical(context, this)) {
+ return context.aboutToComputeResult(entry, result);
+ }
+ }
return false;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/sdk_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698