We should not employ the snippet code in the DFG if no OSR exit was previously encoun...
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Dec 2015 19:39:45 +0000 (19:39 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Dec 2015 19:39:45 +0000 (19:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152255

Reviewed by Saam Barati.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

index ae1fba4..a8271ee 100644 (file)
@@ -1,3 +1,13 @@
+2015-12-14  Mark Lam  <mark.lam@apple.com>
+
+        We should not employ the snippet code in the DFG if no OSR exit was previously encountered.
+        https://bugs.webkit.org/show_bug.cgi?id=152255
+
+        Reviewed by Saam Barati.
+
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::FixupPhase::fixupNode):
+
 2015-12-14  Filip Pizlo  <fpizlo@apple.com>
 
         B3->Air compare-branch fusion should fuse even if the result of the comparison is used more than once
index be4e0ec..cb85e09 100644 (file)
@@ -185,8 +185,8 @@ private:
         case ArithAdd:
         case ArithSub: {
             if (op == ArithSub
-                && (Node::shouldSpeculateUntypedForArithmetic(node->child1().node(), node->child2().node())
-                    || m_graph.hasExitSite(node->origin.semantic, BadType))) {
+                && Node::shouldSpeculateUntypedForArithmetic(node->child1().node(), node->child2().node())
+                && m_graph.hasExitSite(node->origin.semantic, BadType)) {
 
                 fixEdge<UntypedUse>(node->child1());
                 fixEdge<UntypedUse>(node->child2());
@@ -230,7 +230,7 @@ private:
             Edge& leftChild = node->child1();
             Edge& rightChild = node->child2();
             if (Node::shouldSpeculateUntypedForArithmetic(leftChild.node(), rightChild.node())
-                || m_graph.hasExitSite(node->origin.semantic, BadType)) {
+                && m_graph.hasExitSite(node->origin.semantic, BadType)) {
                 fixEdge<UntypedUse>(leftChild);
                 fixEdge<UntypedUse>(rightChild);
                 node->setResult(NodeResultJS);
@@ -268,8 +268,8 @@ private:
             Edge& leftChild = node->child1();
             Edge& rightChild = node->child2();
             if (op == ArithDiv
-                && (Node::shouldSpeculateUntypedForArithmetic(leftChild.node(), rightChild.node())
-                    || m_graph.hasExitSite(node->origin.semantic, BadType))) {
+                && Node::shouldSpeculateUntypedForArithmetic(leftChild.node(), rightChild.node())
+                && m_graph.hasExitSite(node->origin.semantic, BadType)) {
                 fixEdge<UntypedUse>(leftChild);
                 fixEdge<UntypedUse>(rightChild);
                 node->setResult(NodeResultJS);