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

Unified Diff: pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart

Issue 2648213007: Revert "Use single InputPackagesResultProvider, without SdkSummaryResultProvider." (Closed)
Patch Set: Created 3 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 | « pkg/dev_compiler/lib/src/compiler/compiler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
diff --git a/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart b/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
index 517196294a8f9c7f4b0175391958e98c619a424c..7a44ab9d50f776b74649127b4e79781ef6f92c6f 100644
--- a/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
+++ b/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
@@ -13,8 +13,8 @@ import 'package:analyzer/src/dart/analysis/file_state.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/summary_sdk.dart';
import 'package:analyzer/src/util/absolute_path.dart';
import 'package:front_end/incremental_resolved_ast_generator.dart';
import 'package:front_end/src/base/file_repository.dart';
@@ -123,6 +123,9 @@ class IncrementalResolvedAstGeneratorImpl
await _options.getSdkSummary(), sdkContext, _fileRepository);
sdkContext.sourceFactory =
new SourceFactory([new DartUriResolver(dartSdk)]);
+ bool strongMode = true; // TODO(paulberry): support strong mode flag.
+ sdkContext.resultProvider = new SdkSummaryResultProvider(
+ sdkContext, await _options.getSdkSummary(), strongMode);
var sourceFactory = new _SourceFactoryProxy(dartSdk, _fileRepository);
var analysisOptions = new AnalysisOptionsImpl();
@@ -267,10 +270,6 @@ class _SourceFactoryProxy implements SourceFactory {
@override
Source forUri(String absoluteUri) {
Uri uri = Uri.parse(absoluteUri);
- if (uri.scheme == 'dart') {
- return new _SourceProxy(
- uri, _fileRepository.pathForUri(uri, allocate: true));
- }
return new _SourceProxy(uri, _fileRepository.pathForUri(uri));
}
@@ -279,9 +278,9 @@ class _SourceFactoryProxy implements SourceFactory {
Source resolveUri(Source containingSource, String containedUri) {
// TODO(paulberry): re-use code from dependency_grapher_impl, and support
// SDK URI resolution logic.
- String absoluteUri =
- resolveRelativeUri(containingSource?.uri, Uri.parse(containedUri))
- .toString();
+ var absoluteUri = containingSource == null
+ ? containedUri
+ : containingSource.uri.resolve(containedUri).toString();
return forUri(absoluteUri);
}
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698