Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: pkg/compiler/lib/src/world.dart

Issue 2804233002: Use Set<ClassEntity> instead of Set<MixinApplicationElement> (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698