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

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

Issue 1013973003: Use PUBLIC_NAMESPACE for computing TypeProvider. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/resolver.dart ('k') | no next file » | 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 472897bbf764eda38e1a038facf6df3432343a54..29211dfdea46d98db545d4c9e62d3accfe211c4c 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -830,12 +830,12 @@ class BuildPublicNamespaceTask extends SourceBasedAnalysisTask {
*/
class BuildTypeProviderTask extends SourceBasedAnalysisTask {
/**
- * The [RESOLVED_UNIT3] input of the `dart:core` library.
+ * The [PUBLIC_NAMESPACE] input of the `dart:core` library.
*/
static const String CORE_INPUT = 'CORE_INPUT';
/**
- * The [RESOLVED_UNIT3] input of the `dart:async` library.
+ * The [PUBLIC_NAMESPACE] input of the `dart:async` library.
*/
static const String ASYNC_INPUT = 'ASYNC_INPUT';
@@ -855,14 +855,13 @@ class BuildTypeProviderTask extends SourceBasedAnalysisTask {
@override
void internalPerform() {
- CompilationUnit coreUnit = getRequiredInput(CORE_INPUT);
- CompilationUnit asyncUnit = getRequiredInput(ASYNC_INPUT);
- LibraryElement coreLibrary = coreUnit.element.library;
- LibraryElement asyncLibrary = asyncUnit.element.library;
+ Namespace coreNamespace = getRequiredInput(CORE_INPUT);
+ Namespace asyncNamespace = getRequiredInput(ASYNC_INPUT);
//
// Record outputs.
//
- TypeProvider typeProvider = new TypeProviderImpl(coreLibrary, asyncLibrary);
+ TypeProvider typeProvider =
+ new TypeProviderImpl.forNamespaces(coreNamespace, asyncNamespace);
(context as ExtendedAnalysisContext).typeProvider = typeProvider;
outputs[TYPE_PROVIDER] = typeProvider;
}
@@ -872,8 +871,8 @@ class BuildTypeProviderTask extends SourceBasedAnalysisTask {
Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE);
Source asyncSource = sourceFactory.forUri(DartSdk.DART_ASYNC);
return <String, TaskInput>{
- CORE_INPUT: RESOLVED_UNIT3.inputFor(coreSource),
- ASYNC_INPUT: RESOLVED_UNIT3.inputFor(asyncSource)
+ CORE_INPUT: PUBLIC_NAMESPACE.inputFor(coreSource),
+ ASYNC_INPUT: PUBLIC_NAMESPACE.inputFor(asyncSource)
};
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698