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

Unified Diff: pkg/analyzer/lib/src/generated/sdk_io.dart

Issue 1591483002: Prepare for chaining resynthesizers from AC to SDK AC. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: pkg/analyzer/lib/src/generated/sdk_io.dart
diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart
index 863a3d40c9c69f07d78cf8fecde2fd252bfc406d..2e5220f1c4574378b9f5602ff0cd44259bc029cf 100644
--- a/pkg/analyzer/lib/src/generated/sdk_io.dart
+++ b/pkg/analyzer/lib/src/generated/sdk_io.dart
@@ -255,15 +255,17 @@ class DirectoryBasedDartSdk implements DartSdk {
@override
AnalysisContext get context {
if (_analysisContext == null) {
- SdkBundle sdkBundle = _getSummarySdkBundle();
- if (sdkBundle != null) {
- _analysisContext = new SummarySdkAnalysisContext(sdkBundle);
- } else {
- _analysisContext = new SdkAnalysisContext();
- }
+ _analysisContext = new SdkAnalysisContext();
SourceFactory factory = new SourceFactory([new DartUriResolver(this)]);
_analysisContext.sourceFactory = factory;
List<String> uris = this.uris;
+ // Try to use summaries.
+ SdkBundle sdkBundle = _getSummarySdkBundle();
+ if (sdkBundle != null) {
+ _analysisContext.aboutToComputeResultHelper =
+ new SdkSummaryResultProvider(_analysisContext, sdkBundle);
+ }
+ // Add sources.
ChangeSet changeSet = new ChangeSet();
for (String uri in uris) {
changeSet.addedSource(factory.forUri(uri));

Powered by Google App Engine
This is Rietveld 408576698