| 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 deferred_load; | 5 library deferred_load; |
| 6 | 6 |
| 7 import 'common/tasks.dart' show CompilerTask; | 7 import 'common/tasks.dart' show CompilerTask; |
| 8 import 'common.dart'; | 8 import 'common.dart'; |
| 9 import 'compiler.dart' show Compiler; | 9 import 'compiler.dart' show Compiler; |
| 10 import 'constants/expressions.dart' show ConstantExpression; | 10 import 'constants/expressions.dart' show ConstantExpression; |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 element: element.implementation, import: _fakeMainImport); | 713 element: element.implementation, import: _fakeMainImport); |
| 714 } | 714 } |
| 715 for (ClassElement element | 715 for (ClassElement element |
| 716 in closedWorld.backendUsage.globalClassDependencies) { | 716 in closedWorld.backendUsage.globalClassDependencies) { |
| 717 _mapDependencies( | 717 _mapDependencies( |
| 718 element: element.implementation, import: _fakeMainImport); | 718 element: element.implementation, import: _fakeMainImport); |
| 719 } | 719 } |
| 720 | 720 |
| 721 // Now check to see if we have to add more elements due to | 721 // Now check to see if we have to add more elements due to |
| 722 // mirrors. | 722 // mirrors. |
| 723 if (compiler.resolution.commonElements.mirrorsLibrary != null) { | 723 if (closedWorld.backendUsage.isMirrorsUsed) { |
| 724 _addMirrorElements(); | 724 _addMirrorElements(); |
| 725 } | 725 } |
| 726 | 726 |
| 727 // Build the OutputUnits using these two maps. | 727 // Build the OutputUnits using these two maps. |
| 728 Map<Element, OutputUnit> elementToOutputUnitBuilder = | 728 Map<Element, OutputUnit> elementToOutputUnitBuilder = |
| 729 new Map<Element, OutputUnit>(); | 729 new Map<Element, OutputUnit>(); |
| 730 Map<ConstantValue, OutputUnit> constantToOutputUnitBuilder = | 730 Map<ConstantValue, OutputUnit> constantToOutputUnitBuilder = |
| 731 new Map<ConstantValue, OutputUnit>(); | 731 new Map<ConstantValue, OutputUnit>(); |
| 732 | 732 |
| 733 // Add all constants that may have been registered during | 733 // Add all constants that may have been registered during |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 | 1103 |
| 1104 bool operator ==(other) { | 1104 bool operator ==(other) { |
| 1105 if (other is! _DeclaredDeferredImport) return false; | 1105 if (other is! _DeclaredDeferredImport) return false; |
| 1106 return declaration == other.declaration; | 1106 return declaration == other.declaration; |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 int get hashCode => declaration.hashCode * 17; | 1109 int get hashCode => declaration.hashCode * 17; |
| 1110 | 1110 |
| 1111 String toString() => '$declaration'; | 1111 String toString() => '$declaration'; |
| 1112 } | 1112 } |
| OLD | NEW |