SpeculativeJIT::isKnownString() is wrong
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Oct 2011 09:08:25 +0000 (09:08 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Oct 2011 09:08:25 +0000 (09:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=69501

Reviewed by Oliver Hunt.

Removed the wrong case (GetLocal predicted String) and added a case that
works (StrCat).

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::isKnownString):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@96794 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

index 04aa710f2f83416853dffd5698d0db157ab32f0a..982c505652ff8e2a3f99fabdec6951ca45723a55 100644 (file)
@@ -1,3 +1,16 @@
+2011-10-05  Filip Pizlo  <fpizlo@apple.com>
+
+        SpeculativeJIT::isKnownString() is wrong
+        https://bugs.webkit.org/show_bug.cgi?id=69501
+
+        Reviewed by Oliver Hunt.
+        
+        Removed the wrong case (GetLocal predicted String) and added a case that
+        works (StrCat).
+
+        * dfg/DFGSpeculativeJIT.h:
+        (JSC::DFG::SpeculativeJIT::isKnownString):
+
 2011-10-05  Ryosuke Niwa  <rniwa@webkit.org>
 
         Windows build fix attempt after r96760.
index f3d9442530817377db7254ddbb230804c7d2e6fa..7114b985ab7ea11b11252520e57854edb38ba00b 100644 (file)
@@ -592,11 +592,10 @@ private:
 
     bool isKnownString(NodeIndex op1)
     {
-        Node& node = m_jit.graph()[op1];
-        switch (node.op) {
-        case GetLocal:
-            return isStringPrediction(node.variableAccessData()->prediction());
-
+        switch (m_jit.graph()[op1].op) {
+        case StrCat:
+            return true;
+            
         default:
             return false;
         }