Chromium Code Reviews| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 312 collectTypeDependencies(argumentType); | 312 collectTypeDependencies(argumentType); |
| 313 } | 313 } |
| 314 for (ResolutionDartType argumentType in type.namedParameterTypes) { | 314 for (ResolutionDartType argumentType in type.namedParameterTypes) { |
| 315 collectTypeDependencies(argumentType); | 315 collectTypeDependencies(argumentType); |
| 316 } | 316 } |
| 317 collectTypeDependencies(type.returnType); | 317 collectTypeDependencies(type.returnType); |
| 318 } else if (type is ResolutionTypedefType) { | 318 } else if (type is ResolutionTypedefType) { |
| 319 elements.add(type.element); | 319 elements.add(type.element); |
| 320 collectTypeDependencies(type.unaliased); | 320 collectTypeDependencies(type.unaliased); |
| 321 } else if (type is ResolutionInterfaceType) { | 321 } else if (type is ResolutionInterfaceType) { |
| 322 elements.add(type.element); | 322 if (elements.add(type.element)) { |
| 323 collectTypeDependencies(type.element.supertype); | |
|
Siggi Cherem (dart-lang)
2017/08/11 21:34:52
I believe this may be including transitive deps, w
| |
| 324 } | |
| 323 } | 325 } |
| 324 } | 326 } |
| 325 | 327 |
| 326 /// Collects all direct dependencies of [element]. | 328 /// Collects all direct dependencies of [element]. |
| 327 /// | 329 /// |
| 328 /// The collected dependent elements and constants are are added to | 330 /// The collected dependent elements and constants are are added to |
| 329 /// [elements] and [constants] respectively. | 331 /// [elements] and [constants] respectively. |
| 330 void collectDependencies(Element element) { | 332 void collectDependencies(Element element) { |
| 331 // TODO(johnniwinther): Remove this when [AbstractFieldElement] has been | 333 // TODO(johnniwinther): Remove this when [AbstractFieldElement] has been |
| 332 // removed. | 334 // removed. |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1122 | 1124 |
| 1123 bool operator ==(other) { | 1125 bool operator ==(other) { |
| 1124 if (other is! _DeclaredDeferredImport) return false; | 1126 if (other is! _DeclaredDeferredImport) return false; |
| 1125 return declaration == other.declaration; | 1127 return declaration == other.declaration; |
| 1126 } | 1128 } |
| 1127 | 1129 |
| 1128 int get hashCode => declaration.hashCode * 17; | 1130 int get hashCode => declaration.hashCode * 17; |
| 1129 | 1131 |
| 1130 String toString() => '$declaration'; | 1132 String toString() => '$declaration'; |
| 1131 } | 1133 } |
| OLD | NEW |