| 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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 } else if (Elements.isNumberOrStringSupertype(element, compiler)) { | 1088 } else if (Elements.isNumberOrStringSupertype(element, compiler)) { |
| 1089 return nativeCheck | 1089 return nativeCheck |
| 1090 ? const SourceString('numberOrStringSuperNativeTypeCheck') | 1090 ? const SourceString('numberOrStringSuperNativeTypeCheck') |
| 1091 : const SourceString('numberOrStringSuperTypeCheck'); | 1091 : const SourceString('numberOrStringSuperTypeCheck'); |
| 1092 } else if (Elements.isStringOnlySupertype(element, compiler)) { | 1092 } else if (Elements.isStringOnlySupertype(element, compiler)) { |
| 1093 return nativeCheck | 1093 return nativeCheck |
| 1094 ? const SourceString('stringSuperNativeTypeCheck') | 1094 ? const SourceString('stringSuperNativeTypeCheck') |
| 1095 : const SourceString('stringSuperTypeCheck'); | 1095 : const SourceString('stringSuperTypeCheck'); |
| 1096 } else if (identical(element, compiler.listClass)) { | 1096 } else if (identical(element, compiler.listClass)) { |
| 1097 return const SourceString('listTypeCheck'); | 1097 return const SourceString('listTypeCheck'); |
| 1098 } else if (type.isMalformed) { |
| 1099 return const SourceString('malformedTypeCheck'); |
| 1098 } else { | 1100 } else { |
| 1099 if (Elements.isListSupertype(element, compiler)) { | 1101 if (Elements.isListSupertype(element, compiler)) { |
| 1100 return nativeCheck | 1102 return nativeCheck |
| 1101 ? const SourceString('listSuperNativeTypeCheck') | 1103 ? const SourceString('listSuperNativeTypeCheck') |
| 1102 : const SourceString('listSuperTypeCheck'); | 1104 : const SourceString('listSuperTypeCheck'); |
| 1103 } else { | 1105 } else { |
| 1104 return nativeCheck | 1106 return nativeCheck |
| 1105 ? const SourceString('callTypeCheck') | 1107 ? const SourceString('callTypeCheck') |
| 1106 : const SourceString('propertyTypeCheck'); | 1108 : const SourceString('propertyTypeCheck'); |
| 1107 } | 1109 } |
| 1108 } | 1110 } |
| 1109 } | 1111 } |
| 1110 | 1112 |
| 1111 void dumpInferredTypes() { | 1113 void dumpInferredTypes() { |
| 1112 print("Inferred argument types:"); | 1114 print("Inferred argument types:"); |
| 1113 print("------------------------"); | 1115 print("------------------------"); |
| 1114 argumentTypes.dump(); | 1116 argumentTypes.dump(); |
| 1115 print(""); | 1117 print(""); |
| 1116 print("Inferred return types:"); | 1118 print("Inferred return types:"); |
| 1117 print("----------------------"); | 1119 print("----------------------"); |
| 1118 dumpReturnTypes(); | 1120 dumpReturnTypes(); |
| 1119 print(""); | 1121 print(""); |
| 1120 print("Inferred field types:"); | 1122 print("Inferred field types:"); |
| 1121 print("------------------------"); | 1123 print("------------------------"); |
| 1122 fieldTypes.dump(); | 1124 fieldTypes.dump(); |
| 1123 print(""); | 1125 print(""); |
| 1124 } | 1126 } |
| 1125 } | 1127 } |
| OLD | NEW |