| 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.dart'; | 7 import 'common.dart'; |
| 8 import 'common/backend_api.dart' show | 8 import 'common/backend_api.dart' show |
| 9 Backend; | 9 Backend; |
| 10 import 'common/tasks.dart' show | 10 import 'common/tasks.dart' show |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 /// Finds all elements and constants that [element] depends directly on. | 252 /// Finds all elements and constants that [element] depends directly on. |
| 253 /// (not the transitive closure.) | 253 /// (not the transitive closure.) |
| 254 /// | 254 /// |
| 255 /// Adds the results to [elements] and [constants]. | 255 /// Adds the results to [elements] and [constants]. |
| 256 void _collectAllElementsAndConstantsResolvedFrom( | 256 void _collectAllElementsAndConstantsResolvedFrom( |
| 257 Element element, | 257 Element element, |
| 258 Set<Element> elements, | 258 Set<Element> elements, |
| 259 Set<ConstantValue> constants, | 259 Set<ConstantValue> constants, |
| 260 isMirrorUsage) { | 260 isMirrorUsage) { |
| 261 | 261 |
| 262 if (element.isErroneous) { | 262 if (element.isMalformed) { |
| 263 // Erroneous elements are ignored. | 263 // Malformed elements are ignored. |
| 264 return; | 264 return; |
| 265 } | 265 } |
| 266 | 266 |
| 267 /// Recursively collects all the dependencies of [type]. | 267 /// Recursively collects all the dependencies of [type]. |
| 268 void collectTypeDependencies(DartType type) { | 268 void collectTypeDependencies(DartType type) { |
| 269 // TODO(het): we would like to separate out types that are only needed for | 269 // TODO(het): we would like to separate out types that are only needed for |
| 270 // rti from types that are needed for their members. | 270 // rti from types that are needed for their members. |
| 271 if (type is GenericType) { | 271 if (type is GenericType) { |
| 272 type.typeArguments.forEach(collectTypeDependencies); | 272 type.typeArguments.forEach(collectTypeDependencies); |
| 273 } | 273 } |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 return result; | 982 return result; |
| 983 } | 983 } |
| 984 | 984 |
| 985 bool operator ==(other) { | 985 bool operator ==(other) { |
| 986 if (other is! _DeclaredDeferredImport) return false; | 986 if (other is! _DeclaredDeferredImport) return false; |
| 987 return declaration == other.declaration; | 987 return declaration == other.declaration; |
| 988 } | 988 } |
| 989 | 989 |
| 990 int get hashCode => declaration.hashCode * 17; | 990 int get hashCode => declaration.hashCode * 17; |
| 991 } | 991 } |
| OLD | NEW |