<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[165407] trunk/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/165407">165407</a></dd>
<dt>Author</dt> <dd>mhahnenberg@apple.com</dd>
<dt>Date</dt> <dd>2014-03-10 15:21:44 -0700 (Mon, 10 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove ConditionalStore barrier
https://bugs.webkit.org/show_bug.cgi?id=130040

Reviewed by Geoffrey Garen.

ConditionalStoreBarrier was created when barriers were much more expensive. Now that 
they're cheap(er), we can get rid of them. This also allows us to get rid of the write 
barrier logic in emitPutTransitionStub because we always will have executed a write barrier 
on the base object in the case where we are allocating and storing a new Butterfly into it. 
Previously, a ConditionalStoreBarrier might or might not have barrier-ed the base object, 
so we'd have to emit a write barrier in the transition case.

This is performance neutral on the benchmarks we track.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter&lt;AbstractStateType&gt;::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
(JSC::DFG::ConstantFoldingPhase::emitPutByOffset):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::insertStoreBarrier):
* dfg/DFGNode.h:
(JSC::DFG::Node::isStoreBarrier):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileStoreBarrier):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
* jit/Repatch.cpp:
(JSC::emitPutTransitionStub):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGAbstractInterpreterInlinesh">trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGClobberizeh">trunk/Source/JavaScriptCore/dfg/DFGClobberize.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGConstantFoldingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGFixupPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGNodeh">trunk/Source/JavaScriptCore/dfg/DFGNode.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGNodeTypeh">trunk/Source/JavaScriptCore/dfg/DFGNodeType.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPredictionPropagationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSafeToExecuteh">trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLCapabilitiescpp">trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitRepatchcpp">trunk/Source/JavaScriptCore/jit/Repatch.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2014-03-10  Mark Hahnenberg  &lt;mhahnenberg@apple.com&gt;
+
+        Remove ConditionalStore barrier
+        https://bugs.webkit.org/show_bug.cgi?id=130040
+
+        Reviewed by Geoffrey Garen.
+
+        ConditionalStoreBarrier was created when barriers were much more expensive. Now that 
+        they're cheap(er), we can get rid of them. This also allows us to get rid of the write 
+        barrier logic in emitPutTransitionStub because we always will have executed a write barrier 
+        on the base object in the case where we are allocating and storing a new Butterfly into it. 
+        Previously, a ConditionalStoreBarrier might or might not have barrier-ed the base object, 
+        so we'd have to emit a write barrier in the transition case.
+
+        This is performance neutral on the benchmarks we track.
+
+        * dfg/DFGAbstractInterpreterInlines.h:
+        (JSC::DFG::AbstractInterpreter&lt;AbstractStateType&gt;::executeEffects):
+        * dfg/DFGClobberize.h:
+        (JSC::DFG::clobberize):
+        * dfg/DFGConstantFoldingPhase.cpp:
+        (JSC::DFG::ConstantFoldingPhase::foldConstants):
+        (JSC::DFG::ConstantFoldingPhase::emitPutByOffset):
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::FixupPhase::fixupNode):
+        (JSC::DFG::FixupPhase::insertStoreBarrier):
+        * dfg/DFGNode.h:
+        (JSC::DFG::Node::isStoreBarrier):
+        * dfg/DFGNodeType.h:
+        * dfg/DFGPredictionPropagationPhase.cpp:
+        (JSC::DFG::PredictionPropagationPhase::propagate):
+        * dfg/DFGSafeToExecute.h:
+        (JSC::DFG::safeToExecute):
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::compileStoreBarrier):
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * ftl/FTLCapabilities.cpp:
+        (JSC::FTL::canCompile):
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::LowerDFGToLLVM::compileNode):
+        * jit/Repatch.cpp:
+        (JSC::emitPutTransitionStub):
+
</ins><span class="cx"> 2014-03-10  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         DFG and FTL should know that comparing anything to Misc is cheap and easy
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGAbstractInterpreterInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -1844,13 +1844,6 @@
</span><span class="cx">     case CheckTierUpAtReturn:
</span><span class="cx">         break;
</span><span class="cx"> 
</span><del>-    case ConditionalStoreBarrier: {
-        if (!needsTypeCheck(node-&gt;child2().node(), ~SpecCell))
-            m_state.setFoundConstants(true);
-        filter(node-&gt;child1(), SpecCell);
-        break;
-    }
-
</del><span class="cx">     case StoreBarrier: {
</span><span class="cx">         filter(node-&gt;child1(), SpecCell);
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGClobberizeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGClobberize.h (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGClobberize.h        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGClobberize.h        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -658,7 +658,6 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     case StoreBarrier:
</span><del>-    case ConditionalStoreBarrier:
</del><span class="cx">     case StoreBarrierWithNullCheck:
</span><span class="cx">         read(BarrierState);
</span><span class="cx">         write(BarrierState);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGConstantFoldingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -253,14 +253,6 @@
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            case ConditionalStoreBarrier: {
-                if (!m_interpreter.needsTypeCheck(node-&gt;child2().node(), ~SpecCell)) {
-                    node-&gt;convertToPhantom();
-                    eliminated = true;
-                }
-                break;
-            }
-
</del><span class="cx">             case ToPrimitive: {
</span><span class="cx">                 if (m_state.forNode(node-&gt;child1()).m_type &amp; ~(SpecFullNumber | SpecBoolean | SpecString))
</span><span class="cx">                     break;
</span><span class="lines">@@ -471,9 +463,8 @@
</span><span class="cx"> 
</span><span class="cx">         node-&gt;convertToPutByOffset(m_graph.m_storageAccessData.size(), propertyStorage);
</span><span class="cx">         m_insertionSet.insertNode(
</span><del>-            indexInBlock, SpecNone, ConditionalStoreBarrier, origin, 
-            Edge(node-&gt;child2().node(), KnownCellUse),
-            Edge(node-&gt;child3().node(), UntypedUse));
</del><ins>+            indexInBlock, SpecNone, StoreBarrier, origin, 
+            Edge(node-&gt;child2().node(), KnownCellUse));
</ins><span class="cx"> 
</span><span class="cx">         StorageAccessData storageAccessData;
</span><span class="cx">         storageAccessData.offset = variant.offset();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGFixupPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -578,7 +578,7 @@
</span><span class="cx">             case Array::Arguments:
</span><span class="cx">                 fixEdge&lt;KnownCellUse&gt;(child1);
</span><span class="cx">                 fixEdge&lt;Int32Use&gt;(child2);
</span><del>-                insertStoreBarrier(m_indexInBlock, child1, child3);
</del><ins>+                insertStoreBarrier(m_indexInBlock, child1);
</ins><span class="cx">                 break;
</span><span class="cx">             default:
</span><span class="cx">                 fixEdge&lt;KnownCellUse&gt;(child1);
</span><span class="lines">@@ -616,7 +616,7 @@
</span><span class="cx">                 break;
</span><span class="cx">             case Array::Contiguous:
</span><span class="cx">             case Array::ArrayStorage:
</span><del>-                insertStoreBarrier(m_indexInBlock, node-&gt;child1(), node-&gt;child2());
</del><ins>+                insertStoreBarrier(m_indexInBlock, node-&gt;child1());
</ins><span class="cx">                 break;
</span><span class="cx">             default:
</span><span class="cx">                 break;
</span><span class="lines">@@ -809,7 +809,7 @@
</span><span class="cx"> 
</span><span class="cx">         case PutClosureVar: {
</span><span class="cx">             fixEdge&lt;KnownCellUse&gt;(node-&gt;child1());
</span><del>-            insertStoreBarrier(m_indexInBlock, node-&gt;child1(), node-&gt;child3());
</del><ins>+            insertStoreBarrier(m_indexInBlock, node-&gt;child1());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -853,7 +853,7 @@
</span><span class="cx">         case PutByIdFlush:
</span><span class="cx">         case PutByIdDirect: {
</span><span class="cx">             fixEdge&lt;CellUse&gt;(node-&gt;child1());
</span><del>-            insertStoreBarrier(m_indexInBlock, node-&gt;child1(), node-&gt;child2());
</del><ins>+            insertStoreBarrier(m_indexInBlock, node-&gt;child1());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -892,13 +892,13 @@
</span><span class="cx">             if (!node-&gt;child1()-&gt;hasStorageResult())
</span><span class="cx">                 fixEdge&lt;KnownCellUse&gt;(node-&gt;child1());
</span><span class="cx">             fixEdge&lt;KnownCellUse&gt;(node-&gt;child2());
</span><del>-            insertStoreBarrier(m_indexInBlock, node-&gt;child2(), node-&gt;child3());
</del><ins>+            insertStoreBarrier(m_indexInBlock, node-&gt;child2());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">             
</span><span class="cx">         case MultiPutByOffset: {
</span><span class="cx">             fixEdge&lt;CellUse&gt;(node-&gt;child1());
</span><del>-            insertStoreBarrier(m_indexInBlock, node-&gt;child1(), node-&gt;child2());
</del><ins>+            insertStoreBarrier(m_indexInBlock, node-&gt;child1());
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">             
</span><span class="lines">@@ -966,8 +966,8 @@
</span><span class="cx">                 m_indexInBlock, SpecNone, WeakJSConstant, node-&gt;origin, 
</span><span class="cx">                 OpInfo(m_graph.globalObjectFor(node-&gt;origin.semantic)));
</span><span class="cx">             Node* barrierNode = m_graph.addNode(
</span><del>-                SpecNone, ConditionalStoreBarrier, m_currentNode-&gt;origin, 
-                Edge(globalObjectNode, KnownCellUse), Edge(node-&gt;child1().node(), UntypedUse));
</del><ins>+                SpecNone, StoreBarrier, m_currentNode-&gt;origin, 
+                Edge(globalObjectNode, KnownCellUse));
</ins><span class="cx">             m_insertionSet.insert(m_indexInBlock, barrierNode);
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -1041,7 +1041,6 @@
</span><span class="cx">         case ExtractOSREntryLocal:
</span><span class="cx">         case LoopHint:
</span><span class="cx">         case StoreBarrier:
</span><del>-        case ConditionalStoreBarrier:
</del><span class="cx">         case StoreBarrierWithNullCheck:
</span><span class="cx">         case FunctionReentryWatchpoint:
</span><span class="cx">         case TypedArrayWatchpoint:
</span><span class="lines">@@ -1618,15 +1617,9 @@
</span><span class="cx">         edge.setUseKind(useKind);
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    void insertStoreBarrier(unsigned indexInBlock, Edge child1, Edge child2 = Edge())
</del><ins>+    void insertStoreBarrier(unsigned indexInBlock, Edge child1)
</ins><span class="cx">     {
</span><del>-        Node* barrierNode;
-        if (!child2)
-            barrierNode = m_graph.addNode(SpecNone, StoreBarrier, m_currentNode-&gt;origin, Edge(child1.node(), child1.useKind()));
-        else {
-            barrierNode = m_graph.addNode(SpecNone, ConditionalStoreBarrier, m_currentNode-&gt;origin, 
-                Edge(child1.node(), child1.useKind()), Edge(child2.node(), child2.useKind()));
-        }
</del><ins>+        Node* barrierNode = m_graph.addNode(SpecNone, StoreBarrier, m_currentNode-&gt;origin, child1);
</ins><span class="cx">         m_insertionSet.insert(indexInBlock, barrierNode);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGNode.h (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGNode.h        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGNode.h        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -640,7 +640,6 @@
</span><span class="cx">     {
</span><span class="cx">         switch (op()) {
</span><span class="cx">         case StoreBarrier:
</span><del>-        case ConditionalStoreBarrier:
</del><span class="cx">         case StoreBarrierWithNullCheck:
</span><span class="cx">             return true;
</span><span class="cx">         default:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGNodeTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGNodeType.h (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGNodeType.h        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGNodeType.h        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -296,7 +296,6 @@
</span><span class="cx">     macro(CheckWatchdogTimer, NodeMustGenerate) \
</span><span class="cx">     /* Write barriers ! */\
</span><span class="cx">     macro(StoreBarrier, NodeMustGenerate) \
</span><del>-    macro(ConditionalStoreBarrier, NodeMustGenerate) \
</del><span class="cx">     macro(StoreBarrierWithNullCheck, NodeMustGenerate) \
</span><span class="cx"> 
</span><span class="cx"> // This enum generates a monotonically increasing id for all Node types,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPredictionPropagationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -541,7 +541,6 @@
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         // These get ignored because they don't return anything.
</span><span class="cx">         case StoreBarrier:
</span><del>-        case ConditionalStoreBarrier:
</del><span class="cx">         case StoreBarrierWithNullCheck:
</span><span class="cx">         case PutByValDirect:
</span><span class="cx">         case PutByVal:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSafeToExecuteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -243,7 +243,6 @@
</span><span class="cx">     case Int52ToDouble:
</span><span class="cx">     case Int52ToValue:
</span><span class="cx">     case StoreBarrier:
</span><del>-    case ConditionalStoreBarrier:
</del><span class="cx">     case StoreBarrierWithNullCheck:
</span><span class="cx">     case InvalidationPoint:
</span><span class="cx">     case NotifyWrite:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -5349,11 +5349,6 @@
</span><span class="cx"> void SpeculativeJIT::compileStoreBarrier(Node* node)
</span><span class="cx"> {
</span><span class="cx">     switch (node-&gt;op()) {
</span><del>-    case ConditionalStoreBarrier: {
-        compileBaseValueStoreBarrier(node-&gt;child1(), node-&gt;child2());
-        break;
-    }
-
</del><span class="cx">     case StoreBarrier: {
</span><span class="cx">         SpeculateCellOperand base(this, node-&gt;child1());
</span><span class="cx">         GPRTemporary scratch1(this);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -4647,7 +4647,6 @@
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case StoreBarrier:
</span><del>-    case ConditionalStoreBarrier:
</del><span class="cx">     case StoreBarrierWithNullCheck: {
</span><span class="cx">         compileStoreBarrier(node);
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -4963,7 +4963,6 @@
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case StoreBarrier:
</span><del>-    case ConditionalStoreBarrier:
</del><span class="cx">     case StoreBarrierWithNullCheck: {
</span><span class="cx">         compileStoreBarrier(node);
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLCapabilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -115,7 +115,6 @@
</span><span class="cx">     case VariableWatchpoint:
</span><span class="cx">     case NotifyWrite:
</span><span class="cx">     case StoreBarrier:
</span><del>-    case ConditionalStoreBarrier:
</del><span class="cx">     case StoreBarrierWithNullCheck:
</span><span class="cx">     case Call:
</span><span class="cx">     case Construct:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -581,9 +581,6 @@
</span><span class="cx">         case StoreBarrier:
</span><span class="cx">             compileStoreBarrier();
</span><span class="cx">             break;
</span><del>-        case ConditionalStoreBarrier:
-            compileConditionalStoreBarrier();
-            break;
</del><span class="cx">         case StoreBarrierWithNullCheck:
</span><span class="cx">             compileStoreBarrierWithNullCheck();
</span><span class="cx">             break;
</span><span class="lines">@@ -717,13 +714,6 @@
</span><span class="cx">         emitStoreBarrier(lowCell(m_node-&gt;child1()));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void compileConditionalStoreBarrier()
-    {
-        LValue base = lowCell(m_node-&gt;child1());
-        LValue value = lowJSValue(m_node-&gt;child2());
-        emitStoreBarrier(base, value, m_node-&gt;child2());
-    }
-
</del><span class="cx">     void compileStoreBarrierWithNullCheck()
</span><span class="cx">     {
</span><span class="cx"> #if ENABLE(GGC)
</span><span class="lines">@@ -5373,29 +5363,6 @@
</span><span class="cx">         return m_out.load8(base, m_heaps.JSCell_gcData);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void emitStoreBarrier(LValue base, LValue value, Edge valueEdge)
-    {
-#if ENABLE(GGC)
-        LBasicBlock continuation = FTL_NEW_BLOCK(m_out, (&quot;Store barrier continuation&quot;));
-        LBasicBlock isCell = FTL_NEW_BLOCK(m_out, (&quot;Store barrier is cell block&quot;));
-
-        if (m_state.forNode(valueEdge.node()).couldBeType(SpecCell))
-            m_out.branch(isNotCell(value), unsure(continuation), unsure(isCell));
-        else
-            m_out.jump(isCell);
-
-        LBasicBlock lastNext = m_out.appendTo(isCell, continuation);
-        emitStoreBarrier(base);
-        m_out.jump(continuation);
-
-        m_out.appendTo(continuation, lastNext);
-#else
-        UNUSED_PARAM(base);
-        UNUSED_PARAM(value);
-        UNUSED_PARAM(valueEdge);
-#endif
-    }
-
</del><span class="cx">     void emitStoreBarrier(LValue base)
</span><span class="cx">     {
</span><span class="cx"> #if ENABLE(GGC)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitRepatchcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/Repatch.cpp (165406 => 165407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/Repatch.cpp        2014-03-10 22:11:35 UTC (rev 165406)
+++ trunk/Source/JavaScriptCore/jit/Repatch.cpp        2014-03-10 22:21:44 UTC (rev 165407)
</span><span class="lines">@@ -773,65 +773,6 @@
</span><span class="cx">     return operationPutByIdNonStrictBuildList;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(GGC)
-static MacroAssembler::Call storeToWriteBarrierBuffer(CCallHelpers&amp; jit, GPRReg cell, GPRReg scratch1, GPRReg scratch2, ScratchRegisterAllocator&amp; allocator)
-{
-    ASSERT(scratch1 != scratch2);
-    WriteBarrierBuffer* writeBarrierBuffer = &amp;jit.vm()-&gt;heap.writeBarrierBuffer();
-    jit.move(MacroAssembler::TrustedImmPtr(writeBarrierBuffer), scratch1);
-    jit.load32(MacroAssembler::Address(scratch1, WriteBarrierBuffer::currentIndexOffset()), scratch2);
-    MacroAssembler::Jump needToFlush = jit.branch32(MacroAssembler::AboveOrEqual, scratch2, MacroAssembler::Address(scratch1, WriteBarrierBuffer::capacityOffset()));
-
-    jit.add32(MacroAssembler::TrustedImm32(1), scratch2);
-    jit.store32(scratch2, MacroAssembler::Address(scratch1, WriteBarrierBuffer::currentIndexOffset()));
-
-    jit.loadPtr(MacroAssembler::Address(scratch1, WriteBarrierBuffer::bufferOffset()), scratch1);
-    // We use an offset of -sizeof(void*) because we already added 1 to scratch2.
-    jit.storePtr(cell, MacroAssembler::BaseIndex(scratch1, scratch2, MacroAssembler::ScalePtr, static_cast&lt;int32_t&gt;(-sizeof(void*))));
-
-    MacroAssembler::Jump done = jit.jump();
-    needToFlush.link(&amp;jit);
-
-    ScratchBuffer* scratchBuffer = jit.vm()-&gt;scratchBufferForSize(allocator.desiredScratchBufferSize());
-    allocator.preserveUsedRegistersToScratchBuffer(jit, scratchBuffer, scratch1);
-
-    unsigned bytesFromBase = allocator.numberOfReusedRegisters() * sizeof(void*);
-    unsigned bytesToSubtract = 0;
-#if CPU(X86)
-    bytesToSubtract += 2 * sizeof(void*);
-    bytesFromBase += bytesToSubtract;
-#endif
-    unsigned currentAlignment = bytesFromBase % stackAlignmentBytes();
-    bytesToSubtract += currentAlignment;
-
-    if (bytesToSubtract)
-        jit.subPtr(MacroAssembler::TrustedImm32(bytesToSubtract), MacroAssembler::stackPointerRegister); 
-
-    jit.setupArgumentsWithExecState(cell);
-    MacroAssembler::Call call = jit.call();
-
-    if (bytesToSubtract)
-        jit.addPtr(MacroAssembler::TrustedImm32(bytesToSubtract), MacroAssembler::stackPointerRegister);
-    allocator.restoreUsedRegistersFromScratchBuffer(jit, scratchBuffer, scratch1);
-
-    done.link(&amp;jit);
-
-    return call;
-}
-
-static MacroAssembler::Call writeBarrier(CCallHelpers&amp; jit, GPRReg owner, GPRReg scratch1, GPRReg scratch2, ScratchRegisterAllocator&amp; allocator)
-{
-    ASSERT(owner != scratch1);
-    ASSERT(owner != scratch2);
-
-    MacroAssembler::Jump ownerNotMarkedOrAlreadyRemembered = jit.checkMarkByte(owner);
-    MacroAssembler::Call call = storeToWriteBarrierBuffer(jit, owner, scratch1, scratch2, allocator);
-    ownerNotMarkedOrAlreadyRemembered.link(&amp;jit);
-
-    return call;
-}
-#endif // ENABLE(GGC)
-
</del><span class="cx"> static void emitPutReplaceStub(
</span><span class="cx">     ExecState* exec,
</span><span class="cx">     JSValue,
</span><span class="lines">@@ -1051,10 +992,6 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx">     
</span><del>-#if ENABLE(GGC)
-    MacroAssembler::Call writeBarrierOperation = writeBarrier(stubJit, baseGPR, scratchGPR1, scratchGPR2, allocator);
-#endif
-    
</del><span class="cx">     MacroAssembler::Jump success;
</span><span class="cx">     MacroAssembler::Jump failure;
</span><span class="cx">             
</span><span class="lines">@@ -1088,9 +1025,6 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     LinkBuffer patchBuffer(*vm, &amp;stubJit, exec-&gt;codeBlock());
</span><del>-#if ENABLE(GGC)
-    patchBuffer.link(writeBarrierOperation, operationFlushWriteBarrierBuffer);
-#endif
</del><span class="cx">     patchBuffer.link(success, stubInfo.callReturnLocation.labelAtOffset(stubInfo.patch.deltaCallToDone));
</span><span class="cx">     if (allocator.didReuseRegisters())
</span><span class="cx">         patchBuffer.link(failure, failureLabel);
</span></span></pre>
</div>
</div>

</body>
</html>