<!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>[245050] 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/245050">245050</a></dd>
<dt>Author</dt> <dd>ysuzuki@apple.com</dd>
<dt>Date</dt> <dd>2019-05-07 21:35:36 -0700 (Tue, 07 May 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>[JSC] LLIntPrototypeLoadAdaptiveStructureWatchpoint does not require Bag<>
https://bugs.webkit.org/show_bug.cgi?id=197645

Reviewed by Saam Barati.

Source/JavaScriptCore:

We are using HashMap<std::tuple<Structure*, const Instruction*>, Bag<LLIntPrototypeLoadAdaptiveStructureWatchpoint>> for LLIntPrototypeLoadAdaptiveStructureWatchpoint,
but this has several memory inefficiency.

1. Structure* and Instruction* are too large. We can just use StructureID and bytecodeOffset (unsigned).
2. While we are using Bag<>, we do not add a new LLIntPrototypeLoadAdaptiveStructureWatchpoint after constructing this Bag first. So we can
   use Vector<LLIntPrototypeLoadAdaptiveStructureWatchpoint> instead. We ensure that new entry won't be added to this Vector by making Watchpoint
   non-movable.
3. Instead of having OpGetById::Metadata&, we just hold `unsigned` bytecodeOffset, and get Metadata& from the owner CodeBlock when needed.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finalizeLLIntInlineCaches):
* bytecode/CodeBlock.h:
* bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp:
(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::LLIntPrototypeLoadAdaptiveStructureWatchpoint):
(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::fireInternal):
* bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h:
* bytecode/Watchpoint.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setupGetByIdPrototypeCache):

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Nonmovable.h: Copied from Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h.
* wtf/Vector.h:
(WTF::minCapacity>::uncheckedConstructAndAppend):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockh">trunk/Source/JavaScriptCore/bytecode/CodeBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeLLIntPrototypeLoadAdaptiveStructureWatchpointcpp">trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeLLIntPrototypeLoadAdaptiveStructureWatchpointh">trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeWatchpointh">trunk/Source/JavaScriptCore/bytecode/Watchpoint.h</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathscpp">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFWTFxcodeprojprojectpbxproj">trunk/Source/WTF/WTF.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWTFwtfCMakeListstxt">trunk/Source/WTF/wtf/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWTFwtfVectorh">trunk/Source/WTF/wtf/Vector.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWTFwtfNonmovableh">trunk/Source/WTF/wtf/Nonmovable.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/JavaScriptCore/ChangeLog       2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -1,5 +1,32 @@
</span><span class="cx"> 2019-05-07  Yusuke Suzuki  <ysuzuki@apple.com>
</span><span class="cx"> 
</span><ins>+        [JSC] LLIntPrototypeLoadAdaptiveStructureWatchpoint does not require Bag<>
+        https://bugs.webkit.org/show_bug.cgi?id=197645
+
+        Reviewed by Saam Barati.
+
+        We are using HashMap<std::tuple<Structure*, const Instruction*>, Bag<LLIntPrototypeLoadAdaptiveStructureWatchpoint>> for LLIntPrototypeLoadAdaptiveStructureWatchpoint,
+        but this has several memory inefficiency.
+
+        1. Structure* and Instruction* are too large. We can just use StructureID and bytecodeOffset (unsigned).
+        2. While we are using Bag<>, we do not add a new LLIntPrototypeLoadAdaptiveStructureWatchpoint after constructing this Bag first. So we can
+           use Vector<LLIntPrototypeLoadAdaptiveStructureWatchpoint> instead. We ensure that new entry won't be added to this Vector by making Watchpoint
+           non-movable.
+        3. Instead of having OpGetById::Metadata&, we just hold `unsigned` bytecodeOffset, and get Metadata& from the owner CodeBlock when needed.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::finalizeLLIntInlineCaches):
+        * bytecode/CodeBlock.h:
+        * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp:
+        (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::LLIntPrototypeLoadAdaptiveStructureWatchpoint):
+        (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::fireInternal):
+        * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h:
+        * bytecode/Watchpoint.h:
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::setupGetByIdPrototypeCache):
+
+2019-05-07  Yusuke Suzuki  <ysuzuki@apple.com>
+
</ins><span class="cx">         JSC: A bug in BytecodeGenerator::emitEqualityOpImpl
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=197479
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp       2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp  2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -1302,7 +1302,7 @@
</span><span class="cx">     // then cleared the cache without GCing in between.
</span><span class="cx">     m_llintGetByIdWatchpointMap.removeIf([&] (const StructureWatchpointMap::KeyValuePairType& pair) -> bool {
</span><span class="cx">         auto clear = [&] () {
</span><del>-            const Instruction* instruction = std::get<1>(pair.key);
</del><ins>+            auto& instruction = instructions().at(std::get<1>(pair.key));
</ins><span class="cx">             OpcodeID opcode = instruction->opcodeID();
</span><span class="cx">             if (opcode == op_get_by_id) {
</span><span class="cx">                 if (Options::verboseOSR())
</span><span class="lines">@@ -1312,11 +1312,11 @@
</span><span class="cx">             return true;
</span><span class="cx">         };
</span><span class="cx"> 
</span><del>-        if (!vm.heap.isMarked(std::get<0>(pair.key)))
</del><ins>+        if (!vm.heap.isMarked(vm.heap.structureIDTable().get(std::get<0>(pair.key))))
</ins><span class="cx">             return clear();
</span><span class="cx"> 
</span><del>-        for (const LLIntPrototypeLoadAdaptiveStructureWatchpoint* watchpoint : pair.value) {
-            if (!watchpoint->key().isStillLive(vm))
</del><ins>+        for (const LLIntPrototypeLoadAdaptiveStructureWatchpoint& watchpoint : pair.value) {
+            if (!watchpoint.key().isStillLive(vm))
</ins><span class="cx">                 return clear();
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.h (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.h 2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.h    2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -637,7 +637,7 @@
</span><span class="cx">         return m_llintExecuteCounter;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    typedef HashMap<std::tuple<Structure*, const Instruction*>, Bag<LLIntPrototypeLoadAdaptiveStructureWatchpoint>> StructureWatchpointMap;
</del><ins>+    typedef HashMap<std::tuple<StructureID, unsigned>, Vector<LLIntPrototypeLoadAdaptiveStructureWatchpoint>> StructureWatchpointMap;
</ins><span class="cx">     StructureWatchpointMap& llintGetByIdWatchpointMap() { return m_llintGetByIdWatchpointMap; }
</span><span class="cx"> 
</span><span class="cx">     // Functions for controlling when tiered compilation kicks in. This
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeLLIntPrototypeLoadAdaptiveStructureWatchpointcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp   2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp      2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -32,10 +32,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-LLIntPrototypeLoadAdaptiveStructureWatchpoint::LLIntPrototypeLoadAdaptiveStructureWatchpoint(CodeBlock* owner, const ObjectPropertyCondition& key, OpGetById::Metadata& getByIdMetadata)
</del><ins>+LLIntPrototypeLoadAdaptiveStructureWatchpoint::LLIntPrototypeLoadAdaptiveStructureWatchpoint(CodeBlock* owner, const ObjectPropertyCondition& key, unsigned bytecodeOffset)
</ins><span class="cx">     : m_owner(owner)
</span><span class="cx">     , m_key(key)
</span><del>-    , m_getByIdMetadata(getByIdMetadata)
</del><ins>+    , m_bytecodeOffset(bytecodeOffset)
</ins><span class="cx"> {
</span><span class="cx">     RELEASE_ASSERT(key.watchingRequiresStructureTransitionWatchpoint());
</span><span class="cx">     RELEASE_ASSERT(!key.watchingRequiresReplacementWatchpoint());
</span><span class="lines">@@ -58,7 +58,8 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    clearLLIntGetByIdCache(m_getByIdMetadata);
</del><ins>+    auto& instruction = m_owner->instructions().at(m_bytecodeOffset);
+    clearLLIntGetByIdCache(instruction->as<OpGetById>().metadata(m_owner));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache(OpGetById::Metadata& metadata)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeLLIntPrototypeLoadAdaptiveStructureWatchpointh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h     2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h        2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> class LLIntPrototypeLoadAdaptiveStructureWatchpoint final : public Watchpoint {
</span><span class="cx"> public:
</span><del>-    LLIntPrototypeLoadAdaptiveStructureWatchpoint(CodeBlock*, const ObjectPropertyCondition&, OpGetById::Metadata&);
</del><ins>+    LLIntPrototypeLoadAdaptiveStructureWatchpoint(CodeBlock*, const ObjectPropertyCondition&, unsigned bytecodeOffset);
</ins><span class="cx"> 
</span><span class="cx">     void install(VM&);
</span><span class="cx"> 
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> private:
</span><span class="cx">     CodeBlock* m_owner;
</span><span class="cx">     ObjectPropertyCondition m_key;
</span><del>-    OpGetById::Metadata& m_getByIdMetadata;
</del><ins>+    unsigned m_bytecodeOffset;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeWatchpointh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/Watchpoint.h (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/Watchpoint.h        2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/JavaScriptCore/bytecode/Watchpoint.h   2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include <wtf/Atomics.h>
</span><span class="cx"> #include <wtf/FastMalloc.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><ins>+#include <wtf/Nonmovable.h>
</ins><span class="cx"> #include <wtf/PrintStream.h>
</span><span class="cx"> #include <wtf/ScopedLambda.h>
</span><span class="cx"> #include <wtf/SentinelLinkedList.h>
</span><span class="lines">@@ -91,6 +92,7 @@
</span><span class="cx"> 
</span><span class="cx"> class Watchpoint : public BasicRawSentinelNode<Watchpoint> {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(Watchpoint);
</span><ins>+    WTF_MAKE_NONMOVABLE(Watchpoint);
</ins><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="cx">     Watchpoint() = default;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp     2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -719,19 +719,22 @@
</span><span class="cx">     if (!conditions.isValid())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    unsigned bytecodeOffset = codeBlock->bytecodeOffset(pc);
</ins><span class="cx">     PropertyOffset offset = invalidOffset;
</span><span class="cx">     CodeBlock::StructureWatchpointMap& watchpointMap = codeBlock->llintGetByIdWatchpointMap();
</span><del>-    Bag<LLIntPrototypeLoadAdaptiveStructureWatchpoint> watchpoints;
</del><ins>+    Vector<LLIntPrototypeLoadAdaptiveStructureWatchpoint> watchpoints;
+    watchpoints.reserveInitialCapacity(conditions.size());
</ins><span class="cx">     for (ObjectPropertyCondition condition : conditions) {
</span><span class="cx">         if (!condition.isWatchable())
</span><span class="cx">             return;
</span><span class="cx">         if (condition.condition().kind() == PropertyCondition::Presence)
</span><span class="cx">             offset = condition.condition().offset();
</span><del>-        watchpoints.add(codeBlock, condition, metadata)->install(vm);
</del><ins>+        watchpoints.uncheckedConstructAndAppend(codeBlock, condition, bytecodeOffset);
+        watchpoints.last().install(vm);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT((offset == invalidOffset) == slot.isUnset());
</span><del>-    auto result = watchpointMap.add(std::make_tuple(structure, pc), WTFMove(watchpoints));
</del><ins>+    auto result = watchpointMap.add(std::make_tuple(structure->id(), bytecodeOffset), WTFMove(watchpoints));
</ins><span class="cx">     ASSERT_UNUSED(result, result.isNewEntry);
</span><span class="cx"> 
</span><span class="cx">     ConcurrentJSLocker locker(codeBlock->m_lock);
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/WTF/ChangeLog  2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2019-05-07  Yusuke Suzuki  <ysuzuki@apple.com>
+
+        [JSC] LLIntPrototypeLoadAdaptiveStructureWatchpoint does not require Bag<>
+        https://bugs.webkit.org/show_bug.cgi?id=197645
+
+        Reviewed by Saam Barati.
+
+        * WTF.xcodeproj/project.pbxproj:
+        * wtf/CMakeLists.txt:
+        * wtf/Nonmovable.h: Copied from Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h.
+        * wtf/Vector.h:
+        (WTF::minCapacity>::uncheckedConstructAndAppend):
+
</ins><span class="cx"> 2019-05-07  Eric Carlson  <eric.carlson@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Define media buffering policy
</span></span></pre></div>
<a id="trunkSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj   2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj      2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -669,6 +669,7 @@
</span><span class="cx">          E3A32BC31FC830E2007D7E76 /* JSValueMalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSValueMalloc.h; sourceTree = "<group>"; };
</span><span class="cx">          E3CF76902115D6BA0091DE48 /* CompactPointerTuple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompactPointerTuple.h; sourceTree = "<group>"; };
</span><span class="cx">          E3E158251EADA53C004A079D /* SystemFree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemFree.h; sourceTree = "<group>"; };
</span><ins>+               E3E64F0B22813428001E55B4 /* Nonmovable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Nonmovable.h; sourceTree = "<group>"; };
</ins><span class="cx">           E431CC4A21187ADB000C8A07 /* DispatchSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DispatchSPI.h; sourceTree = "<group>"; };
</span><span class="cx">          E4A0AD371A96245500536DF6 /* WorkQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueue.cpp; sourceTree = "<group>"; };
</span><span class="cx">          E4A0AD381A96245500536DF6 /* WorkQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkQueue.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -1039,6 +1040,7 @@
</span><span class="cx">                          1A3F6BE6174ADA2100B2EEA7 /* NeverDestroyed.h */,
</span><span class="cx">                          0F0D85B317234CB100338210 /* NoLock.h */,
</span><span class="cx">                          A8A472D0151A825B004123FF /* Noncopyable.h */,
</span><ins>+                               E3E64F0B22813428001E55B4 /* Nonmovable.h */,
</ins><span class="cx">                           526AEC911F6B4E5C00695F5D /* NoTailCalls.h */,
</span><span class="cx">                          7CEAE5AC1EA6E10F00DB6890 /* NotFound.h */,
</span><span class="cx">                          A8A472D5151A825B004123FF /* NumberOfCores.cpp */,
</span></span></pre></div>
<a id="trunkSourceWTFwtfCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/CMakeLists.txt (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/CMakeLists.txt      2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/WTF/wtf/CMakeLists.txt 2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -139,6 +139,7 @@
</span><span class="cx">     NoLock.h
</span><span class="cx">     NoTailCalls.h
</span><span class="cx">     Noncopyable.h
</span><ins>+    Nonmovable.h
</ins><span class="cx">     NotFound.h
</span><span class="cx">     NumberOfCores.h
</span><span class="cx">     OSAllocator.h
</span></span></pre></div>
<a id="trunkSourceWTFwtfNonmovablehfromrev245049trunkSourceJavaScriptCorebytecodeLLIntPrototypeLoadAdaptiveStructureWatchpointh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WTF/wtf/Nonmovable.h (from rev 245049, trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h) (0 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Nonmovable.h                                (rev 0)
+++ trunk/Source/WTF/wtf/Nonmovable.h   2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+/*
+ * Copyright (C) 2019 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.
+ */
+
+#pragma once
+
+#define WTF_MAKE_NONMOVABLE(ClassName) \
+    private: \
+        ClassName(ClassName&&) = delete; \
+        ClassName& operator=(ClassName&&) = delete; \
+
</ins></span></pre></div>
<a id="trunkSourceWTFwtfVectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Vector.h (245049 => 245050)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Vector.h    2019-05-08 02:56:01 UTC (rev 245049)
+++ trunk/Source/WTF/wtf/Vector.h       2019-05-08 04:35:36 UTC (rev 245050)
</span><span class="lines">@@ -775,6 +775,7 @@
</span><span class="cx"> 
</span><span class="cx">     void uncheckedAppend(ValueType&& value) { uncheckedAppend<ValueType>(std::forward<ValueType>(value)); }
</span><span class="cx">     template<typename U> void uncheckedAppend(U&&);
</span><ins>+    template<typename... Args> void uncheckedConstructAndAppend(Args&&...);
</ins><span class="cx"> 
</span><span class="cx">     template<typename U> void append(const U*, size_t);
</span><span class="cx">     template<typename U, size_t otherCapacity> void appendVector(const Vector<U, otherCapacity>&);
</span><span class="lines">@@ -1392,6 +1393,18 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity>
</span><ins>+template<typename... Args>
+ALWAYS_INLINE void Vector<T, inlineCapacity, OverflowHandler, minCapacity>::uncheckedConstructAndAppend(Args&&... args)
+{
+    ASSERT(size() < capacity());
+
+    asanBufferSizeWillChangeTo(m_size + 1);
+
+    new (NotNull, end()) T(std::forward<Args>(args)...);
+    ++m_size;
+}
+
+template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity>
</ins><span class="cx"> template<typename U, size_t otherCapacity>
</span><span class="cx"> inline void Vector<T, inlineCapacity, OverflowHandler, minCapacity>::appendVector(const Vector<U, otherCapacity>& val)
</span><span class="cx"> {
</span></span></pre>
</div>
</div>

</body>
</html>