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

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

Issue 2960723004: Handle super-method call (Closed)
Patch Set: Created 3 years, 5 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.dart'; 8 import 'common.dart';
9 import 'constants/constant_system.dart'; 9 import 'constants/constant_system.dart';
10 import 'common_elements.dart' show CommonElements, ElementEnvironment; 10 import 'common_elements.dart' show CommonElements, ElementEnvironment;
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 return !_resolverWorld.hasInvokedSetter(element) && 1054 return !_resolverWorld.hasInvokedSetter(element) &&
1055 !_resolverWorld.fieldSetters.contains(element); 1055 !_resolverWorld.fieldSetters.contains(element);
1056 } 1056 }
1057 return false; 1057 return false;
1058 } 1058 }
1059 1059
1060 SideEffects getSideEffectsOfSelector(Selector selector, TypeMask mask) { 1060 SideEffects getSideEffectsOfSelector(Selector selector, TypeMask mask) {
1061 // We're not tracking side effects of closures. 1061 // We're not tracking side effects of closures.
1062 if (selector.isClosureCall) return new SideEffects(); 1062 if (selector.isClosureCall) return new SideEffects();
1063 SideEffects sideEffects = new SideEffects.empty(); 1063 SideEffects sideEffects = new SideEffects.empty();
1064 for (MemberElement e in _allFunctions.filter(selector, mask, this)) { 1064 for (MemberEntity e in _allFunctions.filter(selector, mask, this)) {
1065 if (e.isField) { 1065 if (e.isField) {
1066 if (selector.isGetter) { 1066 if (selector.isGetter) {
1067 if (!fieldNeverChanges(e)) { 1067 if (!fieldNeverChanges(e)) {
1068 sideEffects.setDependsOnInstancePropertyStore(); 1068 sideEffects.setDependsOnInstancePropertyStore();
1069 } 1069 }
1070 } else if (selector.isSetter) { 1070 } else if (selector.isSetter) {
1071 sideEffects.setChangesInstanceProperty(); 1071 sideEffects.setChangesInstanceProperty();
1072 } else { 1072 } else {
1073 assert(selector.isCall); 1073 assert(selector.isCall);
1074 sideEffects.setAllSideEffects(); 1074 sideEffects.setAllSideEffects();
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 // does not see generative constructor bodies because they are 1305 // does not see generative constructor bodies because they are
1306 // created by the backend. Also, it does not make any distinction 1306 // created by the backend. Also, it does not make any distinction
1307 // between a constructor and its body for side effects. This 1307 // between a constructor and its body for side effects. This
1308 // implies that currently, the side effects of a constructor body 1308 // implies that currently, the side effects of a constructor body
1309 // contain the side effects of the initializers. 1309 // contain the side effects of the initializers.
1310 assert(!element.isGenerativeConstructorBody); 1310 assert(!element.isGenerativeConstructorBody);
1311 assert(!element.isField); 1311 assert(!element.isField);
1312 return super.getSideEffectsOfElement(element); 1312 return super.getSideEffectsOfElement(element);
1313 } 1313 }
1314 } 1314 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698