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; | |
453 if (member.isClass) { | 452 if (member.isClass) { |
454 enqueueReflectiveElementsInClass(member, recents, includeLibrary); | 453 enqueueReflectiveElementsInClass(member, recents, includeLibrary); |
455 } else { | 454 } else { |
456 enqueueReflectiveMember(member, includeLibrary); | 455 enqueueReflectiveMember(member, includeLibrary); |
457 } | 456 } |
458 }); | 457 }); |
459 } | 458 } |
460 | 459 |
461 /// Enqueue all elements that are matched by the mirrors used | 460 /// Enqueue all elements that are matched by the mirrors used |
462 /// annotation or, in lack thereof, all elements. | 461 /// annotation or, in lack thereof, all elements. |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 } | 1015 } |
1017 | 1016 |
1018 typedef void _DeferredActionFunction(); | 1017 typedef void _DeferredActionFunction(); |
1019 | 1018 |
1020 class _DeferredAction { | 1019 class _DeferredAction { |
1021 final Element element; | 1020 final Element element; |
1022 final _DeferredActionFunction action; | 1021 final _DeferredActionFunction action; |
1023 | 1022 |
1024 _DeferredAction(this.element, this.action); | 1023 _DeferredAction(this.element, this.action); |
1025 } | 1024 } |
OLD | NEW |