| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/element_handle.dart'; | 9 import 'package:analyzer/src/generated/element_handle.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 unlinkedDefiningUnit.publicNamespace.exports.length); | 688 unlinkedDefiningUnit.publicNamespace.exports.length); |
| 689 for (int i = 0; i < unlinkedDefiningUnit.exports.length; i++) { | 689 for (int i = 0; i < unlinkedDefiningUnit.exports.length; i++) { |
| 690 exports.add(buildExport(unlinkedDefiningUnit.publicNamespace.exports[i], | 690 exports.add(buildExport(unlinkedDefiningUnit.publicNamespace.exports[i], |
| 691 unlinkedDefiningUnit.exports[i])); | 691 unlinkedDefiningUnit.exports[i])); |
| 692 } | 692 } |
| 693 libraryElement.exports = exports; | 693 libraryElement.exports = exports; |
| 694 populateUnit(definingCompilationUnit, 0); | 694 populateUnit(definingCompilationUnit, 0); |
| 695 for (int i = 0; i < parts.length; i++) { | 695 for (int i = 0; i < parts.length; i++) { |
| 696 populateUnit(parts[i], i + 1); | 696 populateUnit(parts[i], i + 1); |
| 697 } | 697 } |
| 698 BuildLibraryElementUtils.patchTopLevelAccessors(libraryElement); |
| 699 // Update delayed Object class references. |
| 698 if (isCoreLibrary) { | 700 if (isCoreLibrary) { |
| 699 ClassElement objectElement = libraryElement.getType('Object'); | 701 ClassElement objectElement = libraryElement.getType('Object'); |
| 700 assert(objectElement != null); | 702 assert(objectElement != null); |
| 701 for (ClassElementImpl classElement in delayedObjectSubclasses) { | 703 for (ClassElementImpl classElement in delayedObjectSubclasses) { |
| 702 classElement.supertype = objectElement.type; | 704 classElement.supertype = objectElement.type; |
| 703 } | 705 } |
| 704 } | 706 } |
| 705 // Compute namespaces. | 707 // Compute namespaces. |
| 706 libraryElement.publicNamespace = | 708 libraryElement.publicNamespace = |
| 707 new NamespaceBuilder().createPublicNamespaceForLibrary(libraryElement); | 709 new NamespaceBuilder().createPublicNamespaceForLibrary(libraryElement); |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 } | 999 } |
| 998 for (FunctionTypeAliasElement typeAlias in unit.functionTypeAliases) { | 1000 for (FunctionTypeAliasElement typeAlias in unit.functionTypeAliases) { |
| 999 elementMap[typeAlias.name] = typeAlias; | 1001 elementMap[typeAlias.name] = typeAlias; |
| 1000 } | 1002 } |
| 1001 resummarizedElements[absoluteUri] = elementMap; | 1003 resummarizedElements[absoluteUri] = elementMap; |
| 1002 unitHolder = null; | 1004 unitHolder = null; |
| 1003 prelinkedUnit = null; | 1005 prelinkedUnit = null; |
| 1004 unlinkedUnit = null; | 1006 unlinkedUnit = null; |
| 1005 } | 1007 } |
| 1006 } | 1008 } |
| OLD | NEW |