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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
334 | 334 |
335 // TODO(sigurdm): How is metadata on a patch-class handled? | 335 // TODO(sigurdm): How is metadata on a patch-class handled? |
336 for (MetadataAnnotation metadata in element.metadata) { | 336 for (MetadataAnnotation metadata in element.metadata) { |
337 ConstantValue constant = | 337 ConstantValue constant = |
338 backend.constants.getConstantValueForMetadata(metadata); | 338 backend.constants.getConstantValueForMetadata(metadata); |
339 if (constant != null) { | 339 if (constant != null) { |
340 constants.add(constant); | 340 constants.add(constant); |
341 } | 341 } |
342 } | 342 } |
343 | 343 |
344 if (element is FunctionElement && | 344 if (element is FunctionElement) { |
345 compiler.resolverWorld.closurizedMembers.contains(element)) { | |
Siggi Cherem (dart-lang)
2015/10/12 22:53:28
mmm - would this pull in more than needed? Seems l
Harry Terkelsen
2015/10/13 17:27:34
The class to superclass dependency is handled here
Siggi Cherem (dart-lang)
2015/10/13 20:16:29
Thanks for the pointer. Sorry for the confusion -
| |
346 collectTypeDependencies(element.type); | 345 collectTypeDependencies(element.type); |
347 } | 346 } |
348 | 347 |
349 if (element.isClass) { | 348 if (element.isClass) { |
350 // If we see a class, add everything its live instance members refer | 349 // If we see a class, add everything its live instance members refer |
351 // to. Static members are not relevant, unless we are processing | 350 // to. Static members are not relevant, unless we are processing |
352 // extra dependencies due to mirrors. | 351 // extra dependencies due to mirrors. |
353 void addLiveInstanceMember(Element element) { | 352 void addLiveInstanceMember(Element element) { |
354 if (!compiler.enqueuer.resolution.hasBeenProcessed(element)) return; | 353 if (!compiler.enqueuer.resolution.hasBeenProcessed(element)) return; |
355 if (!isMirrorUsage && !element.isInstanceMember) return; | 354 if (!isMirrorUsage && !element.isInstanceMember) return; |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
935 return result; | 934 return result; |
936 } | 935 } |
937 | 936 |
938 bool operator ==(other) { | 937 bool operator ==(other) { |
939 if (other is! _DeclaredDeferredImport) return false; | 938 if (other is! _DeclaredDeferredImport) return false; |
940 return declaration == other.declaration; | 939 return declaration == other.declaration; |
941 } | 940 } |
942 | 941 |
943 int get hashCode => declaration.hashCode * 17; | 942 int get hashCode => declaration.hashCode * 17; |
944 } | 943 } |
OLD | NEW |