PutGlobalVar shouldn't have an unconditional store barrier
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 May 2015 05:56:43 +0000 (05:56 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 May 2015 05:56:43 +0000 (05:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=133104

Reviewed by Benjamin Poulain.

We don't need a store barrier on PutGlobalVar if the value being stored can be
speculated to not be a cell.

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

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

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

index e2a9837..3197482 100644 (file)
@@ -1,5 +1,18 @@
 2015-05-05  Filip Pizlo  <fpizlo@apple.com>
 
+        PutGlobalVar shouldn't have an unconditional store barrier
+        https://bugs.webkit.org/show_bug.cgi?id=133104
+
+        Reviewed by Benjamin Poulain.
+        
+        We don't need a store barrier on PutGlobalVar if the value being stored can be
+        speculated to not be a cell.
+
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::FixupPhase::fixupNode):
+
+2015-05-05  Filip Pizlo  <fpizlo@apple.com>
+
         CopiedBlock::reportLiveBytes() should be totally cool with oversize blocks
         https://bugs.webkit.org/show_bug.cgi?id=144667
 
index 9bea6c8..8be0089 100644 (file)
@@ -1051,12 +1051,8 @@ private:
             Node* globalObjectNode = m_insertionSet.insertNode(
                 m_indexInBlock, SpecNone, JSConstant, node->origin, 
                 OpInfo(m_graph.freeze(m_graph.globalObjectFor(node->origin.semantic))));
-            // FIXME: This probably shouldn't have an unconditional barrier.
-            // https://bugs.webkit.org/show_bug.cgi?id=133104
-            Node* barrierNode = m_graph.addNode(
-                SpecNone, StoreBarrier, m_currentNode->origin, 
-                Edge(globalObjectNode, KnownCellUse));
-            m_insertionSet.insert(m_indexInBlock, barrierNode);
+            insertStoreBarrier(
+                m_indexInBlock, Edge(globalObjectNode, KnownCellUse), node->child1());
             break;
         }