<!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>[209201] 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/209201">209201</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2016-12-01 13:47:34 -0800 (Thu, 01 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Renamed EvalCodeCache =&gt; DirectEvalCodeCache
https://bugs.webkit.org/show_bug.cgi?id=165271

Reviewed by Saam Barati.

We only use this cache for DirectEval, not IndirectEval.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::DirectEvalCodeCache::visitAggregate):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::EvalCodeCache::visitAggregate): Deleted.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::directEvalCodeCache):
(JSC::CodeBlock::evalCodeCache): Deleted.
* bytecode/DirectEvalCodeCache.h: Copied from Source/JavaScriptCore/bytecode/EvalCodeCache.h.
(JSC::EvalCodeCache::CacheKey::CacheKey): Deleted.
(JSC::EvalCodeCache::CacheKey::hash): Deleted.
(JSC::EvalCodeCache::CacheKey::isEmptyValue): Deleted.
(JSC::EvalCodeCache::CacheKey::operator==): Deleted.
(JSC::EvalCodeCache::CacheKey::isHashTableDeletedValue): Deleted.
(JSC::EvalCodeCache::CacheKey::Hash::hash): Deleted.
(JSC::EvalCodeCache::CacheKey::Hash::equal): Deleted.
(JSC::EvalCodeCache::tryGet): Deleted.
(JSC::EvalCodeCache::set): Deleted.
(JSC::EvalCodeCache::isEmpty): Deleted.
(JSC::EvalCodeCache::clear): Deleted.
* bytecode/EvalCodeCache.h: Removed.
* interpreter/Interpreter.cpp:
(JSC::eval):
* runtime/DirectEvalExecutable.cpp:
(JSC::DirectEvalExecutable::create):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</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="#trunkSourceJavaScriptCoreinterpreterInterpretercpp">trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeDirectEvalExecutablecpp">trunk/Source/JavaScriptCore/runtime/DirectEvalExecutable.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebytecodeDirectEvalCodeCacheh">trunk/Source/JavaScriptCore/bytecode/DirectEvalCodeCache.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebytecodeEvalCodeCacheh">trunk/Source/JavaScriptCore/bytecode/EvalCodeCache.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (209200 => 209201)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-12-01 21:45:31 UTC (rev 209200)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-12-01 21:47:34 UTC (rev 209201)
</span><span class="lines">@@ -1,5 +1,40 @@
</span><span class="cx"> 2016-12-01  Geoffrey Garen  &lt;ggaren@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Renamed EvalCodeCache =&gt; DirectEvalCodeCache
+        https://bugs.webkit.org/show_bug.cgi?id=165271
+
+        Reviewed by Saam Barati.
+
+        We only use this cache for DirectEval, not IndirectEval.
+
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * bytecode/CodeBlock.cpp:
+        (JSC::DirectEvalCodeCache::visitAggregate):
+        (JSC::CodeBlock::stronglyVisitStrongReferences):
+        (JSC::EvalCodeCache::visitAggregate): Deleted.
+        * bytecode/CodeBlock.h:
+        (JSC::CodeBlock::directEvalCodeCache):
+        (JSC::CodeBlock::evalCodeCache): Deleted.
+        * bytecode/DirectEvalCodeCache.h: Copied from Source/JavaScriptCore/bytecode/EvalCodeCache.h.
+        (JSC::EvalCodeCache::CacheKey::CacheKey): Deleted.
+        (JSC::EvalCodeCache::CacheKey::hash): Deleted.
+        (JSC::EvalCodeCache::CacheKey::isEmptyValue): Deleted.
+        (JSC::EvalCodeCache::CacheKey::operator==): Deleted.
+        (JSC::EvalCodeCache::CacheKey::isHashTableDeletedValue): Deleted.
+        (JSC::EvalCodeCache::CacheKey::Hash::hash): Deleted.
+        (JSC::EvalCodeCache::CacheKey::Hash::equal): Deleted.
+        (JSC::EvalCodeCache::tryGet): Deleted.
+        (JSC::EvalCodeCache::set): Deleted.
+        (JSC::EvalCodeCache::isEmpty): Deleted.
+        (JSC::EvalCodeCache::clear): Deleted.
+        * bytecode/EvalCodeCache.h: Removed.
+        * interpreter/Interpreter.cpp:
+        (JSC::eval):
+        * runtime/DirectEvalExecutable.cpp:
+        (JSC::DirectEvalExecutable::create):
+
+2016-12-01  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
</ins><span class="cx">         Removed some unnecessary indirection in code generation
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=165264
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (209200 => 209201)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-12-01 21:45:31 UTC (rev 209200)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-12-01 21:47:34 UTC (rev 209201)
</span><span class="lines">@@ -1552,7 +1552,7 @@
</span><span class="cx">                 969A072B0ED1CE6900F1F681 /* RegisterID.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07280ED1CE6900F1F681 /* RegisterID.h */; };
</span><span class="cx">                 969A07960ED1D3AE00F1F681 /* CodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */; settings = {COMPILER_FLAGS = &quot;-fno-strict-aliasing&quot;; }; };
</span><span class="cx">                 969A07970ED1D3AE00F1F681 /* CodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07910ED1D3AE00F1F681 /* CodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                969A07980ED1D3AE00F1F681 /* DirectEvalCodeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07920ED1D3AE00F1F681 /* DirectEvalCodeCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 969A07990ED1D3AE00F1F681 /* Instruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07930ED1D3AE00F1F681 /* Instruction.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 969A079A0ED1D3AE00F1F681 /* Opcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07940ED1D3AE00F1F681 /* Opcode.cpp */; };
</span><span class="cx">                 969A079B0ED1D3AE00F1F681 /* Opcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07950ED1D3AE00F1F681 /* Opcode.h */; };
</span><span class="lines">@@ -4015,7 +4015,7 @@
</span><span class="cx">                 969A07280ED1CE6900F1F681 /* RegisterID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterID.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeBlock.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 969A07910ED1D3AE00F1F681 /* CodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeBlock.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EvalCodeCache.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                969A07920ED1D3AE00F1F681 /* DirectEvalCodeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectEvalCodeCache.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 969A07930ED1D3AE00F1F681 /* Instruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Instruction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 969A07940ED1D3AE00F1F681 /* Opcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Opcode.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 969A07950ED1D3AE00F1F681 /* Opcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Opcode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -7201,7 +7201,7 @@
</span><span class="cx">                                 E3BFD0BA1DAF807C0065DEA2 /* DOMJITAccessCasePatchpointParams.h */,
</span><span class="cx">                                 14AD91121DCA97FD0014F9FE /* EvalCodeBlock.cpp */,
</span><span class="cx">                                 14AD91061DCA92940014F9FE /* EvalCodeBlock.h */,
</span><del>-                                969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */,
</del><ins>+                                969A07920ED1D3AE00F1F681 /* DirectEvalCodeCache.h */,
</ins><span class="cx">                                 14142E521B796EDD00F4BF4B /* ExecutableInfo.h */,
</span><span class="cx">                                 0F56A1D415001CF2002992B1 /* ExecutionCounter.cpp */,
</span><span class="cx">                                 0F56A1D115000F31002992B1 /* ExecutionCounter.h */,
</span><span class="lines">@@ -8197,7 +8197,7 @@
</span><span class="cx">                                 BC02E98D0E183E38000F9297 /* ErrorInstance.h in Headers */,
</span><span class="cx">                                 BC02E90F0E1839DB000F9297 /* ErrorPrototype.h in Headers */,
</span><span class="cx">                                 996B731B1BDA08D100331B84 /* ErrorPrototype.lut.h in Headers */,
</span><del>-                                969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */,
</del><ins>+                                969A07980ED1D3AE00F1F681 /* DirectEvalCodeCache.h in Headers */,
</ins><span class="cx">                                 A54982041891D0B00081E5B8 /* EventLoop.h in Headers */,
</span><span class="cx">                                 FE1C0FFD1B193E9800B53FCA /* Exception.h in Headers */,
</span><span class="cx">                                 0F12DE101979D5FD0006FF4E /* ExceptionFuzz.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (209200 => 209201)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2016-12-01 21:45:31 UTC (rev 209200)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2016-12-01 21:47:34 UTC (rev 209201)
</span><span class="lines">@@ -1797,17 +1797,6 @@
</span><span class="cx">     macro(functionExpressions) \
</span><span class="cx">     macro(constantRegisters)
</span><span class="cx"> 
</span><del>-#define FOR_EACH_MEMBER_VECTOR_RARE_DATA(macro) \
-    macro(regexps) \
-    macro(functions) \
-    macro(exceptionHandlers) \
-    macro(switchJumpTables) \
-    macro(stringSwitchJumpTables) \
-    macro(evalCodeCache) \
-    macro(expressionInfo) \
-    macro(lineInfo) \
-    macro(callReturnIndexVector)
-
</del><span class="cx"> template&lt;typename T&gt;
</span><span class="cx"> static size_t sizeInBytes(const Vector&lt;T&gt;&amp; vector)
</span><span class="cx"> {
</span><span class="lines">@@ -2487,7 +2476,7 @@
</span><span class="cx">     m_argumentValueProfiles = RefCountedArray&lt;ValueProfile&gt;(newValue);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void EvalCodeCache::visitAggregate(SlotVisitor&amp; visitor)
</del><ins>+void DirectEvalCodeCache::visitAggregate(SlotVisitor&amp; visitor)
</ins><span class="cx"> {
</span><span class="cx">     EvalCacheMap::iterator end = m_cacheMap.end();
</span><span class="cx">     for (EvalCacheMap::iterator ptr = m_cacheMap.begin(); ptr != end; ++ptr)
</span><span class="lines">@@ -3132,7 +3121,7 @@
</span><span class="cx">     visitor.append(&amp;m_ownerExecutable);
</span><span class="cx">     visitor.append(&amp;m_unlinkedCode);
</span><span class="cx">     if (m_rareData)
</span><del>-        m_rareData-&gt;m_evalCodeCache.visitAggregate(visitor);
</del><ins>+        m_rareData-&gt;m_directEvalCodeCache.visitAggregate(visitor);
</ins><span class="cx">     visitor.appendValues(m_constantRegisters.data(), m_constantRegisters.size());
</span><span class="cx">     for (size_t i = 0; i &lt; m_functionExprs.size(); ++i)
</span><span class="cx">         visitor.append(&amp;m_functionExprs[i]);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.h (209200 => 209201)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.h        2016-12-01 21:45:31 UTC (rev 209200)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.h        2016-12-01 21:47:34 UTC (rev 209201)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> #include &quot;DFGCommon.h&quot;
</span><span class="cx"> #include &quot;DFGExitProfile.h&quot;
</span><span class="cx"> #include &quot;DeferredCompilationCallback.h&quot;
</span><del>-#include &quot;EvalCodeCache.h&quot;
</del><ins>+#include &quot;DirectEvalCodeCache.h&quot;
</ins><span class="cx"> #include &quot;EvalExecutable.h&quot;
</span><span class="cx"> #include &quot;ExecutionCounter.h&quot;
</span><span class="cx"> #include &quot;ExpressionRangeInfo.h&quot;
</span><span class="lines">@@ -616,7 +616,7 @@
</span><span class="cx">     StringJumpTable&amp; addStringSwitchJumpTable() { createRareDataIfNecessary(); m_rareData-&gt;m_stringSwitchJumpTables.append(StringJumpTable()); return m_rareData-&gt;m_stringSwitchJumpTables.last(); }
</span><span class="cx">     StringJumpTable&amp; stringSwitchJumpTable(int tableIndex) { RELEASE_ASSERT(m_rareData); return m_rareData-&gt;m_stringSwitchJumpTables[tableIndex]; }
</span><span class="cx"> 
</span><del>-    EvalCodeCache&amp; evalCodeCache() { createRareDataIfNecessary(); return m_rareData-&gt;m_evalCodeCache; }
</del><ins>+    DirectEvalCodeCache&amp; directEvalCodeCache() { createRareDataIfNecessary(); return m_rareData-&gt;m_directEvalCodeCache; }
</ins><span class="cx"> 
</span><span class="cx">     enum ShrinkMode {
</span><span class="cx">         // Shrink prior to generating machine code that may point directly into vectors.
</span><span class="lines">@@ -870,7 +870,7 @@
</span><span class="cx">         Vector&lt;SimpleJumpTable&gt; m_switchJumpTables;
</span><span class="cx">         Vector&lt;StringJumpTable&gt; m_stringSwitchJumpTables;
</span><span class="cx"> 
</span><del>-        EvalCodeCache m_evalCodeCache;
</del><ins>+        DirectEvalCodeCache m_directEvalCodeCache;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     void clearExceptionHandlers()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeDirectEvalCodeCachehfromrev209200trunkSourceJavaScriptCorebytecodeEvalCodeCacheh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/bytecode/DirectEvalCodeCache.h (from rev 209200, trunk/Source/JavaScriptCore/bytecode/EvalCodeCache.h) (0 => 209201)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/DirectEvalCodeCache.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/bytecode/DirectEvalCodeCache.h        2016-12-01 21:47:34 UTC (rev 209201)
</span><span class="lines">@@ -0,0 +1,114 @@
</span><ins>+/*
+ * Copyright (C) 2008, 2009 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.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;DirectEvalExecutable.h&quot;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+#include &lt;wtf/text/StringHash.h&gt;
+
+namespace JSC {
+
+    class SlotVisitor;
+
+    class DirectEvalCodeCache {
+    public:
+        class CacheKey {
+        public:
+            CacheKey(const String&amp; source, CallSiteIndex callSiteIndex)
+                : m_source(source.impl())
+                , m_callSiteIndex(callSiteIndex)
+            {
+            }
+
+            CacheKey(WTF::HashTableDeletedValueType)
+                : m_source(WTF::HashTableDeletedValue)
+            {
+            }
+
+            CacheKey() = default;
+
+            unsigned hash() const { return m_source-&gt;hash() ^ m_callSiteIndex.bits(); }
+
+            bool isEmptyValue() const { return !m_source; }
+
+            bool operator==(const CacheKey&amp; other) const
+            {
+                return m_callSiteIndex == other.m_callSiteIndex &amp;&amp; WTF::equal(m_source.get(), other.m_source.get());
+            }
+
+            bool isHashTableDeletedValue() const { return m_source.isHashTableDeletedValue(); }
+
+            struct Hash {
+                static unsigned hash(const CacheKey&amp; key)
+                {
+                    return key.hash();
+                }
+                static bool equal(const CacheKey&amp; lhs, const CacheKey&amp; rhs)
+                {
+                    return lhs == rhs;
+                }
+                static const bool safeToCompareToEmptyOrDeleted = false;
+            };
+
+            typedef SimpleClassHashTraits&lt;CacheKey&gt; HashTraits;
+
+        private:
+            RefPtr&lt;StringImpl&gt; m_source;
+            CallSiteIndex m_callSiteIndex;
+        };
+
+        DirectEvalExecutable* tryGet(const String&amp; evalSource, CallSiteIndex callSiteIndex)
+        {
+            return m_cacheMap.fastGet(CacheKey(evalSource, callSiteIndex)).get();
+        }
+        
+        void set(ExecState* exec, JSCell* owner, const String&amp; evalSource, CallSiteIndex callSiteIndex, DirectEvalExecutable* evalExecutable)
+        {
+            if (m_cacheMap.size() &lt; maxCacheEntries)
+                m_cacheMap.set(CacheKey(evalSource, callSiteIndex), WriteBarrier&lt;DirectEvalExecutable&gt;(exec-&gt;vm(), owner, evalExecutable));
+        }
+
+        bool isEmpty() const { return m_cacheMap.isEmpty(); }
+
+        void visitAggregate(SlotVisitor&amp;);
+
+        void clear()
+        {
+            m_cacheMap.clear();
+        }
+
+    private:
+        static const int maxCacheEntries = 64;
+
+        typedef HashMap&lt;CacheKey, WriteBarrier&lt;DirectEvalExecutable&gt;, CacheKey::Hash, CacheKey::HashTraits&gt; EvalCacheMap;
+        EvalCacheMap m_cacheMap;
+    };
+
+} // namespace JSC
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeEvalCodeCacheh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/bytecode/EvalCodeCache.h (209200 => 209201)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/EvalCodeCache.h        2016-12-01 21:45:31 UTC (rev 209200)
+++ trunk/Source/JavaScriptCore/bytecode/EvalCodeCache.h        2016-12-01 21:47:34 UTC (rev 209201)
</span><span class="lines">@@ -1,114 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2009 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.
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include &quot;DirectEvalExecutable.h&quot;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/RefPtr.h&gt;
-#include &lt;wtf/text/StringHash.h&gt;
-
-namespace JSC {
-
-    class SlotVisitor;
-
-    class EvalCodeCache {
-    public:
-        class CacheKey {
-        public:
-            CacheKey(const String&amp; source, CallSiteIndex callSiteIndex)
-                : m_source(source.impl())
-                , m_callSiteIndex(callSiteIndex)
-            {
-            }
-
-            CacheKey(WTF::HashTableDeletedValueType)
-                : m_source(WTF::HashTableDeletedValue)
-            {
-            }
-
-            CacheKey() = default;
-
-            unsigned hash() const { return m_source-&gt;hash() ^ m_callSiteIndex.bits(); }
-
-            bool isEmptyValue() const { return !m_source; }
-
-            bool operator==(const CacheKey&amp; other) const
-            {
-                return m_callSiteIndex == other.m_callSiteIndex &amp;&amp; WTF::equal(m_source.get(), other.m_source.get());
-            }
-
-            bool isHashTableDeletedValue() const { return m_source.isHashTableDeletedValue(); }
-
-            struct Hash {
-                static unsigned hash(const CacheKey&amp; key)
-                {
-                    return key.hash();
-                }
-                static bool equal(const CacheKey&amp; lhs, const CacheKey&amp; rhs)
-                {
-                    return lhs == rhs;
-                }
-                static const bool safeToCompareToEmptyOrDeleted = false;
-            };
-
-            typedef SimpleClassHashTraits&lt;CacheKey&gt; HashTraits;
-
-        private:
-            RefPtr&lt;StringImpl&gt; m_source;
-            CallSiteIndex m_callSiteIndex;
-        };
-
-        DirectEvalExecutable* tryGet(const String&amp; evalSource, CallSiteIndex callSiteIndex)
-        {
-            return m_cacheMap.fastGet(CacheKey(evalSource, callSiteIndex)).get();
-        }
-        
-        void set(ExecState* exec, JSCell* owner, const String&amp; evalSource, CallSiteIndex callSiteIndex, DirectEvalExecutable* evalExecutable)
-        {
-            if (m_cacheMap.size() &lt; maxCacheEntries)
-                m_cacheMap.set(CacheKey(evalSource, callSiteIndex), WriteBarrier&lt;DirectEvalExecutable&gt;(exec-&gt;vm(), owner, evalExecutable));
-        }
-
-        bool isEmpty() const { return m_cacheMap.isEmpty(); }
-
-        void visitAggregate(SlotVisitor&amp;);
-
-        void clear()
-        {
-            m_cacheMap.clear();
-        }
-
-    private:
-        static const int maxCacheEntries = 64;
-
-        typedef HashMap&lt;CacheKey, WriteBarrier&lt;DirectEvalExecutable&gt;, CacheKey::Hash, CacheKey::HashTraits&gt; EvalCacheMap;
-        EvalCacheMap m_cacheMap;
-    };
-
-} // namespace JSC
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp (209200 => 209201)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2016-12-01 21:45:31 UTC (rev 209200)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2016-12-01 21:47:34 UTC (rev 209201)
</span><span class="lines">@@ -37,9 +37,9 @@
</span><span class="cx"> #include &quot;Heap.h&quot;
</span><span class="cx"> #include &quot;Debugger.h&quot;
</span><span class="cx"> #include &quot;DebuggerCallFrame.h&quot;
</span><ins>+#include &quot;DirectEvalCodeCache.h&quot;
</ins><span class="cx"> #include &quot;ErrorInstance.h&quot;
</span><span class="cx"> #include &quot;EvalCodeBlock.h&quot;
</span><del>-#include &quot;EvalCodeCache.h&quot;
</del><span class="cx"> #include &quot;Exception.h&quot;
</span><span class="cx"> #include &quot;ExceptionHelpers.h&quot;
</span><span class="cx"> #include &quot;FunctionCodeBlock.h&quot;
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">     else
</span><span class="cx">         evalContextType = EvalContextType::None;
</span><span class="cx"> 
</span><del>-    DirectEvalExecutable* eval = callerCodeBlock-&gt;evalCodeCache().tryGet(programSource, callerCallSiteIndex);
</del><ins>+    DirectEvalExecutable* eval = callerCodeBlock-&gt;directEvalCodeCache().tryGet(programSource, callerCallSiteIndex);
</ins><span class="cx">     if (!eval) {
</span><span class="cx">         if (!callerCodeBlock-&gt;isStrictMode()) {
</span><span class="cx">             if (programSource.is8Bit()) {
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx">         if (!eval)
</span><span class="cx">             return jsUndefined();
</span><span class="cx"> 
</span><del>-        callerCodeBlock-&gt;evalCodeCache().set(callFrame, callerCodeBlock, programSource, callerCallSiteIndex, eval);
</del><ins>+        callerCodeBlock-&gt;directEvalCodeCache().set(callFrame, callerCodeBlock, programSource, callerCallSiteIndex, eval);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     JSValue thisValue = callerFrame-&gt;thisValue();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeDirectEvalExecutablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/DirectEvalExecutable.cpp (209200 => 209201)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/DirectEvalExecutable.cpp        2016-12-01 21:45:31 UTC (rev 209200)
+++ trunk/Source/JavaScriptCore/runtime/DirectEvalExecutable.cpp        2016-12-01 21:47:34 UTC (rev 209201)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     JSParserStrictMode strictMode = executable-&gt;isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
</span><span class="cx">     DebuggerMode debuggerMode = globalObject-&gt;hasInteractiveDebugger() ? DebuggerOn : DebuggerOff;
</span><span class="cx"> 
</span><del>-    // We don't bother with CodeCache here because direct eval uses a specialized EvalCodeCache.
</del><ins>+    // We don't bother with CodeCache here because direct eval uses a specialized DirectEvalCodeCache.
</ins><span class="cx">     UnlinkedEvalCodeBlock* unlinkedEvalCode = generateUnlinkedCodeBlock&lt;UnlinkedEvalCodeBlock&gt;(
</span><span class="cx">         vm, executable, executable-&gt;source(), strictMode, JSParserScriptMode::Classic, debuggerMode, error, evalContextType, variablesUnderTDZ);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>