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

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

Issue 11348316: Move the handling of operator[] into the new interceptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 | sdk/lib/_internal/compiler/implementation/lib/js_array.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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) { 842 void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {
843 ClassElement result = null; 843 ClassElement result = null;
844 if (!_interceptorsAreInitialized) { 844 if (!_interceptorsAreInitialized) {
845 initializeInterceptorElements(); 845 initializeInterceptorElements();
846 _interceptorsAreInitialized = true; 846 _interceptorsAreInitialized = true;
847 } 847 }
848 if (cls == compiler.stringClass) { 848 if (cls == compiler.stringClass) {
849 addInterceptors(jsStringClass, enqueuer); 849 addInterceptors(jsStringClass, enqueuer);
850 } else if (cls == compiler.listClass) { 850 } else if (cls == compiler.listClass) {
851 addInterceptors(jsArrayClass, enqueuer); 851 addInterceptors(jsArrayClass, enqueuer);
852 // The backend will try to optimize array access and use the
853 // `ioore` and `iae` helpers directly.
854 enqueuer.registerStaticUse(
855 compiler.findHelper(const SourceString('ioore')));
856 enqueuer.registerStaticUse(
857 compiler.findHelper(const SourceString('iae')));
852 } else if (cls == compiler.intClass) { 858 } else if (cls == compiler.intClass) {
853 addInterceptors(jsIntClass, enqueuer); 859 addInterceptors(jsIntClass, enqueuer);
854 addInterceptors(jsNumberClass, enqueuer); 860 addInterceptors(jsNumberClass, enqueuer);
855 } else if (cls == compiler.doubleClass) { 861 } else if (cls == compiler.doubleClass) {
856 addInterceptors(jsDoubleClass, enqueuer); 862 addInterceptors(jsDoubleClass, enqueuer);
857 addInterceptors(jsNumberClass, enqueuer); 863 addInterceptors(jsNumberClass, enqueuer);
858 } else if (cls == compiler.functionClass) { 864 } else if (cls == compiler.functionClass) {
859 addInterceptors(jsFunctionClass, enqueuer); 865 addInterceptors(jsFunctionClass, enqueuer);
860 } else if (cls == compiler.boolClass) { 866 } else if (cls == compiler.boolClass) {
861 addInterceptors(jsBoolClass, enqueuer); 867 addInterceptors(jsBoolClass, enqueuer);
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 print("Inferred return types:"); 1138 print("Inferred return types:");
1133 print("----------------------"); 1139 print("----------------------");
1134 dumpReturnTypes(); 1140 dumpReturnTypes();
1135 print(""); 1141 print("");
1136 print("Inferred field types:"); 1142 print("Inferred field types:");
1137 print("------------------------"); 1143 print("------------------------");
1138 fieldTypes.dump(); 1144 fieldTypes.dump();
1139 print(""); 1145 print("");
1140 } 1146 }
1141 } 1147 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/lib/js_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698