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.world; | 5 library dart2js.world; |
6 | 6 |
7 import 'closure.dart' show ClosureClassElement, SynthesizedCallMethodElementX; | 7 import 'closure.dart' show ClosureClassElement, SynthesizedCallMethodElementX; |
8 import 'common/backend_api.dart' show BackendClasses; | 8 import 'common/backend_api.dart' show BackendClasses; |
9 import 'common.dart'; | 9 import 'common.dart'; |
10 import 'constants/constant_system.dart'; | 10 import 'constants/constant_system.dart'; |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 assert(isClosed); | 834 assert(isClosed); |
835 if (_liveMixinUses == null) { | 835 if (_liveMixinUses == null) { |
836 _liveMixinUses = new Map<ClassElement, List<MixinApplicationElement>>(); | 836 _liveMixinUses = new Map<ClassElement, List<MixinApplicationElement>>(); |
837 for (ClassElement mixin in _mixinUses.keys) { | 837 for (ClassElement mixin in _mixinUses.keys) { |
838 List<MixinApplicationElement> uses = <MixinApplicationElement>[]; | 838 List<MixinApplicationElement> uses = <MixinApplicationElement>[]; |
839 | 839 |
840 void addLiveUse(MixinApplicationElement mixinApplication) { | 840 void addLiveUse(MixinApplicationElement mixinApplication) { |
841 if (isInstantiated(mixinApplication)) { | 841 if (isInstantiated(mixinApplication)) { |
842 uses.add(mixinApplication); | 842 uses.add(mixinApplication); |
843 } else if (mixinApplication.isNamedMixinApplication) { | 843 } else if (mixinApplication.isNamedMixinApplication) { |
844 Set<MixinApplicationElement> next = _mixinUses[mixinApplication]; | 844 Set<ClassEntity> next = _mixinUses[mixinApplication]; |
845 if (next != null) { | 845 if (next != null) { |
846 next.forEach(addLiveUse); | 846 next.forEach(addLiveUse); |
847 } | 847 } |
848 } | 848 } |
849 } | 849 } |
850 | 850 |
851 _mixinUses[mixin].forEach(addLiveUse); | 851 _mixinUses[mixin].forEach(addLiveUse); |
852 if (uses.isNotEmpty) { | 852 if (uses.isNotEmpty) { |
853 _liveMixinUses[mixin] = uses; | 853 _liveMixinUses[mixin] = uses; |
854 } | 854 } |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 return getMightBePassedToApply(element.expression); | 1192 return getMightBePassedToApply(element.expression); |
1193 } | 1193 } |
1194 return functionsThatMightBePassedToApply.contains(element); | 1194 return functionsThatMightBePassedToApply.contains(element); |
1195 } | 1195 } |
1196 | 1196 |
1197 @override | 1197 @override |
1198 bool getCurrentlyKnownMightBePassedToApply(Element element) { | 1198 bool getCurrentlyKnownMightBePassedToApply(Element element) { |
1199 return getMightBePassedToApply(element); | 1199 return getMightBePassedToApply(element); |
1200 } | 1200 } |
1201 } | 1201 } |
OLD | NEW |