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 | 7 import 'dart:collection' show |
8 Queue; | 8 Queue; |
9 | 9 |
10 import 'common.dart'; | 10 import 'common.dart'; |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 * During resolution, we have to resort to matching elements against the | 792 * During resolution, we have to resort to matching elements against the |
793 * [MirrorsUsed] pattern, as we do not have a complete picture of the world, | 793 * [MirrorsUsed] pattern, as we do not have a complete picture of the world, |
794 * yet. | 794 * yet. |
795 */ | 795 */ |
796 bool shouldIncludeElementDueToMirrors(Element element, | 796 bool shouldIncludeElementDueToMirrors(Element element, |
797 {bool includedEnclosing}) { | 797 {bool includedEnclosing}) { |
798 return includedEnclosing || compiler.backend.requiredByMirrorSystem(element)
; | 798 return includedEnclosing || compiler.backend.requiredByMirrorSystem(element)
; |
799 } | 799 } |
800 | 800 |
801 bool internalAddToWorkList(Element element) { | 801 bool internalAddToWorkList(Element element) { |
802 if (element.isErroneous) return false; | 802 if (element.isMalformed) return false; |
803 | 803 |
804 assert(invariant(element, element is AnalyzableElement, | 804 assert(invariant(element, element is AnalyzableElement, |
805 message: 'Element $element is not analyzable.')); | 805 message: 'Element $element is not analyzable.')); |
806 if (hasBeenProcessed(element)) return false; | 806 if (hasBeenProcessed(element)) return false; |
807 if (queueIsClosed) { | 807 if (queueIsClosed) { |
808 throw new SpannableAssertionFailure(element, | 808 throw new SpannableAssertionFailure(element, |
809 "Resolution work list is closed. Trying to add $element."); | 809 "Resolution work list is closed. Trying to add $element."); |
810 } | 810 } |
811 | 811 |
812 compiler.world.registerUsedElement(element); | 812 compiler.world.registerUsedElement(element); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 @override | 1052 @override |
1053 void processStaticUse(Enqueuer enqueuer, Element element) { | 1053 void processStaticUse(Enqueuer enqueuer, Element element) { |
1054 enqueuer.registerStaticUseInternal(element); | 1054 enqueuer.registerStaticUseInternal(element); |
1055 } | 1055 } |
1056 | 1056 |
1057 @override | 1057 @override |
1058 void processSelector(Enqueuer enqueuer, UniverseSelector selector) { | 1058 void processSelector(Enqueuer enqueuer, UniverseSelector selector) { |
1059 enqueuer.handleUnseenSelectorInternal(selector); | 1059 enqueuer.handleUnseenSelectorInternal(selector); |
1060 } | 1060 } |
1061 } | 1061 } |
OLD | NEW |