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

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

Issue 2615223003: Use MemberElement instead of Element in function sets and selectors. (Closed)
Patch Set: Created 3 years, 11 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
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 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 1061
1062 void registerSideEffectsFree(Element element) { 1062 void registerSideEffectsFree(Element element) {
1063 sideEffects[element.declaration] = new SideEffects.empty(); 1063 sideEffects[element.declaration] = new SideEffects.empty();
1064 sideEffectsFreeElements.add(element); 1064 sideEffectsFreeElements.add(element);
1065 } 1065 }
1066 1066
1067 SideEffects getSideEffectsOfSelector(Selector selector, TypeMask mask) { 1067 SideEffects getSideEffectsOfSelector(Selector selector, TypeMask mask) {
1068 // We're not tracking side effects of closures. 1068 // We're not tracking side effects of closures.
1069 if (selector.isClosureCall) return new SideEffects(); 1069 if (selector.isClosureCall) return new SideEffects();
1070 SideEffects sideEffects = new SideEffects.empty(); 1070 SideEffects sideEffects = new SideEffects.empty();
1071 for (Element e in allFunctions.filter(selector, mask)) { 1071 for (MemberElement e in allFunctions.filter(selector, mask)) {
1072 if (e.isField) { 1072 if (e.isField) {
1073 if (selector.isGetter) { 1073 if (selector.isGetter) {
1074 if (!fieldNeverChanges(e)) { 1074 if (!fieldNeverChanges(e)) {
1075 sideEffects.setDependsOnInstancePropertyStore(); 1075 sideEffects.setDependsOnInstancePropertyStore();
1076 } 1076 }
1077 } else if (selector.isSetter) { 1077 } else if (selector.isSetter) {
1078 sideEffects.setChangesInstanceProperty(); 1078 sideEffects.setChangesInstanceProperty();
1079 } else { 1079 } else {
1080 assert(selector.isCall); 1080 assert(selector.isCall);
1081 sideEffects.setAllSideEffects(); 1081 sideEffects.setAllSideEffects();
(...skipping 29 matching lines...) Expand all
1111 return getMightBePassedToApply(element.expression); 1111 return getMightBePassedToApply(element.expression);
1112 } 1112 }
1113 return functionsThatMightBePassedToApply.contains(element); 1113 return functionsThatMightBePassedToApply.contains(element);
1114 } 1114 }
1115 1115
1116 @override 1116 @override
1117 bool getCurrentlyKnownMightBePassedToApply(Element element) { 1117 bool getCurrentlyKnownMightBePassedToApply(Element element) {
1118 return getMightBePassedToApply(element); 1118 return getMightBePassedToApply(element);
1119 } 1119 }
1120 } 1120 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698