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

Unified Diff: lib/src/analysis_context.dart

Issue 1406983003: Remove the checker and corresponding dead code (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 2 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 | « lib/devc.dart ('k') | lib/src/checker/checker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/analysis_context.dart
diff --git a/lib/src/analysis_context.dart b/lib/src/analysis_context.dart
index b2d445129e7e42499b4f6773913789eca4ecdb39..79ec11216f7fdd89ce509c17fbe879457705f58e 100644
--- a/lib/src/analysis_context.dart
+++ b/lib/src/analysis_context.dart
@@ -10,9 +10,6 @@ import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
import 'package:analyzer/src/generated/source.dart' show DartUriResolver;
import 'package:analyzer/src/generated/source_io.dart';
-import '../strong_mode.dart' show StrongModeOptions;
-
-import 'checker/resolver.dart';
import 'dart_sdk.dart';
import 'multi_package_resolver.dart';
import 'options.dart';
@@ -20,29 +17,22 @@ import 'options.dart';
/// Creates an [AnalysisContext] with dev_compiler type rules and inference,
/// using [createSourceFactory] to set up its [SourceFactory].
AnalysisContext createAnalysisContextWithSources(
- StrongModeOptions strongOptions, SourceResolverOptions srcOptions,
- {DartUriResolver sdkResolver, List<UriResolver> fileResolvers}) {
+ SourceResolverOptions srcOptions,
+ {DartUriResolver sdkResolver,
+ List<UriResolver> fileResolvers}) {
AnalysisEngine.instance.useTaskModel = true;
var srcFactory = createSourceFactory(srcOptions,
sdkResolver: sdkResolver, fileResolvers: fileResolvers);
- return createAnalysisContext(strongOptions)..sourceFactory = srcFactory;
+ return createAnalysisContext()..sourceFactory = srcFactory;
}
/// Creates an analysis context that contains our restricted typing rules.
-AnalysisContext createAnalysisContext(StrongModeOptions options) {
+AnalysisContext createAnalysisContext() {
var res = AnalysisEngine.instance.createAnalysisContext();
res.analysisOptions.strongMode = true;
return res;
}
-/// Enables dev_compiler inference rules.
-// TODO(jmesserly): is there a cleaner way to plug this in?
-void enableDevCompilerInference(
- AnalysisContextImpl context, StrongModeOptions options) {
- context.libraryResolverFactory = (c) =>
- new LibraryResolverWithInference(c, options);
-}
-
/// Creates a SourceFactory configured by the [options].
///
/// Use [options.useMockSdk] to specify the SDK mode, or use [sdkResolver]
« no previous file with comments | « lib/devc.dart ('k') | lib/src/checker/checker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698