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

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

Issue 12047040: Return correct helper for malformed type checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index c31113de53bb4600a9955e0cd5d7b412ed4d107a..2717fb0085e7c88232fc2cc5c47a78e97203d419 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1103,7 +1103,9 @@ class JavaScriptBackend extends Backend {
Element element = type.element;
bool nativeCheck =
emitter.nativeEmitter.requiresNativeIsCheck(element);
- if (type == compiler.types.voidType) {
+ if (type.isMalformed) {
ngeoffray 2013/01/23 10:14:46 Maybe add a comment that the list check below can
karlklose 2013/01/23 10:20:52 Done.
+ return const SourceString('malformedTypeCheck');
+ } else if (type == compiler.types.voidType) {
return const SourceString('voidTypeCheck');
} else if (element == compiler.stringClass) {
return const SourceString('stringTypeCheck');
@@ -1127,8 +1129,6 @@ class JavaScriptBackend extends Backend {
: const SourceString('stringSuperTypeCheck');
} else if (identical(element, compiler.listClass)) {
return const SourceString('listTypeCheck');
- } else if (type.isMalformed) {
- return const SourceString('malformedTypeCheck');
} else {
if (Elements.isListSupertype(element, compiler)) {
return nativeCheck
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698