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

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

Issue 11412245: MalformedType used for all invalid type annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased 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
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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 } else if (Elements.isNumberOrStringSupertype(element, compiler)) { 1098 } else if (Elements.isNumberOrStringSupertype(element, compiler)) {
1099 return nativeCheck 1099 return nativeCheck
1100 ? const SourceString('numberOrStringSuperNativeTypeCheck') 1100 ? const SourceString('numberOrStringSuperNativeTypeCheck')
1101 : const SourceString('numberOrStringSuperTypeCheck'); 1101 : const SourceString('numberOrStringSuperTypeCheck');
1102 } else if (Elements.isStringOnlySupertype(element, compiler)) { 1102 } else if (Elements.isStringOnlySupertype(element, compiler)) {
1103 return nativeCheck 1103 return nativeCheck
1104 ? const SourceString('stringSuperNativeTypeCheck') 1104 ? const SourceString('stringSuperNativeTypeCheck')
1105 : const SourceString('stringSuperTypeCheck'); 1105 : const SourceString('stringSuperTypeCheck');
1106 } else if (identical(element, compiler.listClass)) { 1106 } else if (identical(element, compiler.listClass)) {
1107 return const SourceString('listTypeCheck'); 1107 return const SourceString('listTypeCheck');
1108 } else if (type.isMalformed) {
1109 return const SourceString('malformedTypeCheck');
1108 } else { 1110 } else {
1109 if (Elements.isListSupertype(element, compiler)) { 1111 if (Elements.isListSupertype(element, compiler)) {
1110 return nativeCheck 1112 return nativeCheck
1111 ? const SourceString('listSuperNativeTypeCheck') 1113 ? const SourceString('listSuperNativeTypeCheck')
1112 : const SourceString('listSuperTypeCheck'); 1114 : const SourceString('listSuperTypeCheck');
1113 } else { 1115 } else {
1114 return nativeCheck 1116 return nativeCheck
1115 ? const SourceString('callTypeCheck') 1117 ? const SourceString('callTypeCheck')
1116 : const SourceString('propertyTypeCheck'); 1118 : const SourceString('propertyTypeCheck');
1117 } 1119 }
1118 } 1120 }
1119 } 1121 }
1120 1122
1121 void dumpInferredTypes() { 1123 void dumpInferredTypes() {
1122 print("Inferred argument types:"); 1124 print("Inferred argument types:");
1123 print("------------------------"); 1125 print("------------------------");
1124 argumentTypes.dump(); 1126 argumentTypes.dump();
1125 print(""); 1127 print("");
1126 print("Inferred return types:"); 1128 print("Inferred return types:");
1127 print("----------------------"); 1129 print("----------------------");
1128 dumpReturnTypes(); 1130 dumpReturnTypes();
1129 print(""); 1131 print("");
1130 print("Inferred field types:"); 1132 print("Inferred field types:");
1131 print("------------------------"); 1133 print("------------------------");
1132 fieldTypes.dump(); 1134 fieldTypes.dump();
1133 print(""); 1135 print("");
1134 } 1136 }
1135 } 1137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698