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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1211523003: Remove BuildFunctionTypeAliasesTask. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/context/context.dart ('k') | pkg/analyzer/lib/src/plugin/engine_plugin.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 59a119cbb9f95b1c9ffb6646eb92470c7ff1992f..422a8e2f14def5866731e4f9ca9f433dfd1acc08 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -7837,7 +7837,6 @@ class LibraryResolver {
}
_buildDirectiveModels();
_typeProvider = new TypeProviderImpl(coreElement, asyncElement);
- _buildTypeAliases();
_buildTypeHierarchies();
//
// Perform resolution and type analysis.
@@ -7917,7 +7916,6 @@ class LibraryResolver {
_buildDirectiveModels();
_typeProvider = new TypeProviderImpl(coreElement, asyncElement);
_buildEnumMembers();
- _buildTypeAliases();
_buildTypeHierarchies();
_buildImplicitConstructors();
//
@@ -8216,37 +8214,6 @@ class LibraryResolver {
}
/**
- * Resolve the types referenced by function type aliases across all of the function type aliases
- * defined in the current cycle.
- *
- * @throws AnalysisException if any of the function type aliases could not be resolved
- */
- void _buildTypeAliases() {
- PerformanceStatistics.resolve.makeCurrentWhile(() {
- List<LibraryResolver_TypeAliasInfo> typeAliases =
- new List<LibraryResolver_TypeAliasInfo>();
- for (Library library in _librariesInCycles) {
- for (Source source in library.compilationUnitSources) {
- CompilationUnit ast = library.getAST(source);
- for (CompilationUnitMember member in ast.declarations) {
- if (member is FunctionTypeAlias) {
- typeAliases.add(
- new LibraryResolver_TypeAliasInfo(library, source, member));
- }
- }
- }
- }
- // TODO(brianwilkerson) We need to sort the type aliases such that all
- // aliases referenced by an alias T are resolved before we resolve T.
- for (LibraryResolver_TypeAliasInfo info in typeAliases) {
- TypeResolverVisitor visitor = new TypeResolverVisitor.con1(
- info._library, info._source, _typeProvider);
- info._typeAlias.accept(visitor);
- }
- });
- }
-
- /**
* Resolve the type hierarchy across all of the types declared in the libraries in the current
* cycle.
*
@@ -8685,7 +8652,6 @@ class LibraryResolver2 {
_buildDirectiveModels();
_typeProvider = new TypeProviderImpl(coreElement, asyncElement);
_buildEnumMembers();
- _buildTypeAliases();
_buildTypeHierarchies();
_buildImplicitConstructors();
//
@@ -8925,38 +8891,6 @@ class LibraryResolver2 {
}
/**
- * Resolve the types referenced by function type aliases across all of the function type aliases
- * defined in the current cycle.
- *
- * @throws AnalysisException if any of the function type aliases could not be resolved
- */
- void _buildTypeAliases() {
- PerformanceStatistics.resolve.makeCurrentWhile(() {
- List<LibraryResolver2_TypeAliasInfo> typeAliases =
- new List<LibraryResolver2_TypeAliasInfo>();
- for (ResolvableLibrary library in _librariesInCycle) {
- for (ResolvableCompilationUnit unit
- in library.resolvableCompilationUnits) {
- for (CompilationUnitMember member
- in unit.compilationUnit.declarations) {
- if (member is FunctionTypeAlias) {
- typeAliases.add(new LibraryResolver2_TypeAliasInfo(
- library, unit.source, member));
- }
- }
- }
- }
- // TODO(brianwilkerson) We need to sort the type aliases such that all
- // aliases referenced by an alias T are resolved before we resolve T.
- for (LibraryResolver2_TypeAliasInfo info in typeAliases) {
- TypeResolverVisitor visitor = new TypeResolverVisitor.con4(
- info._library, info._source, _typeProvider);
- info._typeAlias.accept(visitor);
- }
- });
- }
-
- /**
* Resolve the type hierarchy across all of the types declared in the libraries in the current
* cycle.
*
@@ -14042,11 +13976,8 @@ class TypeResolverVisitor extends ScopedVisitor {
Object visitFunctionTypeAlias(FunctionTypeAlias node) {
FunctionTypeAliasElementImpl element =
node.element as FunctionTypeAliasElementImpl;
- if (element.returnType == null) {
- // Only visit function type aliases once.
- super.visitFunctionTypeAlias(node);
- element.returnType = _computeReturnType(node.returnType);
- }
+ super.visitFunctionTypeAlias(node);
+ element.returnType = _computeReturnType(node.returnType);
return null;
}
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/src/plugin/engine_plugin.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698