| 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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 if (type == compiler.types.voidType) { | 1094 if (type == compiler.types.voidType) { |
| 1095 return const SourceString('voidTypeCheck'); | 1095 return const SourceString('voidTypeCheck'); |
| 1096 } else if (element == compiler.stringClass) { | 1096 } else if (element == compiler.stringClass) { |
| 1097 return const SourceString('stringTypeCheck'); | 1097 return const SourceString('stringTypeCheck'); |
| 1098 } else if (element == compiler.doubleClass) { | 1098 } else if (element == compiler.doubleClass) { |
| 1099 return const SourceString('doubleTypeCheck'); | 1099 return const SourceString('doubleTypeCheck'); |
| 1100 } else if (element == compiler.numClass) { | 1100 } else if (element == compiler.numClass) { |
| 1101 return const SourceString('numTypeCheck'); | 1101 return const SourceString('numTypeCheck'); |
| 1102 } else if (element == compiler.boolClass) { | 1102 } else if (element == compiler.boolClass) { |
| 1103 return const SourceString('boolTypeCheck'); | 1103 return const SourceString('boolTypeCheck'); |
| 1104 } else if (element == compiler.functionClass || element.isTypedef()) { | 1104 } else if (element == compiler.functionClass) { |
| 1105 return const SourceString('functionTypeCheck'); | 1105 return const SourceString('functionTypeCheck'); |
| 1106 } else if (element == compiler.intClass) { | 1106 } else if (element == compiler.intClass) { |
| 1107 return const SourceString('intTypeCheck'); | 1107 return const SourceString('intTypeCheck'); |
| 1108 } else if (Elements.isNumberOrStringSupertype(element, compiler)) { | 1108 } else if (Elements.isNumberOrStringSupertype(element, compiler)) { |
| 1109 return nativeCheck | 1109 return nativeCheck |
| 1110 ? const SourceString('numberOrStringSuperNativeTypeCheck') | 1110 ? const SourceString('numberOrStringSuperNativeTypeCheck') |
| 1111 : const SourceString('numberOrStringSuperTypeCheck'); | 1111 : const SourceString('numberOrStringSuperTypeCheck'); |
| 1112 } else if (Elements.isStringOnlySupertype(element, compiler)) { | 1112 } else if (Elements.isStringOnlySupertype(element, compiler)) { |
| 1113 return nativeCheck | 1113 return nativeCheck |
| 1114 ? const SourceString('stringSuperNativeTypeCheck') | 1114 ? const SourceString('stringSuperNativeTypeCheck') |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1138 print("Inferred return types:"); | 1138 print("Inferred return types:"); |
| 1139 print("----------------------"); | 1139 print("----------------------"); |
| 1140 dumpReturnTypes(); | 1140 dumpReturnTypes(); |
| 1141 print(""); | 1141 print(""); |
| 1142 print("Inferred field types:"); | 1142 print("Inferred field types:"); |
| 1143 print("------------------------"); | 1143 print("------------------------"); |
| 1144 fieldTypes.dump(); | 1144 fieldTypes.dump(); |
| 1145 print(""); | 1145 print(""); |
| 1146 } | 1146 } |
| 1147 } | 1147 } |
| OLD | NEW |