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

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

Issue 1591653003: plumb through enableAsync (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: remove work-in-progress 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/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 3d511451a1a3b0c989925e36781a01c556354741..0e9488321db3335eb5d3e7e04a369193d05fc9e0 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -9,6 +9,7 @@ import 'dart:collection';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/context/cache.dart';
+import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/constant.dart';
@@ -1488,7 +1489,7 @@ class BuildLibraryElementTask extends SourceBasedAnalysisTask {
for (Directive directive in directivesToResolve) {
directive.element = libraryElement;
}
- BuildLibraryElementUtils.patchTopLevelAccessors(libraryElement);
+ BuildLibraryElementUtils.patchTopLevelAccessors(libraryElement);
if (libraryDirective != null) {
_setDoc(libraryElement, libraryDirective);
}
@@ -1717,6 +1718,11 @@ class BuildTypeProviderTask extends SourceBasedAnalysisTask {
//
// Record outputs.
//
+ if (!context.analysisOptions.enableAsync) {
Brian Wilkerson 2016/01/15 18:59:50 Not sure why we need to do this. If we create a mo
danrubel 2016/01/15 19:14:29 We create mock elements to satisfy the typeProvide
+ AnalysisContextImpl contextImpl = context;
+ asyncLibrary = contextImpl.createMockAsyncLib(coreLibrary);
+ asyncNamespace = asyncLibrary.publicNamespace;
+ }
TypeProvider typeProvider =
new TypeProviderImpl.forNamespaces(coreNamespace, asyncNamespace);
(context as InternalAnalysisContext).typeProvider = typeProvider;

Powered by Google App Engine
This is Rietveld 408576698