<!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>[190151] 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/190151">190151</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2015-09-22 18:35:49 -0700 (Tue, 22 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>GCThreadSharedData is just a bad way of saying Heap
https://bugs.webkit.org/show_bug.cgi?id=149435

Reviewed by Mark Lam.

This removes the GCThreadSharedData class and moves its members into Heap. This is a net
simplification since GCThreadSharedData had a 1-to-1 mapping to Heap and the two classes had a
vast contract with a lot of interdependencies. Heap would call a lot of GCThreadSharedData
methods; now a lot of those are inlined since they were only called from the one place in Heap.
This makes it a lot easier to see what is going on. For example, you no longer have to look at
code in two places (Heap and GCThreadSharedData) to figure out the timing and synchronization
of GC phases - all of that code is in Heap now.

This also removes weird indirections in other places. It used to be that a lot of GC helper
classes woud have a pointer to GCThreadSharedData, and then would use that to get to Heap, VM,
and the visitors. Now these helpers just point to Heap.

I think that GCThreadSharedData was only useful for defining the set of things that we need to
know to collect garbage. That's how we decided if something would go into GCThreadSharedData
instead of Heap. But I think that separating things into multiple classes usually makes the
code less hackable, so there should be a very high bar for doing this in a way that produces a
1-to-1 mapping between two classes - where one instance of one of the classes is always paired
with exactly one instance of the other class and vice-versa.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/CopiedSpace.h:
* heap/CopyVisitor.cpp:
(JSC::CopyVisitor::CopyVisitor):
(JSC::CopyVisitor::copyFromShared):
* heap/CopyVisitor.h:
* heap/CopyVisitorInlines.h:
(JSC::CopyVisitor::allocateNewSpaceSlow):
(JSC::CopyVisitor::startCopying):
(JSC::CopyVisitor::doneCopying):
(JSC::CopyVisitor::didCopy):
* heap/GCThread.cpp:
(JSC::GCThread::GCThread):
(JSC::GCThread::waitForNextPhase):
(JSC::GCThread::gcThreadMain):
* heap/GCThread.h:
* heap/GCThreadSharedData.cpp: Removed.
* heap/GCThreadSharedData.h: Removed.
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::isPagedOut):
(JSC::Heap::markRoots):
(JSC::Heap::copyBackingStores):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::resetVisitors):
(JSC::Heap::objectCount):
(JSC::Heap::sweepNextLogicallyEmptyWeakBlock):
(JSC::Heap::threadVisitCount):
(JSC::Heap::threadBytesVisited):
(JSC::Heap::threadBytesCopied):
(JSC::Heap::startNextPhase):
(JSC::Heap::endCurrentPhase):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::unregisterWeakGCMap):
(JSC::Heap::getNextBlocksToCopy):
* heap/ListableHandler.h:
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::SlotVisitor):
(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::reset):
(JSC::SlotVisitor::donateKnownParallel):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::mergeOpaqueRoots):
(JSC::SlotVisitor::harvestWeakReferences):
(JSC::SlotVisitor::finalizeUnconditionalFinalizers):
* heap/SlotVisitor.h:
(JSC::SlotVisitor::markStack):
(JSC::SlotVisitor::isEmpty):
(JSC::SlotVisitor::sharedData): Deleted.
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::addWeakReferenceHarvester):
(JSC::SlotVisitor::addUnconditionalFinalizer):
(JSC::SlotVisitor::addOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRootTriState):
(JSC::SlotVisitor::opaqueRootCount):
(JSC::SlotVisitor::mergeOpaqueRootsIfNecessary):
(JSC::SlotVisitor::copyLater):
(JSC::SlotVisitor::heap):
(JSC::SlotVisitor::vm):</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="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCopiedSpaceh">trunk/Source/JavaScriptCore/heap/CopiedSpace.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCopyVisitorcpp">trunk/Source/JavaScriptCore/heap/CopyVisitor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCopyVisitorh">trunk/Source/JavaScriptCore/heap/CopyVisitor.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCopyVisitorInlinesh">trunk/Source/JavaScriptCore/heap/CopyVisitorInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapGCThreadcpp">trunk/Source/JavaScriptCore/heap/GCThread.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapGCThreadh">trunk/Source/JavaScriptCore/heap/GCThread.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapcpp">trunk/Source/JavaScriptCore/heap/Heap.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeaph">trunk/Source/JavaScriptCore/heap/Heap.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapInlinesh">trunk/Source/JavaScriptCore/heap/HeapInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapListableHandlerh">trunk/Source/JavaScriptCore/heap/ListableHandler.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapSlotVisitorcpp">trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapSlotVisitorh">trunk/Source/JavaScriptCore/heap/SlotVisitor.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapSlotVisitorInlinesh">trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreheapGCThreadSharedDatacpp">trunk/Source/JavaScriptCore/heap/GCThreadSharedData.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapGCThreadSharedDatah">trunk/Source/JavaScriptCore/heap/GCThreadSharedData.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 (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -295,7 +295,6 @@
</span><span class="cx">     heap/GCActivityCallback.cpp
</span><span class="cx">     heap/GCLogging.cpp
</span><span class="cx">     heap/GCThread.cpp
</span><del>-    heap/GCThreadSharedData.cpp
</del><span class="cx">     heap/HandleSet.cpp
</span><span class="cx">     heap/HandleStack.cpp
</span><span class="cx">     heap/Heap.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -1,3 +1,96 @@
</span><ins>+2015-09-22  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        GCThreadSharedData is just a bad way of saying Heap
+        https://bugs.webkit.org/show_bug.cgi?id=149435
+
+        Reviewed by Mark Lam.
+
+        This removes the GCThreadSharedData class and moves its members into Heap. This is a net
+        simplification since GCThreadSharedData had a 1-to-1 mapping to Heap and the two classes had a
+        vast contract with a lot of interdependencies. Heap would call a lot of GCThreadSharedData
+        methods; now a lot of those are inlined since they were only called from the one place in Heap.
+        This makes it a lot easier to see what is going on. For example, you no longer have to look at
+        code in two places (Heap and GCThreadSharedData) to figure out the timing and synchronization
+        of GC phases - all of that code is in Heap now.
+
+        This also removes weird indirections in other places. It used to be that a lot of GC helper
+        classes woud have a pointer to GCThreadSharedData, and then would use that to get to Heap, VM,
+        and the visitors. Now these helpers just point to Heap.
+
+        I think that GCThreadSharedData was only useful for defining the set of things that we need to
+        know to collect garbage. That's how we decided if something would go into GCThreadSharedData
+        instead of Heap. But I think that separating things into multiple classes usually makes the
+        code less hackable, so there should be a very high bar for doing this in a way that produces a
+        1-to-1 mapping between two classes - where one instance of one of the classes is always paired
+        with exactly one instance of the other class and vice-versa.
+
+        * CMakeLists.txt:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * heap/CopiedSpace.h:
+        * heap/CopyVisitor.cpp:
+        (JSC::CopyVisitor::CopyVisitor):
+        (JSC::CopyVisitor::copyFromShared):
+        * heap/CopyVisitor.h:
+        * heap/CopyVisitorInlines.h:
+        (JSC::CopyVisitor::allocateNewSpaceSlow):
+        (JSC::CopyVisitor::startCopying):
+        (JSC::CopyVisitor::doneCopying):
+        (JSC::CopyVisitor::didCopy):
+        * heap/GCThread.cpp:
+        (JSC::GCThread::GCThread):
+        (JSC::GCThread::waitForNextPhase):
+        (JSC::GCThread::gcThreadMain):
+        * heap/GCThread.h:
+        * heap/GCThreadSharedData.cpp: Removed.
+        * heap/GCThreadSharedData.h: Removed.
+        * heap/Heap.cpp:
+        (JSC::Heap::Heap):
+        (JSC::Heap::~Heap):
+        (JSC::Heap::isPagedOut):
+        (JSC::Heap::markRoots):
+        (JSC::Heap::copyBackingStores):
+        (JSC::Heap::updateObjectCounts):
+        (JSC::Heap::resetVisitors):
+        (JSC::Heap::objectCount):
+        (JSC::Heap::sweepNextLogicallyEmptyWeakBlock):
+        (JSC::Heap::threadVisitCount):
+        (JSC::Heap::threadBytesVisited):
+        (JSC::Heap::threadBytesCopied):
+        (JSC::Heap::startNextPhase):
+        (JSC::Heap::endCurrentPhase):
+        * heap/Heap.h:
+        * heap/HeapInlines.h:
+        (JSC::Heap::unregisterWeakGCMap):
+        (JSC::Heap::getNextBlocksToCopy):
+        * heap/ListableHandler.h:
+        * heap/SlotVisitor.cpp:
+        (JSC::SlotVisitor::SlotVisitor):
+        (JSC::SlotVisitor::didStartMarking):
+        (JSC::SlotVisitor::reset):
+        (JSC::SlotVisitor::donateKnownParallel):
+        (JSC::SlotVisitor::drain):
+        (JSC::SlotVisitor::drainFromShared):
+        (JSC::SlotVisitor::mergeOpaqueRoots):
+        (JSC::SlotVisitor::harvestWeakReferences):
+        (JSC::SlotVisitor::finalizeUnconditionalFinalizers):
+        * heap/SlotVisitor.h:
+        (JSC::SlotVisitor::markStack):
+        (JSC::SlotVisitor::isEmpty):
+        (JSC::SlotVisitor::sharedData): Deleted.
+        * heap/SlotVisitorInlines.h:
+        (JSC::SlotVisitor::addWeakReferenceHarvester):
+        (JSC::SlotVisitor::addUnconditionalFinalizer):
+        (JSC::SlotVisitor::addOpaqueRoot):
+        (JSC::SlotVisitor::containsOpaqueRoot):
+        (JSC::SlotVisitor::containsOpaqueRootTriState):
+        (JSC::SlotVisitor::opaqueRootCount):
+        (JSC::SlotVisitor::mergeOpaqueRootsIfNecessary):
+        (JSC::SlotVisitor::copyLater):
+        (JSC::SlotVisitor::heap):
+        (JSC::SlotVisitor::vm):
+
</ins><span class="cx"> 2015-09-22  Saam barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: [ES6] Improve Type Profiler Support for Arrow Functions
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -566,7 +566,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\GCActivityCallback.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\GCLogging.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\GCThread.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\heap\GCThreadSharedData.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\heap\HandleSet.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\HandleStack.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\Heap.cpp&quot; /&gt;
</span><span class="lines">@@ -1344,7 +1343,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\GCSegmentedArrayInlines.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\GCAssertions.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\GCThread.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\heap\GCThreadSharedData.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\heap\Handle.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\HandleBlock.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\HandleBlockInlines.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -282,9 +282,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\heap\GCThread.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;heap&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\heap\GCThreadSharedData.cpp&quot;&gt;
-      &lt;Filter&gt;heap&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\heap\HandleSet.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;heap&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -2270,9 +2267,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\heap\GCThread.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;heap&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\heap\GCThreadSharedData.h&quot;&gt;
-      &lt;Filter&gt;heap&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\heap\Handle.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;heap&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -1657,8 +1657,6 @@
</span><span class="cx">                 BCFD8C930EEB2EE700283848 /* JumpTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFD8C910EEB2EE700283848 /* JumpTable.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 C20328201981979D0088B499 /* CustomGlobalObjectClassTest.c in Sources */ = {isa = PBXBuildFile; fileRef = C203281E1981979D0088B499 /* CustomGlobalObjectClassTest.c */; };
</span><span class="cx">                 C20BA92D16BB1C1500B3AEA2 /* StructureRareDataInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C20BA92C16BB1C1500B3AEA2 /* StructureRareDataInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                C21122E115DD9AB300790E3A /* GCThreadSharedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */; };
-                C21122E215DD9AB300790E3A /* GCThreadSharedData.h in Headers */ = {isa = PBXBuildFile; fileRef = C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 C2160FE715F7E95E00942DFC /* SlotVisitorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCB408515C0A3C30048932B /* SlotVisitorInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 C2181FC218A948FB0025A235 /* JSExportTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = C2181FC118A948FB0025A235 /* JSExportTests.mm */; };
</span><span class="cx">                 C218D1401655CFD50062BB81 /* CopyWorkList.h in Headers */ = {isa = PBXBuildFile; fileRef = C218D13F1655CFD50062BB81 /* CopyWorkList.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1666,7 +1664,7 @@
</span><span class="cx">                 C2239D1816262BDD005AC5FD /* CopyVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = C2239D1316262BDD005AC5FD /* CopyVisitor.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 C2239D1916262BDD005AC5FD /* CopyVisitorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C2239D1416262BDD005AC5FD /* CopyVisitorInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 C2239D1A16262BDD005AC5FD /* GCThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2239D1516262BDD005AC5FD /* GCThread.cpp */; };
</span><del>-                C2239D1B16262BDD005AC5FD /* GCThread.h in Headers */ = {isa = PBXBuildFile; fileRef = C2239D1616262BDD005AC5FD /* GCThread.h */; };
</del><ins>+                C2239D1B16262BDD005AC5FD /* GCThread.h in Headers */ = {isa = PBXBuildFile; fileRef = C2239D1616262BDD005AC5FD /* GCThread.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 C225494315F7DBAA0065E898 /* SlotVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C225494215F7DBAA0065E898 /* SlotVisitor.cpp */; };
</span><span class="cx">                 C22B31B9140577D700DB475A /* SamplingCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F77008E1402FDD60078EB39 /* SamplingCounter.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C240305314B404C90079EB64 /* CopiedSpace.cpp */; };
</span><span class="lines">@@ -3529,8 +3527,6 @@
</span><span class="cx">                 C203281E1981979D0088B499 /* CustomGlobalObjectClassTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = CustomGlobalObjectClassTest.c; path = API/tests/CustomGlobalObjectClassTest.c; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C203281F1981979D0088B499 /* CustomGlobalObjectClassTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomGlobalObjectClassTest.h; path = API/tests/CustomGlobalObjectClassTest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C20BA92C16BB1C1500B3AEA2 /* StructureRareDataInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureRareDataInlines.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCThreadSharedData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCThreadSharedData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 C211B574176A224D000E2A23 /* APICallbackFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APICallbackFunction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C2181FC018A948FB0025A235 /* JSExportTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSExportTests.h; path = API/tests/JSExportTests.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C2181FC118A948FB0025A235 /* JSExportTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = JSExportTests.mm; path = API/tests/JSExportTests.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4255,8 +4251,6 @@
</span><span class="cx">                                 2A343F7718A1749D0039B085 /* GCSegmentedArrayInlines.h */,
</span><span class="cx">                                 C2239D1516262BDD005AC5FD /* GCThread.cpp */,
</span><span class="cx">                                 C2239D1616262BDD005AC5FD /* GCThread.h */,
</span><del>-                                C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */,
-                                C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */,
</del><span class="cx">                                 142E312B134FF0A600AFADB5 /* Handle.h */,
</span><span class="cx">                                 C28318FF16FE4B7D00157BFD /* HandleBlock.h */,
</span><span class="cx">                                 C283190116FE533E00157BFD /* HandleBlockInlines.h */,
</span><span class="lines">@@ -6401,7 +6395,6 @@
</span><span class="cx">                                 0F2B66AE17B6B54500A7AE3F /* GCIncomingRefCountedSet.h in Headers */,
</span><span class="cx">                                 0F2B66AF17B6B54500A7AE3F /* GCIncomingRefCountedSetInlines.h in Headers */,
</span><span class="cx">                                 C2239D1B16262BDD005AC5FD /* GCThread.h in Headers */,
</span><del>-                                C21122E215DD9AB300790E3A /* GCThreadSharedData.h in Headers */,
</del><span class="cx">                                 0F2B66E017B6B5AB00A7AE3F /* GenericTypedArrayView.h in Headers */,
</span><span class="cx">                                 0F1FE51C1922A3BC006987C5 /* AbortReason.h in Headers */,
</span><span class="cx">                                 0F2B66E117B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h in Headers */,
</span><span class="lines">@@ -7723,7 +7716,6 @@
</span><span class="cx">                                 0F64B2711A784BAF006E4E66 /* BinarySwitch.cpp in Sources */,
</span><span class="cx">                                 0F766D2F15A8DCE0008F363E /* GCAwareJITStubRoutine.cpp in Sources */,
</span><span class="cx">                                 C2239D1A16262BDD005AC5FD /* GCThread.cpp in Sources */,
</span><del>-                                C21122E115DD9AB300790E3A /* GCThreadSharedData.cpp in Sources */,
</del><span class="cx">                                 0F93329F14CA7DCA0085F3C6 /* GetByIdStatus.cpp in Sources */,
</span><span class="cx">                                 0F0332C318B01763005F979A /* GetByIdVariant.cpp in Sources */,
</span><span class="cx">                                 14280855107EC0E70013E7B2 /* GetterSetter.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCopiedSpaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CopiedSpace.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CopiedSpace.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/CopiedSpace.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx"> class CopiedSpace {
</span><span class="cx">     friend class CopyVisitor;
</span><del>-    friend class GCThreadSharedData;
</del><ins>+    friend class Heap;
</ins><span class="cx">     friend class SlotVisitor;
</span><span class="cx">     friend class JIT;
</span><span class="cx"> public:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCopyVisitorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CopyVisitor.cpp (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CopyVisitor.cpp        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/CopyVisitor.cpp        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include &quot;CopiedSpaceInlines.h&quot;
</span><span class="cx"> #include &quot;CopyVisitorInlines.h&quot;
</span><span class="cx"> #include &quot;CopyWorkList.h&quot;
</span><del>-#include &quot;GCThreadSharedData.h&quot;
</del><span class="cx"> #include &quot;JSCell.h&quot;
</span><span class="cx"> #include &quot;JSObject.h&quot;
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="lines">@@ -37,18 +36,18 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-CopyVisitor::CopyVisitor(GCThreadSharedData&amp; shared)
-    : m_shared(shared)
</del><ins>+CopyVisitor::CopyVisitor(Heap&amp; heap)
+    : m_heap(heap)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CopyVisitor::copyFromShared()
</span><span class="cx"> {
</span><span class="cx">     size_t next, end;
</span><del>-    m_shared.getNextBlocksToCopy(next, end);
</del><ins>+    m_heap.getNextBlocksToCopy(next, end);
</ins><span class="cx">     while (next &lt; end) {
</span><span class="cx">         for (; next &lt; end; ++next) {
</span><del>-            CopiedBlock* block = m_shared.m_blocksToCopy[next];
</del><ins>+            CopiedBlock* block = m_heap.m_blocksToCopy[next];
</ins><span class="cx">             if (!block-&gt;hasWorkList())
</span><span class="cx">                 continue;
</span><span class="cx"> 
</span><span class="lines">@@ -57,9 +56,9 @@
</span><span class="cx">                 visitItem(*it);
</span><span class="cx"> 
</span><span class="cx">             ASSERT(!block-&gt;liveBytes());
</span><del>-            m_shared.m_copiedSpace-&gt;recycleEvacuatedBlock(block, m_shared.m_vm-&gt;heap.operationInProgress());
</del><ins>+            m_heap.m_storageSpace.recycleEvacuatedBlock(block, m_heap.operationInProgress());
</ins><span class="cx">         }
</span><del>-        m_shared.getNextBlocksToCopy(next, end);
</del><ins>+        m_heap.getNextBlocksToCopy(next, end);
</ins><span class="cx">     }
</span><span class="cx">     ASSERT(next == end);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCopyVisitorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CopyVisitor.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CopyVisitor.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/CopyVisitor.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -30,12 +30,12 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-class GCThreadSharedData;
</del><ins>+class Heap;
</ins><span class="cx"> class JSCell;
</span><span class="cx"> 
</span><span class="cx"> class CopyVisitor {
</span><span class="cx"> public:
</span><del>-    CopyVisitor(GCThreadSharedData&amp;);
</del><ins>+    CopyVisitor(Heap&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void copyFromShared();
</span><span class="cx"> 
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     void* allocateNewSpaceSlow(size_t);
</span><span class="cx">     void visitItem(CopyWorklistItem);
</span><span class="cx"> 
</span><del>-    GCThreadSharedData&amp; m_shared;
</del><ins>+    Heap&amp; m_heap;
</ins><span class="cx">     CopiedAllocator m_copiedAllocator;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCopyVisitorInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CopyVisitorInlines.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CopyVisitorInlines.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/CopyVisitorInlines.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ClassInfo.h&quot;
</span><span class="cx"> #include &quot;CopyVisitor.h&quot;
</span><del>-#include &quot;GCThreadSharedData.h&quot;
</del><ins>+#include &quot;Heap.h&quot;
</ins><span class="cx"> #include &quot;JSCell.h&quot;
</span><span class="cx"> #include &quot;JSDestructibleObject.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> inline void* CopyVisitor::allocateNewSpaceSlow(size_t bytes)
</span><span class="cx"> {
</span><span class="cx">     CopiedBlock* newBlock = 0;
</span><del>-    m_shared.m_copiedSpace-&gt;doneFillingBlock(m_copiedAllocator.resetCurrentBlock(), &amp;newBlock);
</del><ins>+    m_heap.m_storageSpace.doneFillingBlock(m_copiedAllocator.resetCurrentBlock(), &amp;newBlock);
</ins><span class="cx">     m_copiedAllocator.setCurrentBlock(newBlock);
</span><span class="cx"> 
</span><span class="cx">     void* result = 0;
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_copiedAllocator.isValid());
</span><span class="cx">     CopiedBlock* block = 0;
</span><del>-    m_shared.m_copiedSpace-&gt;doneFillingBlock(m_copiedAllocator.resetCurrentBlock(), &amp;block);
</del><ins>+    m_heap.m_storageSpace.doneFillingBlock(m_copiedAllocator.resetCurrentBlock(), &amp;block);
</ins><span class="cx">     m_copiedAllocator.setCurrentBlock(block);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">     if (!m_copiedAllocator.isValid())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_shared.m_copiedSpace-&gt;doneFillingBlock(m_copiedAllocator.resetCurrentBlock(), 0);
</del><ins>+    m_heap.m_storageSpace.doneFillingBlock(m_copiedAllocator.resetCurrentBlock(), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void CopyVisitor::didCopy(void* ptr, size_t bytes)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapGCThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/GCThread.cpp (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/GCThread.cpp        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/GCThread.cpp        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -28,16 +28,15 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CopyVisitor.h&quot;
</span><span class="cx"> #include &quot;CopyVisitorInlines.h&quot;
</span><del>-#include &quot;GCThreadSharedData.h&quot;
</del><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="cx"> #include &quot;SlotVisitor.h&quot;
</span><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-GCThread::GCThread(GCThreadSharedData&amp; shared, std::unique_ptr&lt;SlotVisitor&gt; slotVisitor, std::unique_ptr&lt;CopyVisitor&gt; copyVisitor)
</del><ins>+GCThread::GCThread(Heap&amp; heap, std::unique_ptr&lt;SlotVisitor&gt; slotVisitor, std::unique_ptr&lt;CopyVisitor&gt; copyVisitor)
</ins><span class="cx">     : m_threadID(0)
</span><del>-    , m_shared(shared)
</del><ins>+    , m_heap(heap)
</ins><span class="cx">     , m_slotVisitor(WTF::move(slotVisitor))
</span><span class="cx">     , m_copyVisitor(WTF::move(copyVisitor))
</span><span class="cx"> {
</span><span class="lines">@@ -69,16 +68,16 @@
</span><span class="cx"> 
</span><span class="cx"> GCPhase GCThread::waitForNextPhase()
</span><span class="cx"> {
</span><del>-    std::unique_lock&lt;Lock&gt; lock(m_shared.m_phaseMutex);
-    m_shared.m_phaseConditionVariable.wait(lock, [this] { return !m_shared.m_gcThreadsShouldWait; });
</del><ins>+    std::unique_lock&lt;Lock&gt; lock(m_heap.m_phaseMutex);
+    m_heap.m_phaseConditionVariable.wait(lock, [this] { return !m_heap.m_gcThreadsShouldWait; });
</ins><span class="cx"> 
</span><del>-    m_shared.m_numberOfActiveGCThreads--;
-    if (!m_shared.m_numberOfActiveGCThreads)
-        m_shared.m_activityConditionVariable.notifyOne();
</del><ins>+    m_heap.m_numberOfActiveGCThreads--;
+    if (!m_heap.m_numberOfActiveGCThreads)
+        m_heap.m_activityConditionVariable.notifyOne();
</ins><span class="cx"> 
</span><del>-    m_shared.m_phaseConditionVariable.wait(lock, [this] { return m_shared.m_currentPhase != NoPhase; });
-    m_shared.m_numberOfActiveGCThreads++;
-    return m_shared.m_currentPhase;
</del><ins>+    m_heap.m_phaseConditionVariable.wait(lock, [this] { return m_heap.m_currentPhase != NoPhase; });
+    m_heap.m_numberOfActiveGCThreads++;
+    return m_heap.m_currentPhase;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GCThread::gcThreadMain()
</span><span class="lines">@@ -88,7 +87,7 @@
</span><span class="cx">     // Wait for the main thread to finish creating and initializing us. The main thread grabs this lock before 
</span><span class="cx">     // creating this thread. We aren't guaranteed to have a valid threadID until the main thread releases this lock.
</span><span class="cx">     {
</span><del>-        std::lock_guard&lt;Lock&gt; lock(m_shared.m_phaseMutex);
</del><ins>+        std::lock_guard&lt;Lock&gt; lock(m_heap.m_phaseMutex);
</ins><span class="cx">     }
</span><span class="cx">     {
</span><span class="cx">         ParallelModeEnabler enabler(*m_slotVisitor);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapGCThreadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/GCThread.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/GCThread.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/GCThread.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -26,19 +26,25 @@
</span><span class="cx"> #ifndef GCThread_h
</span><span class="cx"> #define GCThread_h
</span><span class="cx"> 
</span><del>-#include &lt;GCThreadSharedData.h&gt;
</del><span class="cx"> #include &lt;wtf/Deque.h&gt;
</span><span class="cx"> #include &lt;wtf/Threading.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="cx"> class CopyVisitor;
</span><del>-class GCThreadSharedData;
</del><ins>+class Heap;
</ins><span class="cx"> class SlotVisitor;
</span><span class="cx"> 
</span><ins>+enum GCPhase {
+    NoPhase,
+    Mark,
+    Copy,
+    Exit
+};
+
</ins><span class="cx"> class GCThread {
</span><span class="cx"> public:
</span><del>-    GCThread(GCThreadSharedData&amp;, std::unique_ptr&lt;SlotVisitor&gt;, std::unique_ptr&lt;CopyVisitor&gt;);
</del><ins>+    GCThread(Heap&amp;, std::unique_ptr&lt;SlotVisitor&gt;, std::unique_ptr&lt;CopyVisitor&gt;);
</ins><span class="cx"> 
</span><span class="cx">     SlotVisitor* slotVisitor();
</span><span class="cx">     CopyVisitor* copyVisitor();
</span><span class="lines">@@ -52,7 +58,7 @@
</span><span class="cx">     GCPhase waitForNextPhase();
</span><span class="cx"> 
</span><span class="cx">     ThreadIdentifier m_threadID;
</span><del>-    GCThreadSharedData&amp; m_shared;
</del><ins>+    Heap&amp; m_heap;
</ins><span class="cx">     std::unique_ptr&lt;SlotVisitor&gt; m_slotVisitor;
</span><span class="cx">     std::unique_ptr&lt;CopyVisitor&gt; m_copyVisitor;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapGCThreadSharedDatacpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/heap/GCThreadSharedData.cpp (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/GCThreadSharedData.cpp        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/GCThreadSharedData.cpp        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -1,199 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009, 2011, 2015 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. ``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
- * 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;GCThreadSharedData.h&quot;
-
-#include &quot;CopyVisitor.h&quot;
-#include &quot;CopyVisitorInlines.h&quot;
-#include &quot;GCThread.h&quot;
-#include &quot;MarkStack.h&quot;
-#include &quot;JSCInlines.h&quot;
-#include &quot;SlotVisitor.h&quot;
-#include &quot;SlotVisitorInlines.h&quot;
-#include &quot;VM.h&quot;
-
-namespace JSC {
-
-void GCThreadSharedData::resetChildren()
-{
-    for (size_t i = 0; i &lt; m_gcThreads.size(); ++i)
-        m_gcThreads[i]-&gt;slotVisitor()-&gt;reset();
-}
-
-size_t GCThreadSharedData::childVisitCount()
-{       
-    unsigned long result = 0;
-    for (unsigned i = 0; i &lt; m_gcThreads.size(); ++i)
-        result += m_gcThreads[i]-&gt;slotVisitor()-&gt;visitCount();
-    return result;
-}
-
-size_t GCThreadSharedData::childBytesVisited()
-{       
-    size_t result = 0;
-    for (unsigned i = 0; i &lt; m_gcThreads.size(); ++i)
-        result += m_gcThreads[i]-&gt;slotVisitor()-&gt;bytesVisited();
-    return result;
-}
-
-size_t GCThreadSharedData::childBytesCopied()
-{       
-    size_t result = 0;
-    for (unsigned i = 0; i &lt; m_gcThreads.size(); ++i)
-        result += m_gcThreads[i]-&gt;slotVisitor()-&gt;bytesCopied();
-    return result;
-}
-
-GCThreadSharedData::GCThreadSharedData(VM* vm)
-    : m_vm(vm)
-    , m_copiedSpace(&amp;vm-&gt;heap.m_storageSpace)
-    , m_shouldHashCons(false)
-    , m_sharedMarkStack()
-    , m_numberOfActiveParallelMarkers(0)
-    , m_parallelMarkersShouldExit(false)
-    , m_copyIndex(0)
-    , m_numberOfActiveGCThreads(0)
-    , m_gcThreadsShouldWait(false)
-    , m_currentPhase(NoPhase)
-{
-    // Grab the lock so the new GC threads can be properly initialized before they start running.
-    std::unique_lock&lt;Lock&gt; lock(m_phaseMutex);
-    for (unsigned i = 1; i &lt; Options::numberOfGCMarkers(); ++i) {
-        m_numberOfActiveGCThreads++;
-        GCThread* newThread = new GCThread(*this, std::make_unique&lt;SlotVisitor&gt;(*this), std::make_unique&lt;CopyVisitor&gt;(*this));
-        ThreadIdentifier threadID = createThread(GCThread::gcThreadStartFunc, newThread, &quot;JavaScriptCore::Marking&quot;);
-        newThread-&gt;initializeThreadID(threadID);
-        m_gcThreads.append(newThread);
-    }
-
-    // Wait for all the GCThreads to get to the right place.
-    m_activityConditionVariable.wait(lock, [this] { return !m_numberOfActiveGCThreads; });
-}
-
-GCThreadSharedData::~GCThreadSharedData()
-{
-    // Destroy our marking threads.
-    {
-        std::lock_guard&lt;Lock&gt; markingLock(m_markingMutex);
-        std::lock_guard&lt;Lock&gt; phaseLock(m_phaseMutex);
-        ASSERT(m_currentPhase == NoPhase);
-        m_parallelMarkersShouldExit = true;
-        m_gcThreadsShouldWait = false;
-        m_currentPhase = Exit;
-        m_phaseConditionVariable.notifyAll();
-    }
-    for (unsigned i = 0; i &lt; m_gcThreads.size(); ++i) {
-        waitForThreadCompletion(m_gcThreads[i]-&gt;threadID());
-        delete m_gcThreads[i];
-    }
-}
-
-void GCThreadSharedData::reset()
-{
-    ASSERT(m_sharedMarkStack.isEmpty());
-    
-    m_weakReferenceHarvesters.removeAll();
-
-    if (m_shouldHashCons) {
-        m_vm-&gt;resetNewStringsSinceLastHashCons();
-        m_shouldHashCons = false;
-    }
-}
-
-void GCThreadSharedData::startNextPhase(GCPhase phase)
-{
-    std::lock_guard&lt;Lock&gt; lock(m_phaseMutex);
-    ASSERT(!m_gcThreadsShouldWait);
-    ASSERT(m_currentPhase == NoPhase);
-    m_gcThreadsShouldWait = true;
-    m_currentPhase = phase;
-    m_phaseConditionVariable.notifyAll();
-}
-
-void GCThreadSharedData::endCurrentPhase()
-{
-    ASSERT(m_gcThreadsShouldWait);
-    std::unique_lock&lt;Lock&gt; lock(m_phaseMutex);
-    m_currentPhase = NoPhase;
-    m_gcThreadsShouldWait = false;
-    m_phaseConditionVariable.notifyAll();
-    m_activityConditionVariable.wait(lock, [this] { return !m_numberOfActiveGCThreads; });
-}
-
-void GCThreadSharedData::didStartMarking()
-{
-    if (m_vm-&gt;heap.operationInProgress() == FullCollection)
-        m_opaqueRoots.clear();
-    std::lock_guard&lt;Lock&gt; lock(m_markingMutex);
-    m_parallelMarkersShouldExit = false;
-    startNextPhase(Mark);
-}
-
-void GCThreadSharedData::didFinishMarking()
-{
-    {
-        std::lock_guard&lt;Lock&gt; lock(m_markingMutex);
-        m_parallelMarkersShouldExit = true;
-        m_markingConditionVariable.notifyAll();
-    }
-
-    ASSERT(m_currentPhase == Mark);
-    endCurrentPhase();
-}
-
-void GCThreadSharedData::didStartCopying()
-{
-    {
-        LockHolder locker(&amp;m_copyLock);
-        if (m_vm-&gt;heap.operationInProgress() == EdenCollection) {
-            // Reset the vector to be empty, but don't throw away the backing store.
-            m_blocksToCopy.shrink(0);
-            for (CopiedBlock* block = m_copiedSpace-&gt;m_newGen.fromSpace-&gt;head(); block; block = block-&gt;next())
-                m_blocksToCopy.append(block);
-        } else {
-            ASSERT(m_vm-&gt;heap.operationInProgress() == FullCollection);
-            WTF::copyToVector(m_copiedSpace-&gt;m_blockSet, m_blocksToCopy);
-        }
-        m_copyIndex = 0;
-    }
-
-    // We do this here so that we avoid a race condition where the main thread can 
-    // blow through all of the copying work before the GCThreads fully wake up. 
-    // The GCThreads then request a block from the CopiedSpace when the copying phase 
-    // has completed, which isn't allowed.
-    for (size_t i = 0; i &lt; m_gcThreads.size(); i++)
-        m_gcThreads[i]-&gt;copyVisitor()-&gt;startCopying();
-
-    startNextPhase(Copy);
-}
-
-void GCThreadSharedData::didFinishCopying()
-{
-    ASSERT(m_currentPhase == Copy);
-    endCurrentPhase();
-}
-
-} // namespace JSC
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapGCThreadSharedDatah"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/heap/GCThreadSharedData.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/GCThreadSharedData.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/GCThreadSharedData.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -1,125 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009, 2011, 2015 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. ``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
- * 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 GCThreadSharedData_h
-#define GCThreadSharedData_h
-
-#include &quot;ListableHandler.h&quot;
-#include &quot;MarkStack.h&quot;
-#include &quot;MarkedBlock.h&quot;
-#include &quot;UnconditionalFinalizer.h&quot;
-#include &quot;WeakReferenceHarvester.h&quot;
-#include &lt;condition_variable&gt;
-#include &lt;wtf/Condition.h&gt;
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/Lock.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
-namespace JSC {
-
-class CopiedBlock;
-class CopiedSpace;
-class CopyVisitor;
-class GCThread;
-class VM;
-
-enum GCPhase {
-    NoPhase,
-    Mark,
-    Copy,
-    Exit
-};
-
-class GCThreadSharedData {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    GCThreadSharedData(VM*);
-    ~GCThreadSharedData();
-    
-    void reset();
-
-    void didStartMarking();
-    void didFinishMarking();
-    void didStartCopying();
-    void didFinishCopying();
-
-    void resetChildren();
-    size_t childVisitCount();
-    size_t childBytesVisited();
-    size_t childBytesCopied();
-    size_t childDupStrings();
-    
-private:
-    friend class GCThread;
-    friend class SlotVisitor;
-    friend class CopyVisitor;
-
-    void getNextBlocksToCopy(size_t&amp;, size_t&amp;);
-    void startNextPhase(GCPhase);
-    void endCurrentPhase();
-
-    VM* m_vm;
-    CopiedSpace* m_copiedSpace;
-    
-    bool m_shouldHashCons;
-
-    Vector&lt;GCThread*&gt; m_gcThreads;
-
-    Lock m_markingMutex;
-    Condition m_markingConditionVariable;
-    MarkStackArray m_sharedMarkStack;
-    unsigned m_numberOfActiveParallelMarkers;
-    bool m_parallelMarkersShouldExit;
-
-    Lock m_opaqueRootsMutex;
-    HashSet&lt;void*&gt; m_opaqueRoots;
-
-    Lock m_copyLock;
-    Vector&lt;CopiedBlock*&gt; m_blocksToCopy;
-    size_t m_copyIndex;
-    static const size_t s_blockFragmentLength = 32;
-
-    Lock m_phaseMutex;
-    Condition m_phaseConditionVariable;
-    Condition m_activityConditionVariable;
-    unsigned m_numberOfActiveGCThreads;
-    bool m_gcThreadsShouldWait;
-    GCPhase m_currentPhase;
-
-    ListableHandler&lt;WeakReferenceHarvester&gt;::List m_weakReferenceHarvesters;
-    ListableHandler&lt;UnconditionalFinalizer&gt;::List m_unconditionalFinalizers;
-};
-
-inline void GCThreadSharedData::getNextBlocksToCopy(size_t&amp; start, size_t&amp; end)
-{
-    LockHolder locker(&amp;m_copyLock);
-    start = m_copyIndex;
-    end = std::min(m_blocksToCopy.size(), m_copyIndex + s_blockFragmentLength);
-    m_copyIndex = end;
-}
-
-} // namespace JSC
-
-#endif
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.cpp (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.cpp        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/Heap.cpp        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -335,9 +335,8 @@
</span><span class="cx">     , m_extraMemorySize(0)
</span><span class="cx">     , m_deprecatedExtraMemorySize(0)
</span><span class="cx">     , m_machineThreads(this)
</span><del>-    , m_sharedData(vm)
-    , m_slotVisitor(m_sharedData)
-    , m_copyVisitor(m_sharedData)
</del><ins>+    , m_slotVisitor(*this)
+    , m_copyVisitor(*this)
</ins><span class="cx">     , m_handleSet(vm)
</span><span class="cx">     , m_isSafeToCollect(false)
</span><span class="cx">     , m_writeBarrierBuffer(256)
</span><span class="lines">@@ -358,6 +357,21 @@
</span><span class="cx">     , m_delayedReleaseRecursionCount(0)
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><ins>+    {
+        // Grab the lock so the new GC threads can be properly initialized before they start running.
+        std::unique_lock&lt;Lock&gt; lock(m_phaseMutex);
+        for (unsigned i = 1; i &lt; Options::numberOfGCMarkers(); ++i) {
+            m_numberOfActiveGCThreads++;
+            GCThread* newThread = new GCThread(*this, std::make_unique&lt;SlotVisitor&gt;(*this), std::make_unique&lt;CopyVisitor&gt;(*this));
+            ThreadIdentifier threadID = createThread(GCThread::gcThreadStartFunc, newThread, &quot;JavaScriptCore::Marking&quot;);
+            newThread-&gt;initializeThreadID(threadID);
+            m_gcThreads.append(newThread);
+        }
+        
+        // Wait for all the GCThreads to get to the right place.
+        m_activityConditionVariable.wait(lock, [this] { return !m_numberOfActiveGCThreads; });
+    }
+    
</ins><span class="cx">     m_storageSpace.init();
</span><span class="cx">     if (Options::verifyHeap())
</span><span class="cx">         m_verifier = std::make_unique&lt;HeapVerifier&gt;(this, Options::numberOfGCCyclesToRecordForVerification());
</span><span class="lines">@@ -367,6 +381,21 @@
</span><span class="cx"> {
</span><span class="cx">     for (WeakBlock* block : m_logicallyEmptyWeakBlocks)
</span><span class="cx">         WeakBlock::destroy(block);
</span><ins>+
+    // Destroy our marking threads.
+    {
+        std::lock_guard&lt;Lock&gt; markingLock(m_markingMutex);
+        std::lock_guard&lt;Lock&gt; phaseLock(m_phaseMutex);
+        ASSERT(m_currentPhase == NoPhase);
+        m_parallelMarkersShouldExit = true;
+        m_gcThreadsShouldWait = false;
+        m_currentPhase = Exit;
+        m_phaseConditionVariable.notifyAll();
+    }
+    for (unsigned i = 0; i &lt; m_gcThreads.size(); ++i) {
+        waitForThreadCompletion(m_gcThreads[i]-&gt;threadID());
+        delete m_gcThreads[i];
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool Heap::isPagedOut(double deadline)
</span><span class="lines">@@ -539,7 +568,13 @@
</span><span class="cx"> 
</span><span class="cx">     clearLivenessData();
</span><span class="cx"> 
</span><del>-    m_sharedData.didStartMarking();
</del><ins>+    if (m_operationInProgress == FullCollection)
+        m_opaqueRoots.clear();
+    {
+        std::lock_guard&lt;Lock&gt; lock(m_markingMutex);
+        m_parallelMarkersShouldExit = false;
+        startNextPhase(Mark);
+    }
</ins><span class="cx">     m_slotVisitor.didStartMarking();
</span><span class="cx">     HeapRootVisitor heapRootVisitor(m_slotVisitor);
</span><span class="cx"> 
</span><span class="lines">@@ -563,7 +598,13 @@
</span><span class="cx">     visitWeakHandles(heapRootVisitor);
</span><span class="cx"> 
</span><span class="cx">     clearRememberedSet(rememberedSet);
</span><del>-    m_sharedData.didFinishMarking();
</del><ins>+    {
+        std::lock_guard&lt;Lock&gt; lock(m_markingMutex);
+        m_parallelMarkersShouldExit = true;
+        m_markingConditionVariable.notifyAll();
+    }
+    ASSERT(m_currentPhase == Mark);
+    endCurrentPhase();
</ins><span class="cx">     updateObjectCounts(gcStartTime);
</span><span class="cx">     resetVisitors();
</span><span class="cx"> }
</span><span class="lines">@@ -579,14 +620,37 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_storageSpace.shouldDoCopyPhase()) {
</span><del>-        m_sharedData.didStartCopying();
</del><ins>+        {
+            LockHolder locker(m_copyLock);
+            if (m_operationInProgress == EdenCollection) {
+                // Reset the vector to be empty, but don't throw away the backing store.
+                m_blocksToCopy.shrink(0);
+                for (CopiedBlock* block = m_storageSpace.m_newGen.fromSpace-&gt;head(); block; block = block-&gt;next())
+                    m_blocksToCopy.append(block);
+            } else {
+                ASSERT(m_operationInProgress == FullCollection);
+                WTF::copyToVector(m_storageSpace.m_blockSet, m_blocksToCopy);
+            }
+            m_copyIndex = 0;
+        }
+        
+        // We do this here so that we avoid a race condition where the main thread can 
+        // blow through all of the copying work before the GCThreads fully wake up. 
+        // The GCThreads then request a block from the CopiedSpace when the copying phase 
+        // has completed, which isn't allowed.
+        for (size_t i = 0; i &lt; m_gcThreads.size(); i++)
+            m_gcThreads[i]-&gt;copyVisitor()-&gt;startCopying();
+        
+        startNextPhase(Copy);
+        
</ins><span class="cx">         m_copyVisitor.startCopying();
</span><span class="cx">         m_copyVisitor.copyFromShared();
</span><span class="cx">         m_copyVisitor.doneCopying();
</span><span class="cx">         // We need to wait for everybody to finish and return their CopiedBlocks 
</span><span class="cx">         // before signaling that the phase is complete.
</span><span class="cx">         m_storageSpace.doneCopying();
</span><del>-        m_sharedData.didFinishCopying();
</del><ins>+        ASSERT(m_currentPhase == Copy);
+        endCurrentPhase();
</ins><span class="cx">     } else
</span><span class="cx">         m_storageSpace.doneCopying();
</span><span class="cx"> }
</span><span class="lines">@@ -791,7 +855,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (Options::logGC() == GCLogging::Verbose) {
</span><span class="cx">         size_t visitCount = m_slotVisitor.visitCount();
</span><del>-        visitCount += m_sharedData.childVisitCount();
</del><ins>+        visitCount += threadVisitCount();
</ins><span class="cx">         dataLogF(&quot;\nNumber of live Objects after GC %lu, took %.6f secs\n&quot;, static_cast&lt;unsigned long&gt;(visitCount), WTF::monotonicallyIncreasingTime() - gcStartTime);
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -806,15 +870,23 @@
</span><span class="cx">     
</span><span class="cx">     m_totalBytesVisited += m_slotVisitor.bytesVisited();
</span><span class="cx">     m_totalBytesCopied += m_slotVisitor.bytesCopied();
</span><del>-    m_totalBytesVisited += m_sharedData.childBytesVisited();
-    m_totalBytesCopied += m_sharedData.childBytesCopied();
</del><ins>+    m_totalBytesVisited += threadBytesVisited();
+    m_totalBytesCopied += threadBytesCopied();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Heap::resetVisitors()
</span><span class="cx"> {
</span><span class="cx">     m_slotVisitor.reset();
</span><del>-    m_sharedData.resetChildren();
-    m_sharedData.reset();
</del><ins>+
+    for (GCThread* thread : m_gcThreads)
+        thread-&gt;slotVisitor()-&gt;reset();
+
+    ASSERT(m_sharedMarkStack.isEmpty());
+    m_weakReferenceHarvesters.removeAll();
+    if (m_shouldHashCons) {
+        m_vm-&gt;resetNewStringsSinceLastHashCons();
+        m_shouldHashCons = false;
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> size_t Heap::objectCount()
</span><span class="lines">@@ -1465,4 +1537,48 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+size_t Heap::threadVisitCount()
+{       
+    unsigned long result = 0;
+    for (unsigned i = 0; i &lt; m_gcThreads.size(); ++i)
+        result += m_gcThreads[i]-&gt;slotVisitor()-&gt;visitCount();
+    return result;
+}
+
+size_t Heap::threadBytesVisited()
+{       
+    size_t result = 0;
+    for (unsigned i = 0; i &lt; m_gcThreads.size(); ++i)
+        result += m_gcThreads[i]-&gt;slotVisitor()-&gt;bytesVisited();
+    return result;
+}
+
+size_t Heap::threadBytesCopied()
+{       
+    size_t result = 0;
+    for (unsigned i = 0; i &lt; m_gcThreads.size(); ++i)
+        result += m_gcThreads[i]-&gt;slotVisitor()-&gt;bytesCopied();
+    return result;
+}
+
+void Heap::startNextPhase(GCPhase phase)
+{
+    std::lock_guard&lt;Lock&gt; lock(m_phaseMutex);
+    ASSERT(!m_gcThreadsShouldWait);
+    ASSERT(m_currentPhase == NoPhase);
+    m_gcThreadsShouldWait = true;
+    m_currentPhase = phase;
+    m_phaseConditionVariable.notifyAll();
+}
+
+void Heap::endCurrentPhase()
+{
+    ASSERT(m_gcThreadsShouldWait);
+    std::unique_lock&lt;Lock&gt; lock(m_phaseMutex);
+    m_currentPhase = NoPhase;
+    m_gcThreadsShouldWait = false;
+    m_phaseConditionVariable.notifyAll();
+    m_activityConditionVariable.wait(lock, [this] { return !m_numberOfActiveGCThreads; });
+}
+
</ins><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/Heap.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
</span><span class="cx">  *  Copyright (C) 2001 Peter Kelly (pmk@post.com)
</span><del>- *  Copyright (C) 2003-2009, 2013-2014 Apple Inc. All rights reserved.
</del><ins>+ *  Copyright (C) 2003-2009, 2013-2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="cx">  *  modify it under the terms of the GNU Lesser General Public
</span><span class="lines">@@ -26,11 +26,12 @@
</span><span class="cx"> #include &quot;CodeBlockSet.h&quot;
</span><span class="cx"> #include &quot;CopyVisitor.h&quot;
</span><span class="cx"> #include &quot;GCIncomingRefCountedSet.h&quot;
</span><del>-#include &quot;GCThreadSharedData.h&quot;
</del><ins>+#include &quot;GCThread.h&quot;
</ins><span class="cx"> #include &quot;HandleSet.h&quot;
</span><span class="cx"> #include &quot;HandleStack.h&quot;
</span><span class="cx"> #include &quot;HeapOperation.h&quot;
</span><span class="cx"> #include &quot;JITStubRoutineSet.h&quot;
</span><ins>+#include &quot;ListableHandler.h&quot;
</ins><span class="cx"> #include &quot;MarkedAllocator.h&quot;
</span><span class="cx"> #include &quot;MarkedBlock.h&quot;
</span><span class="cx"> #include &quot;MarkedBlockSet.h&quot;
</span><span class="lines">@@ -38,7 +39,9 @@
</span><span class="cx"> #include &quot;Options.h&quot;
</span><span class="cx"> #include &quot;SlotVisitor.h&quot;
</span><span class="cx"> #include &quot;StructureIDTable.h&quot;
</span><ins>+#include &quot;UnconditionalFinalizer.h&quot;
</ins><span class="cx"> #include &quot;WeakHandleOwner.h&quot;
</span><ins>+#include &quot;WeakReferenceHarvester.h&quot;
</ins><span class="cx"> #include &quot;WriteBarrierBuffer.h&quot;
</span><span class="cx"> #include &quot;WriteBarrierSupport.h&quot;
</span><span class="cx"> #include &lt;wtf/HashCountedSet.h&gt;
</span><span class="lines">@@ -85,7 +88,6 @@
</span><span class="cx"> public:
</span><span class="cx">     friend class JIT;
</span><span class="cx">     friend class DFG::SpeculativeJIT;
</span><del>-    friend class GCThreadSharedData;
</del><span class="cx">     static Heap* heap(const JSValue); // 0 for immediate values
</span><span class="cx">     static Heap* heap(const JSCell*);
</span><span class="cx"> 
</span><span class="lines">@@ -243,6 +245,7 @@
</span><span class="cx">     friend class DeferGCForAWhile;
</span><span class="cx">     friend class GCAwareJITStubRoutine;
</span><span class="cx">     friend class GCLogging;
</span><ins>+    friend class GCThread;
</ins><span class="cx">     friend class HandleSet;
</span><span class="cx">     friend class HeapVerifier;
</span><span class="cx">     friend class JITStubRoutine;
</span><span class="lines">@@ -339,6 +342,15 @@
</span><span class="cx">     void decrementDeferralDepth();
</span><span class="cx">     void decrementDeferralDepthAndGCIfNeeded();
</span><span class="cx"> 
</span><ins>+    size_t threadVisitCount();
+    size_t threadBytesVisited();
+    size_t threadBytesCopied();
+    size_t threadDupStrings();
+
+    void getNextBlocksToCopy(size_t&amp;, size_t&amp;);
+    void startNextPhase(GCPhase);
+    void endCurrentPhase();
+
</ins><span class="cx">     const HeapType m_heapType;
</span><span class="cx">     const size_t m_ramSize;
</span><span class="cx">     const size_t m_minBytesPerCycle;
</span><span class="lines">@@ -371,7 +383,6 @@
</span><span class="cx"> 
</span><span class="cx">     MachineThreads m_machineThreads;
</span><span class="cx">     
</span><del>-    GCThreadSharedData m_sharedData;
</del><span class="cx">     SlotVisitor m_slotVisitor;
</span><span class="cx">     CopyVisitor m_copyVisitor;
</span><span class="cx"> 
</span><span class="lines">@@ -409,6 +420,34 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     HashMap&lt;void*, std::function&lt;void()&gt;&gt; m_weakGCMaps;
</span><ins>+
+    bool m_shouldHashCons { false };
+
+    Vector&lt;GCThread*&gt; m_gcThreads;
+
+    Lock m_markingMutex;
+    Condition m_markingConditionVariable;
+    MarkStackArray m_sharedMarkStack;
+    unsigned m_numberOfActiveParallelMarkers { 0 };
+    bool m_parallelMarkersShouldExit { false };
+
+    Lock m_opaqueRootsMutex;
+    HashSet&lt;void*&gt; m_opaqueRoots;
+
+    Lock m_copyLock;
+    Vector&lt;CopiedBlock*&gt; m_blocksToCopy;
+    size_t m_copyIndex { 0 };
+    static const size_t s_blockFragmentLength = 32;
+
+    Lock m_phaseMutex;
+    Condition m_phaseConditionVariable;
+    Condition m_activityConditionVariable;
+    unsigned m_numberOfActiveGCThreads { 0 };
+    bool m_gcThreadsShouldWait { false };
+    GCPhase m_currentPhase { NoPhase };
+
+    ListableHandler&lt;WeakReferenceHarvester&gt;::List m_weakReferenceHarvesters;
+    ListableHandler&lt;UnconditionalFinalizer&gt;::List m_unconditionalFinalizers;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/HeapInlines.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/HeapInlines.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/HeapInlines.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -326,6 +326,14 @@
</span><span class="cx">     m_weakGCMaps.remove(weakGCMap);
</span><span class="cx"> }
</span><span class="cx">     
</span><ins>+inline void Heap::getNextBlocksToCopy(size_t&amp; start, size_t&amp; end)
+{
+    LockHolder locker(m_copyLock);
+    start = m_copyIndex;
+    end = std::min(m_blocksToCopy.size(), m_copyIndex + s_blockFragmentLength);
+    m_copyIndex = end;
+}
+
</ins><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span><span class="cx"> #endif // HeapInlines_h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapListableHandlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/ListableHandler.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/ListableHandler.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/ListableHandler.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><ins>+class Heap;
</ins><span class="cx"> class MarkStack;
</span><span class="cx"> class MarkStackThreadSharedData;
</span><span class="cx"> class SlotVisitor;
</span><span class="lines">@@ -51,8 +52,8 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     // Allow these classes to use ListableHandler::List.
</span><ins>+    friend class Heap;
</ins><span class="cx">     friend class MarkStack;
</span><del>-    friend class GCThreadSharedData;
</del><span class="cx">     friend class SlotVisitor;
</span><span class="cx">     
</span><span class="cx">     class List {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapSlotVisitorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -42,13 +42,13 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-SlotVisitor::SlotVisitor(GCThreadSharedData&amp; shared)
</del><ins>+SlotVisitor::SlotVisitor(Heap&amp; heap)
</ins><span class="cx">     : m_stack()
</span><span class="cx">     , m_bytesVisited(0)
</span><span class="cx">     , m_bytesCopied(0)
</span><span class="cx">     , m_visitCount(0)
</span><span class="cx">     , m_isInParallelMode(false)
</span><del>-    , m_shared(shared)
</del><ins>+    , m_heap(heap)
</ins><span class="cx">     , m_shouldHashCons(false)
</span><span class="cx"> #if !ASSERT_DISABLED
</span><span class="cx">     , m_isCheckingForDefaultMarkViolation(false)
</span><span class="lines">@@ -67,10 +67,10 @@
</span><span class="cx">     if (heap()-&gt;operationInProgress() == FullCollection)
</span><span class="cx">         ASSERT(m_opaqueRoots.isEmpty()); // Should have merged by now.
</span><span class="cx"> 
</span><del>-    m_shared.m_shouldHashCons = m_shared.m_vm-&gt;haveEnoughNewStringsToHashCons();
-    m_shouldHashCons = m_shared.m_shouldHashCons;
-    for (unsigned i = 0; i &lt; m_shared.m_gcThreads.size(); ++i)
-        m_shared.m_gcThreads[i]-&gt;slotVisitor()-&gt;m_shouldHashCons = m_shared.m_shouldHashCons;
</del><ins>+    m_heap.m_shouldHashCons = m_heap.m_vm-&gt;haveEnoughNewStringsToHashCons();
+    m_shouldHashCons = m_heap.m_shouldHashCons;
+    for (unsigned i = 0; i &lt; m_heap.m_gcThreads.size(); ++i)
+        m_heap.m_gcThreads[i]-&gt;slotVisitor()-&gt;m_shouldHashCons = m_heap.m_shouldHashCons;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SlotVisitor::reset()
</span><span class="lines">@@ -135,20 +135,20 @@
</span><span class="cx"> 
</span><span class="cx">     // If there's already some shared work queued up, be conservative and assume
</span><span class="cx">     // that donating more is not profitable.
</span><del>-    if (m_shared.m_sharedMarkStack.size())
</del><ins>+    if (m_heap.m_sharedMarkStack.size())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // If we're contending on the lock, be conservative and assume that another
</span><span class="cx">     // thread is already donating.
</span><del>-    std::unique_lock&lt;Lock&gt; lock(m_shared.m_markingMutex, std::try_to_lock);
</del><ins>+    std::unique_lock&lt;Lock&gt; lock(m_heap.m_markingMutex, std::try_to_lock);
</ins><span class="cx">     if (!lock.owns_lock())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Otherwise, assume that a thread will go idle soon, and donate.
</span><del>-    m_stack.donateSomeCellsTo(m_shared.m_sharedMarkStack);
</del><ins>+    m_stack.donateSomeCellsTo(m_heap.m_sharedMarkStack);
</ins><span class="cx"> 
</span><del>-    if (m_shared.m_numberOfActiveParallelMarkers &lt; Options::numberOfGCMarkers())
-        m_shared.m_markingConditionVariable.notifyAll();
</del><ins>+    if (m_heap.m_numberOfActiveParallelMarkers &lt; Options::numberOfGCMarkers())
+        m_heap.m_markingConditionVariable.notifyAll();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SlotVisitor::drain()
</span><span class="lines">@@ -190,18 +190,18 @@
</span><span class="cx">         // This call should be a no-op.
</span><span class="cx">         ASSERT_UNUSED(sharedDrainMode, sharedDrainMode == MasterDrain);
</span><span class="cx">         ASSERT(m_stack.isEmpty());
</span><del>-        ASSERT(m_shared.m_sharedMarkStack.isEmpty());
</del><ins>+        ASSERT(m_heap.m_sharedMarkStack.isEmpty());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     {
</span><del>-        std::lock_guard&lt;Lock&gt; lock(m_shared.m_markingMutex);
-        m_shared.m_numberOfActiveParallelMarkers++;
</del><ins>+        std::lock_guard&lt;Lock&gt; lock(m_heap.m_markingMutex);
+        m_heap.m_numberOfActiveParallelMarkers++;
</ins><span class="cx">     }
</span><span class="cx">     while (true) {
</span><span class="cx">         {
</span><del>-            std::unique_lock&lt;Lock&gt; lock(m_shared.m_markingMutex);
-            m_shared.m_numberOfActiveParallelMarkers--;
</del><ins>+            std::unique_lock&lt;Lock&gt; lock(m_heap.m_markingMutex);
+            m_heap.m_numberOfActiveParallelMarkers--;
</ins><span class="cx"> 
</span><span class="cx">             // How we wait differs depending on drain mode.
</span><span class="cx">             if (sharedDrainMode == MasterDrain) {
</span><span class="lines">@@ -209,36 +209,36 @@
</span><span class="cx">                 // for us to do.
</span><span class="cx">                 while (true) {
</span><span class="cx">                     // Did we reach termination?
</span><del>-                    if (!m_shared.m_numberOfActiveParallelMarkers &amp;&amp; m_shared.m_sharedMarkStack.isEmpty()) {
</del><ins>+                    if (!m_heap.m_numberOfActiveParallelMarkers &amp;&amp; m_heap.m_sharedMarkStack.isEmpty()) {
</ins><span class="cx">                         // Let any sleeping slaves know it's time for them to return;
</span><del>-                        m_shared.m_markingConditionVariable.notifyAll();
</del><ins>+                        m_heap.m_markingConditionVariable.notifyAll();
</ins><span class="cx">                         return;
</span><span class="cx">                     }
</span><span class="cx">                     
</span><span class="cx">                     // Is there work to be done?
</span><del>-                    if (!m_shared.m_sharedMarkStack.isEmpty())
</del><ins>+                    if (!m_heap.m_sharedMarkStack.isEmpty())
</ins><span class="cx">                         break;
</span><span class="cx">                     
</span><span class="cx">                     // Otherwise wait.
</span><del>-                    m_shared.m_markingConditionVariable.wait(lock);
</del><ins>+                    m_heap.m_markingConditionVariable.wait(lock);
</ins><span class="cx">                 }
</span><span class="cx">             } else {
</span><span class="cx">                 ASSERT(sharedDrainMode == SlaveDrain);
</span><span class="cx">                 
</span><span class="cx">                 // Did we detect termination? If so, let the master know.
</span><del>-                if (!m_shared.m_numberOfActiveParallelMarkers &amp;&amp; m_shared.m_sharedMarkStack.isEmpty())
-                    m_shared.m_markingConditionVariable.notifyAll();
</del><ins>+                if (!m_heap.m_numberOfActiveParallelMarkers &amp;&amp; m_heap.m_sharedMarkStack.isEmpty())
+                    m_heap.m_markingConditionVariable.notifyAll();
</ins><span class="cx"> 
</span><del>-                m_shared.m_markingConditionVariable.wait(lock, [this] { return !m_shared.m_sharedMarkStack.isEmpty() || m_shared.m_parallelMarkersShouldExit; });
</del><ins>+                m_heap.m_markingConditionVariable.wait(lock, [this] { return !m_heap.m_sharedMarkStack.isEmpty() || m_heap.m_parallelMarkersShouldExit; });
</ins><span class="cx">                 
</span><span class="cx">                 // Is the current phase done? If so, return from this function.
</span><del>-                if (m_shared.m_parallelMarkersShouldExit)
</del><ins>+                if (m_heap.m_parallelMarkersShouldExit)
</ins><span class="cx">                     return;
</span><span class="cx">             }
</span><span class="cx">            
</span><del>-            size_t idleThreadCount = Options::numberOfGCMarkers() - m_shared.m_numberOfActiveParallelMarkers;
-            m_stack.stealSomeCellsFrom(m_shared.m_sharedMarkStack, idleThreadCount);
-            m_shared.m_numberOfActiveParallelMarkers++;
</del><ins>+            size_t idleThreadCount = Options::numberOfGCMarkers() - m_heap.m_numberOfActiveParallelMarkers;
+            m_stack.stealSomeCellsFrom(m_heap.m_sharedMarkStack, idleThreadCount);
+            m_heap.m_numberOfActiveParallelMarkers++;
</ins><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         drain();
</span><span class="lines">@@ -250,9 +250,9 @@
</span><span class="cx">     StackStats::probe();
</span><span class="cx">     ASSERT(!m_opaqueRoots.isEmpty()); // Should only be called when opaque roots are non-empty.
</span><span class="cx">     {
</span><del>-        std::lock_guard&lt;Lock&gt; lock(m_shared.m_opaqueRootsMutex);
</del><ins>+        std::lock_guard&lt;Lock&gt; lock(m_heap.m_opaqueRootsMutex);
</ins><span class="cx">         for (auto* root : m_opaqueRoots)
</span><del>-            m_shared.m_opaqueRoots.add(root);
</del><ins>+            m_heap.m_opaqueRoots.add(root);
</ins><span class="cx">     }
</span><span class="cx">     m_opaqueRoots.clear();
</span><span class="cx"> }
</span><span class="lines">@@ -327,15 +327,15 @@
</span><span class="cx"> void SlotVisitor::harvestWeakReferences()
</span><span class="cx"> {
</span><span class="cx">     StackStats::probe();
</span><del>-    for (WeakReferenceHarvester* current = m_shared.m_weakReferenceHarvesters.head(); current; current = current-&gt;next())
</del><ins>+    for (WeakReferenceHarvester* current = m_heap.m_weakReferenceHarvesters.head(); current; current = current-&gt;next())
</ins><span class="cx">         current-&gt;visitWeakReferences(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SlotVisitor::finalizeUnconditionalFinalizers()
</span><span class="cx"> {
</span><span class="cx">     StackStats::probe();
</span><del>-    while (m_shared.m_unconditionalFinalizers.hasNext())
-        m_shared.m_unconditionalFinalizers.removeNext()-&gt;finalizeUnconditionally();
</del><ins>+    while (m_heap.m_unconditionalFinalizers.hasNext())
+        m_heap.m_unconditionalFinalizers.removeNext()-&gt;finalizeUnconditionally();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(GC_VALIDATION)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapSlotVisitorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/SlotVisitor.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/SlotVisitor.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/SlotVisitor.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">     friend class HeapRootVisitor; // Allowed to mark a JSValue* or JSCell** directly.
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    SlotVisitor(GCThreadSharedData&amp;);
</del><ins>+    SlotVisitor(Heap&amp;);
</ins><span class="cx">     ~SlotVisitor();
</span><span class="cx"> 
</span><span class="cx">     MarkStackArray&amp; markStack() { return m_stack; }
</span><span class="lines">@@ -82,7 +82,6 @@
</span><span class="cx">     TriState containsOpaqueRootTriState(void*) const;
</span><span class="cx">     int opaqueRootCount();
</span><span class="cx"> 
</span><del>-    GCThreadSharedData&amp; sharedData() const { return m_shared; }
</del><span class="cx">     bool isEmpty() { return m_stack.isEmpty(); }
</span><span class="cx"> 
</span><span class="cx">     void didStartMarking();
</span><span class="lines">@@ -143,7 +142,7 @@
</span><span class="cx">     size_t m_visitCount;
</span><span class="cx">     bool m_isInParallelMode;
</span><span class="cx">     
</span><del>-    GCThreadSharedData&amp; m_shared;
</del><ins>+    Heap&amp; m_heap;
</ins><span class="cx"> 
</span><span class="cx">     bool m_shouldHashCons; // Local per-thread copy of shared flag for performance reasons
</span><span class="cx">     typedef HashMap&lt;StringImpl*, JSValue&gt; UniqueStringMap;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapSlotVisitorInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h (190150 => 190151)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h        2015-09-23 01:35:04 UTC (rev 190150)
+++ trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h        2015-09-23 01:35:49 UTC (rev 190151)
</span><span class="lines">@@ -148,19 +148,19 @@
</span><span class="cx"> 
</span><span class="cx"> inline void SlotVisitor::addWeakReferenceHarvester(WeakReferenceHarvester* weakReferenceHarvester)
</span><span class="cx"> {
</span><del>-    m_shared.m_weakReferenceHarvesters.addThreadSafe(weakReferenceHarvester);
</del><ins>+    m_heap.m_weakReferenceHarvesters.addThreadSafe(weakReferenceHarvester);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void SlotVisitor::addUnconditionalFinalizer(UnconditionalFinalizer* unconditionalFinalizer)
</span><span class="cx"> {
</span><del>-    m_shared.m_unconditionalFinalizers.addThreadSafe(unconditionalFinalizer);
</del><ins>+    m_heap.m_unconditionalFinalizers.addThreadSafe(unconditionalFinalizer);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void SlotVisitor::addOpaqueRoot(void* root)
</span><span class="cx"> {
</span><span class="cx">     if (Options::numberOfGCMarkers() == 1) {
</span><span class="cx">         // Put directly into the shared HashSet.
</span><del>-        m_shared.m_opaqueRoots.add(root);
</del><ins>+        m_heap.m_opaqueRoots.add(root);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     // Put into the local set, but merge with the shared one every once in
</span><span class="lines">@@ -173,15 +173,15 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_isInParallelMode);
</span><span class="cx">     ASSERT(m_opaqueRoots.isEmpty());
</span><del>-    return m_shared.m_opaqueRoots.contains(root);
</del><ins>+    return m_heap.m_opaqueRoots.contains(root);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline TriState SlotVisitor::containsOpaqueRootTriState(void* root) const
</span><span class="cx"> {
</span><span class="cx">     if (m_opaqueRoots.contains(root))
</span><span class="cx">         return TrueTriState;
</span><del>-    std::lock_guard&lt;Lock&gt; lock(m_shared.m_opaqueRootsMutex);
-    if (m_shared.m_opaqueRoots.contains(root))
</del><ins>+    std::lock_guard&lt;Lock&gt; lock(m_heap.m_opaqueRootsMutex);
+    if (m_heap.m_opaqueRoots.contains(root))
</ins><span class="cx">         return TrueTriState;
</span><span class="cx">     return MixedTriState;
</span><span class="cx"> }
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_isInParallelMode);
</span><span class="cx">     ASSERT(m_opaqueRoots.isEmpty());
</span><del>-    return m_shared.m_opaqueRoots.size();
</del><ins>+    return m_heap.m_opaqueRoots.size();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void SlotVisitor::mergeOpaqueRootsIfNecessary()
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx">         // is correct.
</span><span class="cx">         // https://bugs.webkit.org/show_bug.cgi?id=144749
</span><span class="cx">         bytes = block-&gt;size();
</span><del>-        m_shared.m_copiedSpace-&gt;pin(block);
</del><ins>+        m_heap.m_storageSpace.pin(block);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT(heap()-&gt;m_storageSpace.contains(block));
</span><span class="lines">@@ -252,17 +252,17 @@
</span><span class="cx"> 
</span><span class="cx"> inline Heap* SlotVisitor::heap() const
</span><span class="cx"> {
</span><del>-    return &amp;sharedData().m_vm-&gt;heap;
</del><ins>+    return &amp;m_heap;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline VM&amp; SlotVisitor::vm()
</span><span class="cx"> {
</span><del>-    return *sharedData().m_vm;
</del><ins>+    return *m_heap.m_vm;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline const VM&amp; SlotVisitor::vm() const
</span><span class="cx"> {
</span><del>-    return *sharedData().m_vm;
</del><ins>+    return *m_heap.m_vm;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre>
</div>
</div>

</body>
</html>