| 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 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 } else if (cls == compiler.numClass || cls == jsNumberClass) { | 1126 } else if (cls == compiler.numClass || cls == jsNumberClass) { |
| 1127 addInterceptors(jsIntClass, enqueuer, elements); | 1127 addInterceptors(jsIntClass, enqueuer, elements); |
| 1128 addInterceptors(jsDoubleClass, enqueuer, elements); | 1128 addInterceptors(jsDoubleClass, enqueuer, elements); |
| 1129 addInterceptors(jsNumberClass, enqueuer, elements); | 1129 addInterceptors(jsNumberClass, enqueuer, elements); |
| 1130 } else if (cls.isNative()) { | 1130 } else if (cls.isNative()) { |
| 1131 addInterceptorsForNativeClassMembers(cls, enqueuer); | 1131 addInterceptorsForNativeClassMembers(cls, enqueuer); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 if (compiler.enableTypeAssertions) { | 1134 if (compiler.enableTypeAssertions) { |
| 1135 // We need to register is checks for assignments to fields. | 1135 // We need to register is checks for assignments to fields. |
| 1136 cls.forEachLocalMember((Element member) { | 1136 cls.forEachMember((Element enclosing, Element member) { |
| 1137 if (!member.isInstanceMember() || !member.isField()) return; | 1137 if (!member.isInstanceMember() || !member.isField()) return; |
| 1138 DartType type = member.computeType(compiler); | 1138 DartType type = member.computeType(compiler); |
| 1139 enqueuer.registerIsCheck(type, elements); | 1139 enqueuer.registerIsCheck(type, elements); |
| 1140 }); | 1140 }, includeSuperMembers: true); |
| 1141 } | 1141 } |
| 1142 } | 1142 } |
| 1143 | 1143 |
| 1144 void registerUseInterceptor(Enqueuer enqueuer) { | 1144 void registerUseInterceptor(Enqueuer enqueuer) { |
| 1145 assert(!enqueuer.isResolutionQueue); | 1145 assert(!enqueuer.isResolutionQueue); |
| 1146 if (!enqueuer.nativeEnqueuer.hasNativeClasses()) return; | 1146 if (!enqueuer.nativeEnqueuer.hasNativeClasses()) return; |
| 1147 enqueuer.registerStaticUse(getNativeInterceptorMethod); | 1147 enqueuer.registerStaticUse(getNativeInterceptorMethod); |
| 1148 enqueuer.registerStaticUse(defineNativeMethodsFinishMethod); | 1148 enqueuer.registerStaticUse(defineNativeMethodsFinishMethod); |
| 1149 enqueuer.registerStaticUse(initializeDispatchPropertyMethod); | 1149 enqueuer.registerStaticUse(initializeDispatchPropertyMethod); |
| 1150 TreeElements elements = compiler.globalDependencies; | 1150 TreeElements elements = compiler.globalDependencies; |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 ClassElement get listImplementation => jsArrayClass; | 1830 ClassElement get listImplementation => jsArrayClass; |
| 1831 ClassElement get constListImplementation => jsArrayClass; | 1831 ClassElement get constListImplementation => jsArrayClass; |
| 1832 ClassElement get fixedListImplementation => jsFixedArrayClass; | 1832 ClassElement get fixedListImplementation => jsFixedArrayClass; |
| 1833 ClassElement get growableListImplementation => jsExtendableArrayClass; | 1833 ClassElement get growableListImplementation => jsExtendableArrayClass; |
| 1834 ClassElement get mapImplementation => mapLiteralClass; | 1834 ClassElement get mapImplementation => mapLiteralClass; |
| 1835 ClassElement get constMapImplementation => constMapLiteralClass; | 1835 ClassElement get constMapImplementation => constMapLiteralClass; |
| 1836 ClassElement get typeImplementation => typeLiteralClass; | 1836 ClassElement get typeImplementation => typeLiteralClass; |
| 1837 ClassElement get boolImplementation => jsBoolClass; | 1837 ClassElement get boolImplementation => jsBoolClass; |
| 1838 ClassElement get nullImplementation => jsNullClass; | 1838 ClassElement get nullImplementation => jsNullClass; |
| 1839 } | 1839 } |
| OLD | NEW |