| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 dart2js.enqueue; | 5 library dart2js.enqueue; |
| 6 | 6 |
| 7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
| 8 | 8 |
| 9 import 'common/codegen.dart' show CodegenWorkItem; | 9 import 'common/codegen.dart' show CodegenWorkItem; |
| 10 import 'common/names.dart' show Identifiers; | 10 import 'common/names.dart' show Identifiers; |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 442 } |
| 443 } | 443 } |
| 444 | 444 |
| 445 /// Enqeue all local members of the library [lib] if they are required for | 445 /// Enqeue all local members of the library [lib] if they are required for |
| 446 /// reflection. | 446 /// reflection. |
| 447 void enqueueReflectiveElementsInLibrary( | 447 void enqueueReflectiveElementsInLibrary( |
| 448 LibraryElement lib, Iterable<ClassElement> recents) { | 448 LibraryElement lib, Iterable<ClassElement> recents) { |
| 449 bool includeLibrary = | 449 bool includeLibrary = |
| 450 shouldIncludeElementDueToMirrors(lib, includedEnclosing: false); | 450 shouldIncludeElementDueToMirrors(lib, includedEnclosing: false); |
| 451 lib.forEachLocalMember((Element member) { | 451 lib.forEachLocalMember((Element member) { |
| 452 if (member.isInjected) return; |
| 452 if (member.isClass) { | 453 if (member.isClass) { |
| 453 enqueueReflectiveElementsInClass(member, recents, includeLibrary); | 454 enqueueReflectiveElementsInClass(member, recents, includeLibrary); |
| 454 } else { | 455 } else { |
| 455 enqueueReflectiveMember(member, includeLibrary); | 456 enqueueReflectiveMember(member, includeLibrary); |
| 456 } | 457 } |
| 457 }); | 458 }); |
| 458 } | 459 } |
| 459 | 460 |
| 460 /// Enqueue all elements that are matched by the mirrors used | 461 /// Enqueue all elements that are matched by the mirrors used |
| 461 /// annotation or, in lack thereof, all elements. | 462 /// annotation or, in lack thereof, all elements. |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 } | 1016 } |
| 1016 | 1017 |
| 1017 typedef void _DeferredActionFunction(); | 1018 typedef void _DeferredActionFunction(); |
| 1018 | 1019 |
| 1019 class _DeferredAction { | 1020 class _DeferredAction { |
| 1020 final Element element; | 1021 final Element element; |
| 1021 final _DeferredActionFunction action; | 1022 final _DeferredActionFunction action; |
| 1022 | 1023 |
| 1023 _DeferredAction(this.element, this.action); | 1024 _DeferredAction(this.element, this.action); |
| 1024 } | 1025 } |
| OLD | NEW |