| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /** | 5 /** |
| 6 * This library is capable of producing linked summaries from unlinked | 6 * This library is capable of producing linked summaries from unlinked |
| 7 * ones (or prelinked ones). It functions by building a miniature | 7 * ones (or prelinked ones). It functions by building a miniature |
| 8 * element model to represent the contents of the summaries, and then | 8 * element model to represent the contents of the summaries, and then |
| 9 * scanning the element model to gather linked information and adding | 9 * scanning the element model to gather linked information and adding |
| 10 * it to the summary data structures. | 10 * it to the summary data structures. |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 ConstructorElementForLink constructor = constructorElement | 643 ConstructorElementForLink constructor = constructorElement |
| 644 .enclosingElement | 644 .enclosingElement |
| 645 .getContainedName(constructorInitializer.name) | 645 .getContainedName(constructorInitializer.name) |
| 646 .asConstructor; | 646 .asConstructor; |
| 647 safeAddDependency(constructor?._constNode); | 647 safeAddDependency(constructor?._constNode); |
| 648 } | 648 } |
| 649 CompilationUnitElementForLink compilationUnit = | 649 CompilationUnitElementForLink compilationUnit = |
| 650 constructorElement.enclosingElement.enclosingElement; | 650 constructorElement.enclosingElement.enclosingElement; |
| 651 collectDependencies( | 651 collectDependencies( |
| 652 dependencies, constructorInitializer.expression, compilationUnit); | 652 dependencies, constructorInitializer.expression, compilationUnit); |
| 653 constructorInitializer.arguments.map((UnlinkedConst unlinkedConst) => | 653 for (UnlinkedConst unlinkedConst in constructorInitializer.arguments) { |
| 654 collectDependencies(dependencies, unlinkedConst, compilationUnit)); | 654 collectDependencies(dependencies, unlinkedConst, compilationUnit); |
| 655 } |
| 655 } | 656 } |
| 656 | 657 |
| 657 if (defaultSuperInvocationNeeded) { | 658 if (defaultSuperInvocationNeeded) { |
| 658 // No explicit superconstructor invocation found, so we need to | 659 // No explicit superconstructor invocation found, so we need to |
| 659 // manually insert a reference to the implicit superconstructor. | 660 // manually insert a reference to the implicit superconstructor. |
| 660 if (superClass != null && !superClass.isObject) { | 661 if (superClass != null && !superClass.isObject) { |
| 661 ConstructorElementForLink unnamedConstructor = | 662 ConstructorElementForLink unnamedConstructor = |
| 662 superClass.unnamedConstructor; | 663 superClass.unnamedConstructor; |
| 663 safeAddDependency(unnamedConstructor?._constNode); | 664 safeAddDependency(unnamedConstructor?._constNode); |
| 664 } | 665 } |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1602 | 1603 |
| 1603 /** | 1604 /** |
| 1604 * Throw away any information produced by a previous call to [link]. | 1605 * Throw away any information produced by a previous call to [link]. |
| 1605 */ | 1606 */ |
| 1606 void unlink() { | 1607 void unlink() { |
| 1607 for (LibraryElementInBuildUnit library in _librariesInBuildUnit) { | 1608 for (LibraryElementInBuildUnit library in _librariesInBuildUnit) { |
| 1608 library.unlink(); | 1609 library.unlink(); |
| 1609 } | 1610 } |
| 1610 } | 1611 } |
| 1611 } | 1612 } |
| OLD | NEW |