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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 15023019: Fix bug in checked mode: we need to register super fields as well, because the super class might no… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/language/checked_setter_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/checked_setter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698