<!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>[213657] trunk/Source</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/213657">213657</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2017-03-09 13:05:41 -0800 (Thu, 09 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use const AbstractLocker& (instead of const LockHolder&) in more places.
https://bugs.webkit.org/show_bug.cgi?id=169424
Reviewed by Filip Pizlo.
Source/JavaScriptCore:
* heap/CodeBlockSet.cpp:
(JSC::CodeBlockSet::promoteYoungCodeBlocks):
* heap/CodeBlockSet.h:
* heap/CodeBlockSetInlines.h:
(JSC::CodeBlockSet::mark):
* heap/ConservativeRoots.cpp:
(JSC::CompositeMarkHook::CompositeMarkHook):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::tryCopyOtherThreadStacks):
* heap/MachineStackMarker.h:
* profiler/ProfilerDatabase.cpp:
(JSC::Profiler::Database::ensureBytecodesFor):
* profiler/ProfilerDatabase.h:
* runtime/SamplingProfiler.cpp:
(JSC::FrameWalker::FrameWalker):
(JSC::CFrameWalker::CFrameWalker):
(JSC::SamplingProfiler::createThreadIfNecessary):
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::start):
(JSC::SamplingProfiler::pause):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
(JSC::SamplingProfiler::clearData):
(JSC::SamplingProfiler::releaseStackTraces):
* runtime/SamplingProfiler.h:
(JSC::SamplingProfiler::setStopWatch):
* wasm/WasmMemory.cpp:
(JSC::Wasm::availableFastMemories):
(JSC::Wasm::activeFastMemories):
(JSC::Wasm::viewActiveFastMemories):
* wasm/WasmMemory.h:
Source/WTF:
* wtf/RunLoop.h:
* wtf/generic/RunLoopGeneric.cpp:
(WTF::RunLoop::wakeUp):
(WTF::RunLoop::schedule):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCodeBlockSetcpp">trunk/Source/JavaScriptCore/heap/CodeBlockSet.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCodeBlockSeth">trunk/Source/JavaScriptCore/heap/CodeBlockSet.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCodeBlockSetInlinesh">trunk/Source/JavaScriptCore/heap/CodeBlockSetInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapConservativeRootscpp">trunk/Source/JavaScriptCore/heap/ConservativeRoots.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapMachineStackMarkercpp">trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapMachineStackMarkerh">trunk/Source/JavaScriptCore/heap/MachineStackMarker.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreprofilerProfilerDatabasecpp">trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreprofilerProfilerDatabaseh">trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeSamplingProfilercpp">trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeSamplingProfilerh">trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemorycpp">trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemoryh">trunk/Source/JavaScriptCore/wasm/WasmMemory.h</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfRunLooph">trunk/Source/WTF/wtf/RunLoop.h</a></li>
<li><a href="#trunkSourceWTFwtfgenericRunLoopGenericcpp">trunk/Source/WTF/wtf/generic/RunLoopGeneric.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2017-03-09 Mark Lam <mark.lam@apple.com>
+
+ Use const AbstractLocker& (instead of const LockHolder&) in more places.
+ https://bugs.webkit.org/show_bug.cgi?id=169424
+
+ Reviewed by Filip Pizlo.
+
+ * heap/CodeBlockSet.cpp:
+ (JSC::CodeBlockSet::promoteYoungCodeBlocks):
+ * heap/CodeBlockSet.h:
+ * heap/CodeBlockSetInlines.h:
+ (JSC::CodeBlockSet::mark):
+ * heap/ConservativeRoots.cpp:
+ (JSC::CompositeMarkHook::CompositeMarkHook):
+ * heap/MachineStackMarker.cpp:
+ (JSC::MachineThreads::tryCopyOtherThreadStacks):
+ * heap/MachineStackMarker.h:
+ * profiler/ProfilerDatabase.cpp:
+ (JSC::Profiler::Database::ensureBytecodesFor):
+ * profiler/ProfilerDatabase.h:
+ * runtime/SamplingProfiler.cpp:
+ (JSC::FrameWalker::FrameWalker):
+ (JSC::CFrameWalker::CFrameWalker):
+ (JSC::SamplingProfiler::createThreadIfNecessary):
+ (JSC::SamplingProfiler::takeSample):
+ (JSC::SamplingProfiler::start):
+ (JSC::SamplingProfiler::pause):
+ (JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
+ (JSC::SamplingProfiler::clearData):
+ (JSC::SamplingProfiler::releaseStackTraces):
+ * runtime/SamplingProfiler.h:
+ (JSC::SamplingProfiler::setStopWatch):
+ * wasm/WasmMemory.cpp:
+ (JSC::Wasm::availableFastMemories):
+ (JSC::Wasm::activeFastMemories):
+ (JSC::Wasm::viewActiveFastMemories):
+ * wasm/WasmMemory.h:
+
</ins><span class="cx"> 2017-03-09 Saam Barati <sbarati@apple.com>
</span><span class="cx">
</span><span class="cx"> WebAssembly: Make the Unity AngryBots demo run
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCodeBlockSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CodeBlockSet.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CodeBlockSet.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/CodeBlockSet.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> ASSERT_UNUSED(isNewEntry, isNewEntry);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CodeBlockSet::promoteYoungCodeBlocks(const LockHolder&)
</del><ins>+void CodeBlockSet::promoteYoungCodeBlocks(const AbstractLocker&)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_lock.isLocked());
</span><span class="cx"> m_oldCodeBlocks.add(m_newCodeBlocks.begin(), m_newCodeBlocks.end());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCodeBlockSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CodeBlockSet.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CodeBlockSet.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/CodeBlockSet.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -62,9 +62,9 @@
</span><span class="cx"> // Mark a pointer that may be a CodeBlock that belongs to the set of DFG
</span><span class="cx"> // blocks. This is defined in CodeBlock.h.
</span><span class="cx"> private:
</span><del>- void mark(const LockHolder&, CodeBlock* candidateCodeBlock);
</del><ins>+ void mark(const AbstractLocker&, CodeBlock* candidateCodeBlock);
</ins><span class="cx"> public:
</span><del>- void mark(const LockHolder&, void* candidateCodeBlock);
</del><ins>+ void mark(const AbstractLocker&, void* candidateCodeBlock);
</ins><span class="cx">
</span><span class="cx"> // Delete all code blocks that are only referenced by this set (i.e. owned
</span><span class="cx"> // by this set), and that have not been marked.
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> void dump(PrintStream&) const;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- void promoteYoungCodeBlocks(const LockHolder&);
</del><ins>+ void promoteYoungCodeBlocks(const AbstractLocker&);
</ins><span class="cx">
</span><span class="cx"> HashSet<CodeBlock*> m_oldCodeBlocks;
</span><span class="cx"> HashSet<CodeBlock*> m_newCodeBlocks;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCodeBlockSetInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CodeBlockSetInlines.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CodeBlockSetInlines.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/CodeBlockSetInlines.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">
</span><span class="cx"> namespace JSC {
</span><span class="cx">
</span><del>-inline void CodeBlockSet::mark(const LockHolder& locker, void* candidateCodeBlock)
</del><ins>+inline void CodeBlockSet::mark(const AbstractLocker& locker, void* candidateCodeBlock)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_lock.isLocked());
</span><span class="cx"> // We have to check for 0 and -1 because those are used by the HashMap as markers.
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> mark(locker, codeBlock);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline void CodeBlockSet::mark(const LockHolder&, CodeBlock* codeBlock)
</del><ins>+inline void CodeBlockSet::mark(const AbstractLocker&, CodeBlock* codeBlock)
</ins><span class="cx"> {
</span><span class="cx"> if (!codeBlock)
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapConservativeRootscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/ConservativeRoots.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/ConservativeRoots.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/ConservativeRoots.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx">
</span><span class="cx"> class CompositeMarkHook {
</span><span class="cx"> public:
</span><del>- CompositeMarkHook(JITStubRoutineSet& stubRoutines, CodeBlockSet& codeBlocks, const LockHolder& locker)
</del><ins>+ CompositeMarkHook(JITStubRoutineSet& stubRoutines, CodeBlockSet& codeBlocks, const AbstractLocker& locker)
</ins><span class="cx"> : m_stubRoutines(stubRoutines)
</span><span class="cx"> , m_codeBlocks(codeBlocks)
</span><span class="cx"> , m_codeBlocksLocker(locker)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> private:
</span><span class="cx"> JITStubRoutineSet& m_stubRoutines;
</span><span class="cx"> CodeBlockSet& m_codeBlocks;
</span><del>- const LockHolder& m_codeBlocksLocker;
</del><ins>+ const AbstractLocker& m_codeBlocksLocker;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> void ConservativeRoots::add(
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMachineStackMarkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -928,7 +928,7 @@
</span><span class="cx"> thread->freeRegisters(registers);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool MachineThreads::tryCopyOtherThreadStacks(LockHolder&, void* buffer, size_t capacity, size_t* size)
</del><ins>+bool MachineThreads::tryCopyOtherThreadStacks(const AbstractLocker&, void* buffer, size_t capacity, size_t* size)
</ins><span class="cx"> {
</span><span class="cx"> // Prevent two VMs from suspending each other's threads at the same time,
</span><span class="cx"> // which can cause deadlock: <rdar://problem/20300842>.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMachineStackMarkerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MachineStackMarker.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MachineStackMarker.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/MachineStackMarker.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx"> void gatherFromCurrentThread(ConservativeRoots&, JITStubRoutineSet&, CodeBlockSet&, CurrentThreadState&);
</span><span class="cx">
</span><span class="cx"> void tryCopyOtherThreadStack(Thread*, void*, size_t capacity, size_t*);
</span><del>- bool tryCopyOtherThreadStacks(LockHolder&, void*, size_t capacity, size_t*);
</del><ins>+ bool tryCopyOtherThreadStacks(const AbstractLocker&, void*, size_t capacity, size_t*);
</ins><span class="cx">
</span><span class="cx"> static void THREAD_SPECIFIC_CALL removeThread(void*);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreprofilerProfilerDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> return ensureBytecodesFor(locker, codeBlock);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Bytecodes* Database::ensureBytecodesFor(const LockHolder&, CodeBlock* codeBlock)
</del><ins>+Bytecodes* Database::ensureBytecodesFor(const AbstractLocker&, CodeBlock* codeBlock)
</ins><span class="cx"> {
</span><span class="cx"> codeBlock = codeBlock->baselineAlternative();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreprofilerProfilerDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> JS_EXPORT_PRIVATE void logEvent(CodeBlock* codeBlock, const char* summary, const CString& detail);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- Bytecodes* ensureBytecodesFor(const LockHolder&, CodeBlock*);
</del><ins>+ Bytecodes* ensureBytecodesFor(const AbstractLocker&, CodeBlock*);
</ins><span class="cx">
</span><span class="cx"> void addDatabaseToAtExit();
</span><span class="cx"> void removeDatabaseFromAtExit();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeSamplingProfilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx">
</span><span class="cx"> class FrameWalker {
</span><span class="cx"> public:
</span><del>- FrameWalker(VM& vm, ExecState* callFrame, const LockHolder& codeBlockSetLocker, const LockHolder& machineThreadsLocker)
</del><ins>+ FrameWalker(VM& vm, ExecState* callFrame, const AbstractLocker& codeBlockSetLocker, const AbstractLocker& machineThreadsLocker)
</ins><span class="cx"> : m_vm(vm)
</span><span class="cx"> , m_callFrame(callFrame)
</span><span class="cx"> , m_vmEntryFrame(vm.topVMEntryFrame)
</span><span class="lines">@@ -190,8 +190,8 @@
</span><span class="cx"> VM& m_vm;
</span><span class="cx"> ExecState* m_callFrame;
</span><span class="cx"> VMEntryFrame* m_vmEntryFrame;
</span><del>- const LockHolder& m_codeBlockSetLocker;
- const LockHolder& m_machineThreadsLocker;
</del><ins>+ const AbstractLocker& m_codeBlockSetLocker;
+ const AbstractLocker& m_machineThreadsLocker;
</ins><span class="cx"> bool m_bailingOut { false };
</span><span class="cx"> size_t m_depth { 0 };
</span><span class="cx"> };
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx"> public:
</span><span class="cx"> typedef FrameWalker Base;
</span><span class="cx">
</span><del>- CFrameWalker(VM& vm, void* machineFrame, ExecState* callFrame, const LockHolder& codeBlockSetLocker, const LockHolder& machineThreadsLocker)
</del><ins>+ CFrameWalker(VM& vm, void* machineFrame, ExecState* callFrame, const AbstractLocker& codeBlockSetLocker, const AbstractLocker& machineThreadsLocker)
</ins><span class="cx"> : Base(vm, callFrame, codeBlockSetLocker, machineThreadsLocker)
</span><span class="cx"> , m_machineFrame(machineFrame)
</span><span class="cx"> {
</span><span class="lines">@@ -296,7 +296,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SamplingProfiler::createThreadIfNecessary(const LockHolder&)
</del><ins>+void SamplingProfiler::createThreadIfNecessary(const AbstractLocker&)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_lock.isLocked());
</span><span class="cx">
</span><span class="lines">@@ -334,7 +334,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SamplingProfiler::takeSample(const LockHolder&, std::chrono::microseconds& stackTraceProcessingTime)
</del><ins>+void SamplingProfiler::takeSample(const AbstractLocker&, std::chrono::microseconds& stackTraceProcessingTime)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_lock.isLocked());
</span><span class="cx"> if (m_vm.entryScope) {
</span><span class="lines">@@ -659,7 +659,7 @@
</span><span class="cx"> start(locker);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SamplingProfiler::start(const LockHolder& locker)
</del><ins>+void SamplingProfiler::start(const AbstractLocker& locker)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_lock.isLocked());
</span><span class="cx"> m_isPaused = false;
</span><span class="lines">@@ -666,7 +666,7 @@
</span><span class="cx"> createThreadIfNecessary(locker);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SamplingProfiler::pause(const LockHolder&)
</del><ins>+void SamplingProfiler::pause(const AbstractLocker&)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_lock.isLocked());
</span><span class="cx"> m_isPaused = true;
</span><span class="lines">@@ -673,7 +673,7 @@
</span><span class="cx"> reportStats();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread(const LockHolder&)
</del><ins>+void SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread(const AbstractLocker&)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_lock.isLocked());
</span><span class="cx"> m_jscExecutionThread = m_vm.heap.machineThreads().machineThreadForCurrentThread();
</span><span class="lines">@@ -700,7 +700,7 @@
</span><span class="cx"> createThreadIfNecessary(locker);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SamplingProfiler::clearData(const LockHolder&)
</del><ins>+void SamplingProfiler::clearData(const AbstractLocker&)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_lock.isLocked());
</span><span class="cx"> m_stackTraces.clear();
</span><span class="lines">@@ -858,7 +858,7 @@
</span><span class="cx"> return url;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Vector<SamplingProfiler::StackTrace> SamplingProfiler::releaseStackTraces(const LockHolder& locker)
</del><ins>+Vector<SamplingProfiler::StackTrace> SamplingProfiler::releaseStackTraces(const AbstractLocker& locker)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_lock.isLocked());
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeSamplingProfilerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -166,15 +166,15 @@
</span><span class="cx"> Lock& getLock() { return m_lock; }
</span><span class="cx"> void setTimingInterval(std::chrono::microseconds interval) { m_timingInterval = interval; }
</span><span class="cx"> JS_EXPORT_PRIVATE void start();
</span><del>- void start(const LockHolder&);
- Vector<StackTrace> releaseStackTraces(const LockHolder&);
</del><ins>+ void start(const AbstractLocker&);
+ Vector<StackTrace> releaseStackTraces(const AbstractLocker&);
</ins><span class="cx"> JS_EXPORT_PRIVATE String stackTracesAsJSON();
</span><span class="cx"> JS_EXPORT_PRIVATE void noticeCurrentThreadAsJSCExecutionThread();
</span><del>- void noticeCurrentThreadAsJSCExecutionThread(const LockHolder&);
</del><ins>+ void noticeCurrentThreadAsJSCExecutionThread(const AbstractLocker&);
</ins><span class="cx"> void processUnverifiedStackTraces(); // You should call this only after acquiring the lock.
</span><del>- void setStopWatch(const LockHolder&, Ref<Stopwatch>&& stopwatch) { m_stopwatch = WTFMove(stopwatch); }
- void pause(const LockHolder&);
- void clearData(const LockHolder&);
</del><ins>+ void setStopWatch(const AbstractLocker&, Ref<Stopwatch>&& stopwatch) { m_stopwatch = WTFMove(stopwatch); }
+ void pause(const AbstractLocker&);
+ void clearData(const AbstractLocker&);
</ins><span class="cx">
</span><span class="cx"> // Used for debugging in the JSC shell/DRT.
</span><span class="cx"> void registerForReportAtExit();
</span><span class="lines">@@ -185,9 +185,9 @@
</span><span class="cx"> JS_EXPORT_PRIVATE void reportTopBytecodes(PrintStream&);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- void createThreadIfNecessary(const LockHolder&);
</del><ins>+ void createThreadIfNecessary(const AbstractLocker&);
</ins><span class="cx"> void timerLoop();
</span><del>- void takeSample(const LockHolder&, std::chrono::microseconds& stackTraceProcessingTime);
</del><ins>+ void takeSample(const AbstractLocker&, std::chrono::microseconds& stackTraceProcessingTime);
</ins><span class="cx">
</span><span class="cx"> VM& m_vm;
</span><span class="cx"> RefPtr<Stopwatch> m_stopwatch;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -68,19 +68,19 @@
</span><span class="cx"> static const unsigned maxFastMemories = 4;
</span><span class="cx"> static unsigned allocatedFastMemories { 0 };
</span><span class="cx"> StaticLock memoryLock;
</span><del>-inline Deque<void*, maxFastMemories>& availableFastMemories(const LockHolder&)
</del><ins>+inline Deque<void*, maxFastMemories>& availableFastMemories(const AbstractLocker&)
</ins><span class="cx"> {
</span><span class="cx"> static NeverDestroyed<Deque<void*, maxFastMemories>> availableFastMemories;
</span><span class="cx"> return availableFastMemories;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline HashSet<void*>& activeFastMemories(const LockHolder&)
</del><ins>+inline HashSet<void*>& activeFastMemories(const AbstractLocker&)
</ins><span class="cx"> {
</span><span class="cx"> static NeverDestroyed<HashSet<void*>> activeFastMemories;
</span><span class="cx"> return activeFastMemories;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const HashSet<void*>& viewActiveFastMemories(const LockHolder& locker)
</del><ins>+const HashSet<void*>& viewActiveFastMemories(const AbstractLocker& locker)
</ins><span class="cx"> {
</span><span class="cx"> return activeFastMemories(locker);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemory.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemory.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemory.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">
</span><span class="cx"> const size_t fastMemoryMappedBytes = (static_cast<size_t>(std::numeric_limits<uint32_t>::max()) + 1) * 2; // pointer max + offset max. This is all we need since a load straddling readable memory will trap.
</span><span class="cx"> extern StaticLock memoryLock;
</span><del>-const HashSet<void*>& viewActiveFastMemories(const LockHolder&);
</del><ins>+const HashSet<void*>& viewActiveFastMemories(const AbstractLocker&);
</ins><span class="cx">
</span><span class="cx"> } } // namespace JSC::Wasm
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/WTF/ChangeLog        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -1,5 +1,17 @@
</span><span class="cx"> 2017-03-09 Mark Lam <mark.lam@apple.com>
</span><span class="cx">
</span><ins>+ Use const AbstractLocker& (instead of const LockHolder&) in more places.
+ https://bugs.webkit.org/show_bug.cgi?id=169424
+
+ Reviewed by Filip Pizlo.
+
+ * wtf/RunLoop.h:
+ * wtf/generic/RunLoopGeneric.cpp:
+ (WTF::RunLoop::wakeUp):
+ (WTF::RunLoop::schedule):
+
+2017-03-09 Mark Lam <mark.lam@apple.com>
+
</ins><span class="cx"> Make the VM Traps mechanism non-polling for the DFG and FTL.
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=168920
</span><span class="cx"> <rdar://problem/30738588>
</span></span></pre></div>
<a id="trunkSourceWTFwtfRunLooph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RunLoop.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RunLoop.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/WTF/wtf/RunLoop.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -167,8 +167,8 @@
</span><span class="cx"> GRefPtr<GSource> m_source;
</span><span class="cx"> #elif USE(GENERIC_EVENT_LOOP)
</span><span class="cx"> void schedule(RefPtr<TimerBase::ScheduledTask>&&);
</span><del>- void schedule(const LockHolder&, RefPtr<TimerBase::ScheduledTask>&&);
- void wakeUp(const LockHolder&);
</del><ins>+ void schedule(const AbstractLocker&, RefPtr<TimerBase::ScheduledTask>&&);
+ void wakeUp(const AbstractLocker&);
</ins><span class="cx"> void scheduleAndWakeUp(RefPtr<TimerBase::ScheduledTask>);
</span><span class="cx">
</span><span class="cx"> enum class RunMode {
</span></span></pre></div>
<a id="trunkSourceWTFwtfgenericRunLoopGenericcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/generic/RunLoopGeneric.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/generic/RunLoopGeneric.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/WTF/wtf/generic/RunLoopGeneric.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RunLoop::wakeUp(const LockHolder&)
</del><ins>+void RunLoop::wakeUp(const AbstractLocker&)
</ins><span class="cx"> {
</span><span class="cx"> m_pendingTasks = true;
</span><span class="cx"> m_readyToRun.notifyOne();
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx"> wakeUp(locker);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RunLoop::schedule(const LockHolder&, RefPtr<TimerBase::ScheduledTask>&& task)
</del><ins>+void RunLoop::schedule(const AbstractLocker&, RefPtr<TimerBase::ScheduledTask>&& task)
</ins><span class="cx"> {
</span><span class="cx"> m_schedules.append(WTFMove(task));
</span><span class="cx"> std::push_heap(m_schedules.begin(), m_schedules.end(), TimerBase::ScheduledTask::EarliestSchedule());
</span></span></pre>
</div>
</div>
</body>
</html>