Revision: 8563
Author:   [email protected]
Date:     Thu Jul  7 05:01:49 2011
Log:      Don't check symbol literals for being symbols.

[email protected]

Review URL: http://codereview.chromium.org/7312024
http://code.google.com/p/v8/source/detail?r=8563

Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.cc
 /branches/bleeding_edge/src/hydrogen-instructions.h

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Jul 4 07:13:08 2011 +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Jul 7 05:01:49 2011
@@ -782,6 +782,21 @@
   if (CanTruncateToInt32()) stream->Add(" truncating-int32");
   if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
 }
+
+
+HValue* HCheckInstanceType::Canonicalize() {
+  if (check_ == IS_STRING &&
+      !value()->type().IsUninitialized() &&
+      value()->type().IsString()) {
+    return NULL;
+  }
+  if (check_ == IS_SYMBOL &&
+      value()->IsConstant() &&
+      HConstant::cast(value())->handle()->IsSymbol()) {
+    return NULL;
+  }
+  return this;
+}


 void HCheckInstanceType::GetCheckInterval(InstanceType* first,
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Thu Jul 7 03:14:55 2011 +++ /branches/bleeding_edge/src/hydrogen-instructions.h Thu Jul 7 05:01:49 2011
@@ -2003,14 +2003,7 @@
   virtual void Verify();
 #endif

-  virtual HValue* Canonicalize() {
-    if (!value()->type().IsUninitialized() &&
-        value()->type().IsString() &&
-        check_ == IS_STRING) {
-      return NULL;
-    }
-    return this;
-  }
+  virtual HValue* Canonicalize();

   bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; }
   void GetCheckInterval(InstanceType* first, InstanceType* last);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to