| 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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 MemberElement locateSingleElement(Selector selector, TypeMask mask) { | 1066 MemberElement locateSingleElement(Selector selector, TypeMask mask) { |
| 1067 assert(isClosed); | 1067 assert(isClosed); |
| 1068 mask ??= commonMasks.dynamicType; | 1068 mask ??= commonMasks.dynamicType; |
| 1069 return mask.locateSingleElement(selector, this); | 1069 return mask.locateSingleElement(selector, this); |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) { | 1072 TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) { |
| 1073 assert(isClosed); | 1073 assert(isClosed); |
| 1074 bool canReachAll = true; | 1074 bool canReachAll = true; |
| 1075 if (mask != null) { | 1075 if (mask != null) { |
| 1076 canReachAll = _backend.hasInvokeOnSupport && | 1076 canReachAll = _backend.backendUsage.isInvokeOnUsed && |
| 1077 mask.needsNoSuchMethodHandling(selector, this); | 1077 mask.needsNoSuchMethodHandling(selector, this); |
| 1078 } | 1078 } |
| 1079 return canReachAll ? commonMasks.dynamicType : mask; | 1079 return canReachAll ? commonMasks.dynamicType : mask; |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 void addFunctionCalledInLoop(Element element) { | 1082 void addFunctionCalledInLoop(Element element) { |
| 1083 functionsCalledInLoop.add(element.declaration); | 1083 functionsCalledInLoop.add(element.declaration); |
| 1084 } | 1084 } |
| 1085 | 1085 |
| 1086 bool isCalledInLoop(Element element) { | 1086 bool isCalledInLoop(Element element) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 return getMightBePassedToApply(element.expression); | 1183 return getMightBePassedToApply(element.expression); |
| 1184 } | 1184 } |
| 1185 return functionsThatMightBePassedToApply.contains(element); | 1185 return functionsThatMightBePassedToApply.contains(element); |
| 1186 } | 1186 } |
| 1187 | 1187 |
| 1188 @override | 1188 @override |
| 1189 bool getCurrentlyKnownMightBePassedToApply(Element element) { | 1189 bool getCurrentlyKnownMightBePassedToApply(Element element) { |
| 1190 return getMightBePassedToApply(element); | 1190 return getMightBePassedToApply(element); |
| 1191 } | 1191 } |
| 1192 } | 1192 } |
| OLD | NEW |