Fix broken HCheckInstanceType::Canonicalize().
authorbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 1 Aug 2013 08:27:46 +0000 (08:27 +0000)
committerbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 1 Aug 2013 08:27:46 +0000 (08:27 +0000)
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/21488002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen-instructions.cc

index f65f8570fb7571ce48c74ee55f34325b408d3acc..5f08f67d6d3adbb4c8cea31f674e420324b99da8 100644 (file)
@@ -1633,11 +1633,13 @@ HValue* HUnaryMathOperation::Canonicalize() {
 
 HValue* HCheckInstanceType::Canonicalize() {
   if (check_ == IS_STRING && value()->type().IsString()) {
-    return NULL;
+    return value();
   }
 
   if (check_ == IS_INTERNALIZED_STRING && value()->IsConstant()) {
-    if (HConstant::cast(value())->HasInternalizedStringValue()) return NULL;
+    if (HConstant::cast(value())->HasInternalizedStringValue()) {
+      return value();
+    }
   }
   return this;
 }