Chromium Code Reviews| 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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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. | |
|
sra1
2012/12/10 23:42:21
backtick, e.g. `ioore`, is more readable that [::]
ngeoffray
2012/12/11 09:30:15
Done.
| |
| 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 Loading... | |
| 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 } |
| OLD | NEW |