| 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 part of js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 typedef void Recompile(Element element); | 7 typedef void Recompile(Element element); |
| 8 | 8 |
| 9 class ReturnInfo { | 9 class ReturnInfo { |
| 10 HType returnType; | 10 HType returnType; |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 // differences. | 998 // differences. |
| 999 assert(interceptorMember.getEnclosingClass() != compiler.objectClass); | 999 assert(interceptorMember.getEnclosingClass() != compiler.objectClass); |
| 1000 }); | 1000 }); |
| 1001 } | 1001 } |
| 1002 | 1002 |
| 1003 void addInterceptorsForNativeClassMembers( | 1003 void addInterceptorsForNativeClassMembers( |
| 1004 ClassElement cls, Enqueuer enqueuer) { | 1004 ClassElement cls, Enqueuer enqueuer) { |
| 1005 if (enqueuer.isResolutionQueue) { | 1005 if (enqueuer.isResolutionQueue) { |
| 1006 cls.ensureResolved(compiler); | 1006 cls.ensureResolved(compiler); |
| 1007 cls.forEachMember((ClassElement classElement, Element member) { | 1007 cls.forEachMember((ClassElement classElement, Element member) { |
| 1008 // All methods on [Object] are shadowed by [Interceptor]. | 1008 if (member.isSynthesized) return; |
| 1009 if (classElement == compiler.objectClass) return; | 1009 // All methods on [Object] are shadowed by [Interceptor]. |
| 1010 Set<Element> set = interceptedElements.putIfAbsent( | 1010 if (classElement == compiler.objectClass) return; |
| 1011 member.name, () => new Set<Element>()); | 1011 Set<Element> set = interceptedElements.putIfAbsent( |
| 1012 set.add(member); | 1012 member.name, () => new Set<Element>()); |
| 1013 if (classElement == jsInterceptorClass) return; | 1013 set.add(member); |
| 1014 if (!classElement.isNative()) { | 1014 if (classElement == jsInterceptorClass) return; |
| 1015 MixinApplicationElement mixinApplication = classElement; | 1015 if (!classElement.isNative()) { |
| 1016 assert(member.getEnclosingClass() == mixinApplication.mixin); | 1016 MixinApplicationElement mixinApplication = classElement; |
| 1017 classesMixedIntoNativeClasses.add(mixinApplication.mixin); | 1017 assert(member.getEnclosingClass() == mixinApplication.mixin); |
| 1018 } | 1018 classesMixedIntoNativeClasses.add(mixinApplication.mixin); |
| 1019 }, | 1019 } |
| 1020 includeSuperMembers: true); | 1020 }, |
| 1021 includeSuperMembers: true); |
| 1021 } | 1022 } |
| 1022 } | 1023 } |
| 1023 | 1024 |
| 1024 void addInterceptors(ClassElement cls, | 1025 void addInterceptors(ClassElement cls, |
| 1025 Enqueuer enqueuer, | 1026 Enqueuer enqueuer, |
| 1026 TreeElements elements) { | 1027 TreeElements elements) { |
| 1027 if (enqueuer.isResolutionQueue) { | 1028 if (enqueuer.isResolutionQueue) { |
| 1028 cls.ensureResolved(compiler); | 1029 cls.ensureResolved(compiler); |
| 1029 cls.forEachMember((ClassElement classElement, Element member) { | 1030 cls.forEachMember((ClassElement classElement, Element member) { |
| 1030 // All methods on [Object] are shadowed by [Interceptor]. | 1031 // All methods on [Object] are shadowed by [Interceptor]. |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1842 ClassElement get constListImplementation => jsArrayClass; | 1843 ClassElement get constListImplementation => jsArrayClass; |
| 1843 ClassElement get fixedListImplementation => jsFixedArrayClass; | 1844 ClassElement get fixedListImplementation => jsFixedArrayClass; |
| 1844 ClassElement get growableListImplementation => jsExtendableArrayClass; | 1845 ClassElement get growableListImplementation => jsExtendableArrayClass; |
| 1845 ClassElement get mapImplementation => mapLiteralClass; | 1846 ClassElement get mapImplementation => mapLiteralClass; |
| 1846 ClassElement get constMapImplementation => constMapLiteralClass; | 1847 ClassElement get constMapImplementation => constMapLiteralClass; |
| 1847 ClassElement get functionImplementation => jsFunctionClass; | 1848 ClassElement get functionImplementation => jsFunctionClass; |
| 1848 ClassElement get typeImplementation => typeLiteralClass; | 1849 ClassElement get typeImplementation => typeLiteralClass; |
| 1849 ClassElement get boolImplementation => jsBoolClass; | 1850 ClassElement get boolImplementation => jsBoolClass; |
| 1850 ClassElement get nullImplementation => jsNullClass; | 1851 ClassElement get nullImplementation => jsNullClass; |
| 1851 } | 1852 } |
| OLD | NEW |