<!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>[186985] 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/186985">186985</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2015-07-17 22:49:32 -0700 (Fri, 17 Jul 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove DFG::DesiredWriteBarriers because it's just a very difficult way of saying &quot;please barrier the machine code block owner&quot;
https://bugs.webkit.org/show_bug.cgi?id=147030

Reviewed by Andreas Kling.
        
All of the users of DesiredWriteBarriers were just using it to request that Plan
finalization executes a barrier on codeBlock-&gt;ownerExecutable. Indeed, that's the only
owning cell in the heap that compilation affects. So, we might as well just have Plan
unconditionally execute that barrier and then we don't need DesiredWriteBarriers at
all.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGDesiredWriteBarriers.cpp: Removed.
* dfg/DFGDesiredWriteBarriers.h: Removed.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::registerFrozenValues):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::reallyAdd):
(JSC::DFG::Plan::notifyCompiling):
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
(JSC::DFG::Plan::checkLivenessAndVisitChildren):
(JSC::DFG::Plan::cancel):
* dfg/DFGPlan.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp">trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGGraphcpp">trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPlancpp">trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPlanh">trunk/Source/JavaScriptCore/dfg/DFGPlan.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoredfgDFGDesiredWriteBarrierscpp">trunk/Source/JavaScriptCore/dfg/DFGDesiredWriteBarriers.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGDesiredWriteBarriersh">trunk/Source/JavaScriptCore/dfg/DFGDesiredWriteBarriers.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -161,7 +161,6 @@
</span><span class="cx">     dfg/DFGDesiredTransitions.cpp
</span><span class="cx">     dfg/DFGDesiredWatchpoints.cpp
</span><span class="cx">     dfg/DFGDesiredWeakReferences.cpp
</span><del>-    dfg/DFGDesiredWriteBarriers.cpp
</del><span class="cx">     dfg/DFGDisassembler.cpp
</span><span class="cx">     dfg/DFGDoesGC.cpp
</span><span class="cx">     dfg/DFGDominators.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2015-07-16  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Remove DFG::DesiredWriteBarriers because it's just a very difficult way of saying &quot;please barrier the machine code block owner&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=147030
+
+        Reviewed by Andreas Kling.
+        
+        All of the users of DesiredWriteBarriers were just using it to request that Plan
+        finalization executes a barrier on codeBlock-&gt;ownerExecutable. Indeed, that's the only
+        owning cell in the heap that compilation affects. So, we might as well just have Plan
+        unconditionally execute that barrier and then we don't need DesiredWriteBarriers at
+        all.
+
+        * CMakeLists.txt:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
+        * dfg/DFGDesiredWriteBarriers.cpp: Removed.
+        * dfg/DFGDesiredWriteBarriers.h: Removed.
+        * dfg/DFGGraph.cpp:
+        (JSC::DFG::Graph::registerFrozenValues):
+        * dfg/DFGPlan.cpp:
+        (JSC::DFG::Plan::reallyAdd):
+        (JSC::DFG::Plan::notifyCompiling):
+        (JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
+        (JSC::DFG::Plan::checkLivenessAndVisitChildren):
+        (JSC::DFG::Plan::cancel):
+        * dfg/DFGPlan.h:
+
</ins><span class="cx"> 2015-07-17  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Integrate automatic microtask draining into JSC framework and re-enable Promise
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -399,7 +399,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\dfg\DFGDesiredTransitions.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\dfg\DFGDesiredWatchpoints.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\dfg\DFGDesiredWeakReferences.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\dfg\DFGDesiredWriteBarriers.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\dfg\DFGDisassembler.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\dfg\DFGDoesGC.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\dfg\DFGDominators.cpp&quot; /&gt;
</span><span class="lines">@@ -1086,7 +1085,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\dfg\DFGDesiredTransitions.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\dfg\DFGDesiredWatchpoints.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\dfg\DFGDesiredWeakReferences.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\dfg\DFGDesiredWriteBarriers.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\dfg\DFGDisassembler.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\dfg\DFGDoesGC.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\dfg\DFGDominators.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -1618,8 +1618,6 @@
</span><span class="cx">                 C288B2DE18A54D3E007BE40B /* DateTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = C288B2DD18A54D3E007BE40B /* DateTests.mm */; };
</span><span class="cx">                 C2981FD817BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2981FD617BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp */; };
</span><span class="cx">                 C2981FD917BAEE4B00A3BC98 /* DFGDesiredWeakReferences.h in Headers */ = {isa = PBXBuildFile; fileRef = C2981FD717BAEE4B00A3BC98 /* DFGDesiredWeakReferences.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                C2981FDC17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2981FDA17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.cpp */; };
-                C2981FDD17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.h in Headers */ = {isa = PBXBuildFile; fileRef = C2981FDB17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 C29ECB031804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = C29ECB011804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.mm */; };
</span><span class="cx">                 C2A7F688160432D400F76B98 /* JSDestructibleObject.h in Headers */ = {isa = PBXBuildFile; fileRef = C2A7F687160432D400F76B98 /* JSDestructibleObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 C2B6D75318A33793004A9301 /* WriteBarrierInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -3380,8 +3378,6 @@
</span><span class="cx">                 C288B2DD18A54D3E007BE40B /* DateTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DateTests.mm; path = API/tests/DateTests.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C2981FD617BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDesiredWeakReferences.cpp; path = dfg/DFGDesiredWeakReferences.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C2981FD717BAEE4B00A3BC98 /* DFGDesiredWeakReferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDesiredWeakReferences.h; path = dfg/DFGDesiredWeakReferences.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                C2981FDA17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDesiredWriteBarriers.cpp; path = dfg/DFGDesiredWriteBarriers.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                C2981FDB17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDesiredWriteBarriers.h; path = dfg/DFGDesiredWriteBarriers.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 C29ECB011804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CurrentThisInsideBlockGetterTest.mm; path = API/tests/CurrentThisInsideBlockGetterTest.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C29ECB021804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CurrentThisInsideBlockGetterTest.h; path = API/tests/CurrentThisInsideBlockGetterTest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C2A7F687160432D400F76B98 /* JSDestructibleObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDestructibleObject.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4938,8 +4934,6 @@
</span><span class="cx">                                 0FE8534A1723CDA500B618F5 /* DFGDesiredWatchpoints.h */,
</span><span class="cx">                                 C2981FD617BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp */,
</span><span class="cx">                                 C2981FD717BAEE4B00A3BC98 /* DFGDesiredWeakReferences.h */,
</span><del>-                                C2981FDA17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.cpp */,
-                                C2981FDB17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.h */,
</del><span class="cx">                                 0FF427611591A1C9004CB9FF /* DFGDisassembler.cpp */,
</span><span class="cx">                                 0FF427621591A1C9004CB9FF /* DFGDisassembler.h */,
</span><span class="cx">                                 0F5A1271192D9FDF008764A3 /* DFGDoesGC.cpp */,
</span><span class="lines">@@ -5835,7 +5829,6 @@
</span><span class="cx">                                 C2C0F7CE17BBFC5B00464FE4 /* DFGDesiredTransitions.h in Headers */,
</span><span class="cx">                                 0FE8534C1723CDA500B618F5 /* DFGDesiredWatchpoints.h in Headers */,
</span><span class="cx">                                 C2981FD917BAEE4B00A3BC98 /* DFGDesiredWeakReferences.h in Headers */,
</span><del>-                                C2981FDD17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.h in Headers */,
</del><span class="cx">                                 0FF427651591A1CE004CB9FF /* DFGDisassembler.h in Headers */,
</span><span class="cx">                                 0FD81AD3154FB4F000983E72 /* DFGDominators.h in Headers */,
</span><span class="cx">                                 0F1E3A471534CBB9000F9456 /* DFGDoubleFormatState.h in Headers */,
</span><span class="lines">@@ -7146,7 +7139,6 @@
</span><span class="cx">                                 C2C0F7CD17BBFC5B00464FE4 /* DFGDesiredTransitions.cpp in Sources */,
</span><span class="cx">                                 0FE8534B1723CDA500B618F5 /* DFGDesiredWatchpoints.cpp in Sources */,
</span><span class="cx">                                 C2981FD817BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp in Sources */,
</span><del>-                                C2981FDC17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.cpp in Sources */,
</del><span class="cx">                                 0FF427641591A1CC004CB9FF /* DFGDisassembler.cpp in Sources */,
</span><span class="cx">                                 0FD81AD2154FB4EE00983E72 /* DFGDominators.cpp in Sources */,
</span><span class="cx">                                 0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -4034,13 +4034,9 @@
</span><span class="cx">         
</span><span class="cx">         m_inlineCallFrame = byteCodeParser-&gt;m_graph.m_plan.inlineCallFrames-&gt;add();
</span><span class="cx">         byteCodeParser-&gt;m_graph.freeze(codeBlock-&gt;ownerExecutable());
</span><del>-        initializeLazyWriteBarrierForInlineCallFrameExecutable(
-            byteCodeParser-&gt;m_graph.m_plan.writeBarriers,
-            m_inlineCallFrame-&gt;executable,
-            byteCodeParser-&gt;m_codeBlock,
-            m_inlineCallFrame,
-            byteCodeParser-&gt;m_codeBlock-&gt;ownerExecutable(),
-            codeBlock-&gt;ownerExecutable());
</del><ins>+        // The owner is the machine code block, and we already have a barrier on that when the
+        // plan finishes.
+        m_inlineCallFrame-&gt;executable.setWithoutWriteBarrier(codeBlock-&gt;ownerExecutable());
</ins><span class="cx">         m_inlineCallFrame-&gt;setStackOffset(inlineCallFrameStart.offset() - JSStack::CallFrameHeaderSize);
</span><span class="cx">         if (callee) {
</span><span class="cx">             m_inlineCallFrame-&gt;calleeRecovery = ValueRecovery::constant(callee);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGDesiredWriteBarrierscpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/dfg/DFGDesiredWriteBarriers.cpp (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGDesiredWriteBarriers.cpp        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/dfg/DFGDesiredWriteBarriers.cpp        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -1,110 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;DFGDesiredWriteBarriers.h&quot;
-
-#if ENABLE(DFG_JIT)
-
-#include &quot;CodeBlock.h&quot;
-#include &quot;JSCInlines.h&quot;
-
-namespace JSC { namespace DFG {
-
-DesiredWriteBarrier::DesiredWriteBarrier(Type type, CodeBlock* codeBlock, unsigned index, JSCell* owner)
-    : m_owner(owner)
-    , m_type(type)
-    , m_codeBlock(codeBlock)
-{
-    m_which.index = index;
-}
-
-DesiredWriteBarrier::DesiredWriteBarrier(Type type, CodeBlock* codeBlock, InlineCallFrame* inlineCallFrame, JSCell* owner)
-    : m_owner(owner)
-    , m_type(type)
-    , m_codeBlock(codeBlock)
-{
-    m_which.inlineCallFrame = inlineCallFrame;
-}
-
-void DesiredWriteBarrier::trigger(VM&amp; vm)
-{
-    switch (m_type) {
-    case ConstantType: {
-        WriteBarrier&lt;Unknown&gt;&amp; barrier = m_codeBlock-&gt;constants()[m_which.index];
-        barrier.set(vm, m_owner, barrier.get());
-        return;
-    }
-
-    case InlineCallFrameExecutableType: {
-        InlineCallFrame* inlineCallFrame = m_which.inlineCallFrame;
-        WriteBarrier&lt;ScriptExecutable&gt;&amp; executable = inlineCallFrame-&gt;executable;
-        executable.set(vm, m_owner, executable.get());
-        return;
-    } }
-    RELEASE_ASSERT_NOT_REACHED();
-}
-
-void DesiredWriteBarrier::visitChildren(SlotVisitor&amp; visitor)
-{
-    switch (m_type) {
-    case ConstantType: {
-        WriteBarrier&lt;Unknown&gt;&amp; barrier = m_codeBlock-&gt;constants()[m_which.index];
-        visitor.append(&amp;barrier);
-        return;
-    }
-        
-    case InlineCallFrameExecutableType: {
-        InlineCallFrame* inlineCallFrame = m_which.inlineCallFrame;
-        WriteBarrier&lt;ScriptExecutable&gt;&amp; executable = inlineCallFrame-&gt;executable;
-        visitor.append(&amp;executable);
-        return;
-    } }
-    RELEASE_ASSERT_NOT_REACHED();
-}
-
-DesiredWriteBarriers::DesiredWriteBarriers()
-{
-}
-
-DesiredWriteBarriers::~DesiredWriteBarriers()
-{
-}
-
-void DesiredWriteBarriers::trigger(VM&amp; vm)
-{
-    for (unsigned i = 0; i &lt; m_barriers.size(); i++)
-        m_barriers[i].trigger(vm);
-}
-
-void DesiredWriteBarriers::visitChildren(SlotVisitor&amp; visitor)
-{
-    for (unsigned i = 0; i &lt; m_barriers.size(); i++)
-        m_barriers[i].visitChildren(visitor);
-}
-
-} } // namespace JSC::DFG
-
-#endif // ENABLE(DFG_JIT)
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGDesiredWriteBarriersh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/dfg/DFGDesiredWriteBarriers.h (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGDesiredWriteBarriers.h        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/dfg/DFGDesiredWriteBarriers.h        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -1,107 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DFGDesiredWriteBarriers_h
-#define DFGDesiredWriteBarriers_h
-
-#include &quot;WriteBarrier.h&quot;
-#include &lt;wtf/Vector.h&gt;
-
-#if ENABLE(DFG_JIT)
-
-namespace JSC {
-
-class JSFunction;
-class ScriptExecutable;
-class SlotVisitor;
-class VM;
-struct InlineCallFrame;
-
-namespace DFG {
-
-class DesiredWriteBarrier {
-public:
-    enum Type {
-        ConstantType,
-        InlineCallFrameExecutableType,
-    };
-    DesiredWriteBarrier(Type, CodeBlock*, unsigned index, JSCell* owner);
-    DesiredWriteBarrier(Type, CodeBlock*, InlineCallFrame*, JSCell* owner);
-
-    void trigger(VM&amp;);
-    
-    void visitChildren(SlotVisitor&amp;);
-
-private:
-    JSCell* m_owner;
-    Type m_type;
-    CodeBlock* m_codeBlock;
-    union {
-        unsigned index;
-        InlineCallFrame* inlineCallFrame;
-    } m_which;
-};
-
-class DesiredWriteBarriers {
-public:
-    DesiredWriteBarriers();
-    ~DesiredWriteBarriers();
-
-    DesiredWriteBarrier&amp; add(DesiredWriteBarrier::Type type, CodeBlock* codeBlock, unsigned index, JSCell* owner)
-    {
-        m_barriers.append(DesiredWriteBarrier(type, codeBlock, index, owner));
-        return m_barriers.last();
-    }
-    DesiredWriteBarrier&amp; add(DesiredWriteBarrier::Type type, CodeBlock* codeBlock, InlineCallFrame* inlineCallFrame, JSCell* owner)
-    {
-        m_barriers.append(DesiredWriteBarrier(type, codeBlock, inlineCallFrame, owner));
-        return m_barriers.last();
-    }
-
-    void trigger(VM&amp;);
-    
-    void visitChildren(SlotVisitor&amp;);
-
-private:
-    Vector&lt;DesiredWriteBarrier&gt; m_barriers;
-};
-
-inline void initializeLazyWriteBarrierForInlineCallFrameExecutable(DesiredWriteBarriers&amp; barriers, WriteBarrier&lt;ScriptExecutable&gt;&amp; barrier, CodeBlock* codeBlock, InlineCallFrame* inlineCallFrame, JSCell* owner, ScriptExecutable* value)
-{
-    DesiredWriteBarrier&amp; desiredBarrier = barriers.add(DesiredWriteBarrier::InlineCallFrameExecutableType, codeBlock, inlineCallFrame, owner);
-    barrier = WriteBarrier&lt;ScriptExecutable&gt;(desiredBarrier, value);
-}
-
-inline void initializeLazyWriteBarrierForConstant(DesiredWriteBarriers&amp; barriers, WriteBarrier&lt;Unknown&gt;&amp; barrier, CodeBlock* codeBlock, unsigned index, JSCell* owner, JSValue value)
-{
-    DesiredWriteBarrier&amp; desiredBarrier = barriers.add(DesiredWriteBarrier::ConstantType, codeBlock, index, owner);
-    barrier = WriteBarrier&lt;Unknown&gt;(desiredBarrier, value);
-}
-
-} } // namespace JSC::DFG
-
-#endif // ENABLE(DFG_JIT)
-
-#endif // DFGDesiredWriteBarriers_h
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGGraphcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -1121,13 +1121,8 @@
</span><span class="cx">         }
</span><span class="cx">         case StrongValue: {
</span><span class="cx">             unsigned constantIndex = m_codeBlock-&gt;addConstantLazily();
</span><del>-            initializeLazyWriteBarrierForConstant(
-                m_plan.writeBarriers,
-                m_codeBlock-&gt;constants()[constantIndex],
-                m_codeBlock,
-                constantIndex,
-                m_codeBlock-&gt;ownerExecutable(),
-                value-&gt;value());
</del><ins>+            // We already have a barrier on the code block.
+            m_codeBlock-&gt;constants()[constantIndex].setWithoutWriteBarrier(value-&gt;value());
</ins><span class="cx">             break;
</span><span class="cx">         } }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPlancpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -529,7 +529,6 @@
</span><span class="cx">     identifiers.reallyAdd(vm, commonData);
</span><span class="cx">     weakReferences.reallyAdd(vm, commonData);
</span><span class="cx">     transitions.reallyAdd(vm, commonData);
</span><del>-    writeBarriers.trigger(vm);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Plan::notifyCompiling()
</span><span class="lines">@@ -550,6 +549,9 @@
</span><span class="cx"> 
</span><span class="cx"> CompilationResult Plan::finalizeWithoutNotifyingCallback()
</span><span class="cx"> {
</span><ins>+    // We will establish new references from the code block to things. So, we need a barrier.
+    vm.heap.writeBarrier(codeBlock-&gt;ownerExecutable());
+    
</ins><span class="cx">     if (!isStillValid())
</span><span class="cx">         return CompilationInvalidated;
</span><span class="cx"> 
</span><span class="lines">@@ -605,7 +607,6 @@
</span><span class="cx">     codeBlocks.mark(profiledDFGCodeBlock.get());
</span><span class="cx">     
</span><span class="cx">     weakReferences.visitChildren(visitor);
</span><del>-    writeBarriers.visitChildren(visitor);
</del><span class="cx">     transitions.visitChildren(visitor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -633,7 +634,6 @@
</span><span class="cx">     watchpoints = DesiredWatchpoints();
</span><span class="cx">     identifiers = DesiredIdentifiers();
</span><span class="cx">     weakReferences = DesiredWeakReferences();
</span><del>-    writeBarriers = DesiredWriteBarriers();
</del><span class="cx">     transitions = DesiredTransitions();
</span><span class="cx">     callback = nullptr;
</span><span class="cx">     stage = Cancelled;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPlanh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPlan.h (186984 => 186985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPlan.h        2015-07-18 05:20:47 UTC (rev 186984)
+++ trunk/Source/JavaScriptCore/dfg/DFGPlan.h        2015-07-18 05:49:32 UTC (rev 186985)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include &quot;DFGDesiredTransitions.h&quot;
</span><span class="cx"> #include &quot;DFGDesiredWatchpoints.h&quot;
</span><span class="cx"> #include &quot;DFGDesiredWeakReferences.h&quot;
</span><del>-#include &quot;DFGDesiredWriteBarriers.h&quot;
</del><span class="cx"> #include &quot;DFGFinalizer.h&quot;
</span><span class="cx"> #include &quot;DeferredCompilationCallback.h&quot;
</span><span class="cx"> #include &quot;Operands.h&quot;
</span><span class="lines">@@ -94,7 +93,6 @@
</span><span class="cx">     DesiredWatchpoints watchpoints;
</span><span class="cx">     DesiredIdentifiers identifiers;
</span><span class="cx">     DesiredWeakReferences weakReferences;
</span><del>-    DesiredWriteBarriers writeBarriers;
</del><span class="cx">     DesiredTransitions transitions;
</span><span class="cx">     
</span><span class="cx">     bool willTryToTierUp;
</span></span></pre>
</div>
</div>

</body>
</html>