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

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

Issue 2361433002: Async is no longer optional (Closed)
Patch Set: Created 4 years, 3 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/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 3401fbe3e26ea1d7ac666c55c4d6d187d0a8dd7d..75816b50422b9971a29712f4ffe61f16a5942f52 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -1871,22 +1871,11 @@ class BuildTypeProviderTask extends SourceBasedAnalysisTask {
void internalPerform() {
LibraryElement coreLibrary = getRequiredInput(CORE_INPUT);
LibraryElement asyncLibrary = getOptionalInput(ASYNC_INPUT);
- if (asyncLibrary == null) {
- Source asyncSource = context.sourceFactory.forUri(DartSdk.DART_ASYNC);
- asyncLibrary = (context as AnalysisContextImpl)
- .createMockAsyncLib(coreLibrary, asyncSource);
- }
Namespace coreNamespace = coreLibrary.publicNamespace;
Namespace asyncNamespace = asyncLibrary.publicNamespace;
//
// Record outputs.
//
- if (!context.analysisOptions.enableAsync) {
- AnalysisContextImpl contextImpl = context;
- Source asyncSource = context.sourceFactory.forUri(DartSdk.DART_ASYNC);
- asyncLibrary = contextImpl.createMockAsyncLib(coreLibrary, asyncSource);
- asyncNamespace = asyncLibrary.publicNamespace;
- }
TypeProvider typeProvider =
new TypeProviderImpl.forNamespaces(coreNamespace, asyncNamespace);
(context as InternalAnalysisContext).typeProvider = typeProvider;
@@ -4017,7 +4006,6 @@ class ParseDartTask extends SourceBasedAnalysisTask {
Parser parser = new Parser(_source, errorListener);
AnalysisOptions options = context.analysisOptions;
parser.enableAssertInitializer = options.enableAssertInitializer;
- parser.parseAsync = options.enableAsync;
parser.parseFunctionBodies =
options.analyzeFunctionBodiesPredicate(_source);
parser.parseGenericMethods = options.enableGenericMethods;
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698