| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library engine.resolver; | 5 library engine.resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart'; | 9 import 'ast.dart'; |
| 10 import 'constant.dart'; | 10 import 'constant.dart'; |
| (...skipping 8153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8164 for (Source source in library.compilationUnitSources) { | 8164 for (Source source in library.compilationUnitSources) { |
| 8165 TypeResolverVisitorFactory typeResolverVisitorFactory = | 8165 TypeResolverVisitorFactory typeResolverVisitorFactory = |
| 8166 analysisContext.typeResolverVisitorFactory; | 8166 analysisContext.typeResolverVisitorFactory; |
| 8167 TypeResolverVisitor visitor = (typeResolverVisitorFactory == null) | 8167 TypeResolverVisitor visitor = (typeResolverVisitorFactory == null) |
| 8168 ? new TypeResolverVisitor(library.libraryElement, source, | 8168 ? new TypeResolverVisitor(library.libraryElement, source, |
| 8169 _typeProvider, library.errorListener, | 8169 _typeProvider, library.errorListener, |
| 8170 nameScope: library.libraryScope) | 8170 nameScope: library.libraryScope) |
| 8171 : typeResolverVisitorFactory(library, source, _typeProvider); | 8171 : typeResolverVisitorFactory(library, source, _typeProvider); |
| 8172 library.getAST(source).accept(visitor); | 8172 library.getAST(source).accept(visitor); |
| 8173 } | 8173 } |
| 8174 library.libraryElement.createLoadLibraryFunction(_typeProvider); |
| 8174 } | 8175 } |
| 8175 }); | 8176 }); |
| 8176 } | 8177 } |
| 8177 | 8178 |
| 8178 /** | 8179 /** |
| 8179 * Compute a dependency map of libraries reachable from the given library. A d
ependency map is a | 8180 * Compute a dependency map of libraries reachable from the given library. A d
ependency map is a |
| 8180 * table that maps individual libraries to a list of the libraries that either
import or export | 8181 * table that maps individual libraries to a list of the libraries that either
import or export |
| 8181 * those libraries. | 8182 * those libraries. |
| 8182 * | 8183 * |
| 8183 * This map is used to compute all of the libraries involved in a cycle that i
nclude the root | 8184 * This map is used to compute all of the libraries involved in a cycle that i
nclude the root |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8850 Source source = unit.source; | 8851 Source source = unit.source; |
| 8851 CompilationUnit ast = unit.compilationUnit; | 8852 CompilationUnit ast = unit.compilationUnit; |
| 8852 TypeResolverVisitor visitor = new TypeResolverVisitor( | 8853 TypeResolverVisitor visitor = new TypeResolverVisitor( |
| 8853 library.libraryElement, | 8854 library.libraryElement, |
| 8854 source, | 8855 source, |
| 8855 _typeProvider, | 8856 _typeProvider, |
| 8856 library.libraryScope.errorListener, | 8857 library.libraryScope.errorListener, |
| 8857 nameScope: library.libraryScope); | 8858 nameScope: library.libraryScope); |
| 8858 ast.accept(visitor); | 8859 ast.accept(visitor); |
| 8859 } | 8860 } |
| 8861 library.libraryElement.createLoadLibraryFunction(_typeProvider); |
| 8860 } | 8862 } |
| 8861 }); | 8863 }); |
| 8862 } | 8864 } |
| 8863 | 8865 |
| 8864 /** | 8866 /** |
| 8865 * Return an array containing the lexical identifiers associated with the node
s in the given list. | 8867 * Return an array containing the lexical identifiers associated with the node
s in the given list. |
| 8866 * | 8868 * |
| 8867 * @param names the AST nodes representing the identifiers | 8869 * @param names the AST nodes representing the identifiers |
| 8868 * @return the lexical identifiers associated with the nodes in the list | 8870 * @return the lexical identifiers associated with the nodes in the list |
| 8869 */ | 8871 */ |
| (...skipping 7093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15963 nonFields.add(node); | 15965 nonFields.add(node); |
| 15964 return null; | 15966 return null; |
| 15965 } | 15967 } |
| 15966 | 15968 |
| 15967 @override | 15969 @override |
| 15968 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 15970 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
| 15969 | 15971 |
| 15970 @override | 15972 @override |
| 15971 Object visitWithClause(WithClause node) => null; | 15973 Object visitWithClause(WithClause node) => null; |
| 15972 } | 15974 } |
| OLD | NEW |