| 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 js_backend.backend; | 5 library js_backend.backend; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/backend_api.dart' | 8 import '../common/backend_api.dart' |
| 9 show ForeignResolver, NativeRegistry, ImpactTransformer; | 9 show ForeignResolver, NativeRegistry, ImpactTransformer; |
| 10 import '../common/codegen.dart' show CodegenImpact, CodegenWorkItem; | 10 import '../common/codegen.dart' show CodegenImpact, CodegenWorkItem; |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 /// Maps compile-time classes to their runtime class. The runtime class is | 699 /// Maps compile-time classes to their runtime class. The runtime class is |
| 700 /// always a superclass or the class itself. | 700 /// always a superclass or the class itself. |
| 701 ClassElement getRuntimeClass(ClassElement class_) { | 701 ClassElement getRuntimeClass(ClassElement class_) { |
| 702 if (class_.isSubclassOf(commonElements.jsIntClass)) | 702 if (class_.isSubclassOf(commonElements.jsIntClass)) |
| 703 return commonElements.jsIntClass; | 703 return commonElements.jsIntClass; |
| 704 if (class_.isSubclassOf(commonElements.jsArrayClass)) | 704 if (class_.isSubclassOf(commonElements.jsArrayClass)) |
| 705 return commonElements.jsArrayClass; | 705 return commonElements.jsArrayClass; |
| 706 return class_; | 706 return class_; |
| 707 } | 707 } |
| 708 | 708 |
| 709 bool operatorEqHandlesNullArgument(FunctionElement operatorEqfunction) { | 709 bool operatorEqHandlesNullArgument(FunctionEntity operatorEqfunction) { |
| 710 return specialOperatorEqClasses.contains(operatorEqfunction.enclosingClass); | 710 return specialOperatorEqClasses.contains(operatorEqfunction.enclosingClass); |
| 711 } | 711 } |
| 712 | 712 |
| 713 void validateInterceptorImplementsAllObjectMethods( | 713 void validateInterceptorImplementsAllObjectMethods( |
| 714 ClassEntity interceptorClass) { | 714 ClassEntity interceptorClass) { |
| 715 if (interceptorClass == null) return; | 715 if (interceptorClass == null) return; |
| 716 ClassEntity objectClass = commonElements.objectClass; | 716 ClassEntity objectClass = commonElements.objectClass; |
| 717 compiler.elementEnvironment.forEachClassMember(objectClass, | 717 compiler.elementEnvironment.forEachClassMember(objectClass, |
| 718 (_, MemberEntity member) { | 718 (_, MemberEntity member) { |
| 719 if (member.isConstructor) return; | 719 if (member.isConstructor) return; |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1432 | 1432 |
| 1433 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { | 1433 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { |
| 1434 return !selector.isGetter; | 1434 return !selector.isGetter; |
| 1435 } | 1435 } |
| 1436 | 1436 |
| 1437 /// Returns `true` if [member] is called from a subclass via `super`. | 1437 /// Returns `true` if [member] is called from a subclass via `super`. |
| 1438 bool isAliasedSuperMember(MemberEntity member) { | 1438 bool isAliasedSuperMember(MemberEntity member) { |
| 1439 return _aliasedSuperMembers.contains(member); | 1439 return _aliasedSuperMembers.contains(member); |
| 1440 } | 1440 } |
| 1441 } | 1441 } |
| OLD | NEW |