<!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>[200543] 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/200543">200543</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2016-05-07 09:20:16 -0700 (Sat, 07 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add JSC options bytecodeRangeToJITCompile and jitWhitelist.
https://bugs.webkit.org/show_bug.cgi?id=157428

Reviewed by Michael Saboff.

1. Added Options::bytecodeRangeToJITCompile and Options::jitWhitelist options.

2. Moved DFGFunctionWhitelist* to FunctionWhitelist* and made it generic so that
   it can be used for more than one whitelist instance.  In this case, we now have
   two: the dfgWhitelist and the jitWhitelist.

3. Added &quot;can compile&quot; checks in LLInt::shouldJIT() to check
   Options::bytecodeRangeToJITCompile and Options::jitWhitelist.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGDriver.cpp:
(JSC::DFG::getNumCompilations):
(JSC::DFG::ensureGlobalDFGWhitelist):
(JSC::DFG::compileImpl):
* dfg/DFGFunctionWhitelist.cpp: Removed.
* dfg/DFGFunctionWhitelist.h: Removed.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::ensureGlobalJITWhitelist):
(JSC::LLInt::shouldJIT):

* runtime/Options.h:

* tools/FunctionWhitelist.cpp: Copied from Source/JavaScriptCore/dfg/DFGFunctionWhitelist.cpp.
(JSC::FunctionWhitelist::FunctionWhitelist):
(JSC::FunctionWhitelist::contains):
(JSC::DFG::FunctionWhitelist::ensureGlobalWhitelist): Deleted.
(JSC::DFG::FunctionWhitelist::FunctionWhitelist): Deleted.
(JSC::DFG::FunctionWhitelist::parseFunctionNamesInFile): Deleted.
(JSC::DFG::FunctionWhitelist::contains): Deleted.
* tools/FunctionWhitelist.h: Copied from Source/JavaScriptCore/dfg/DFGFunctionWhitelist.h.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGDrivercpp">trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathscpp">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeOptionsh">trunk/Source/JavaScriptCore/runtime/Options.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoretoolsFunctionWhitelistcpp">trunk/Source/JavaScriptCore/tools/FunctionWhitelist.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoretoolsFunctionWhitelisth">trunk/Source/JavaScriptCore/tools/FunctionWhitelist.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoredfgDFGFunctionWhitelistcpp">trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGFunctionWhitelisth">trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (200542 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2016-05-07 13:03:58 UTC (rev 200542)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -289,7 +289,6 @@
</span><span class="cx">     dfg/DFGFlushedAt.cpp
</span><span class="cx">     dfg/DFGLiveCatchVariablePreservationPhase.cpp
</span><span class="cx">     dfg/DFGFrozenValue.cpp
</span><del>-    dfg/DFGFunctionWhitelist.cpp
</del><span class="cx">     dfg/DFGGraph.cpp
</span><span class="cx">     dfg/DFGGraphSafepoint.cpp
</span><span class="cx">     dfg/DFGHeapLocation.cpp
</span><span class="lines">@@ -826,6 +825,7 @@
</span><span class="cx">     tools/CodeProfile.cpp
</span><span class="cx">     tools/CodeProfiling.cpp
</span><span class="cx">     tools/FunctionOverrides.cpp
</span><ins>+    tools/FunctionWhitelist.cpp
</ins><span class="cx">     tools/JSDollarVM.cpp
</span><span class="cx">     tools/JSDollarVMPrototype.cpp
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (200542 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-05-07 13:03:58 UTC (rev 200542)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-05-07  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Add JSC options bytecodeRangeToJITCompile and jitWhitelist.
+        https://bugs.webkit.org/show_bug.cgi?id=157428
+
+        Reviewed by Michael Saboff.
+
+        1. Added Options::bytecodeRangeToJITCompile and Options::jitWhitelist options.
+
+        2. Moved DFGFunctionWhitelist* to FunctionWhitelist* and made it generic so that
+           it can be used for more than one whitelist instance.  In this case, we now have
+           two: the dfgWhitelist and the jitWhitelist.
+
+        3. Added &quot;can compile&quot; checks in LLInt::shouldJIT() to check
+           Options::bytecodeRangeToJITCompile and Options::jitWhitelist.
+
+        * CMakeLists.txt:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * dfg/DFGDriver.cpp:
+        (JSC::DFG::getNumCompilations):
+        (JSC::DFG::ensureGlobalDFGWhitelist):
+        (JSC::DFG::compileImpl):
+        * dfg/DFGFunctionWhitelist.cpp: Removed.
+        * dfg/DFGFunctionWhitelist.h: Removed.
+
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::ensureGlobalJITWhitelist):
+        (JSC::LLInt::shouldJIT):
+
+        * runtime/Options.h:
+
+        * tools/FunctionWhitelist.cpp: Copied from Source/JavaScriptCore/dfg/DFGFunctionWhitelist.cpp.
+        (JSC::FunctionWhitelist::FunctionWhitelist):
+        (JSC::FunctionWhitelist::contains):
+        (JSC::DFG::FunctionWhitelist::ensureGlobalWhitelist): Deleted.
+        (JSC::DFG::FunctionWhitelist::FunctionWhitelist): Deleted.
+        (JSC::DFG::FunctionWhitelist::parseFunctionNamesInFile): Deleted.
+        (JSC::DFG::FunctionWhitelist::contains): Deleted.
+        * tools/FunctionWhitelist.h: Copied from Source/JavaScriptCore/dfg/DFGFunctionWhitelist.h.
+
</ins><span class="cx"> 2016-05-07  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [JSC][32bit] stress/tagged-templates-template-object.js fails in debug
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (200542 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-05-07 13:03:58 UTC (rev 200542)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -1131,8 +1131,6 @@
</span><span class="cx">                 2A83638618D7D0EE0000EBCC /* EdenGCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A83638418D7D0EE0000EBCC /* EdenGCActivityCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2A83638918D7D0FE0000EBCC /* FullGCActivityCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2A83638718D7D0FE0000EBCC /* FullGCActivityCallback.cpp */; };
</span><span class="cx">                 2A83638A18D7D0FE0000EBCC /* FullGCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A83638818D7D0FE0000EBCC /* FullGCActivityCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                2A88067819107D5500CB0BBB /* DFGFunctionWhitelist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2A88067619107D5500CB0BBB /* DFGFunctionWhitelist.cpp */; };
-                2A88067919107D5500CB0BBB /* DFGFunctionWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A88067719107D5500CB0BBB /* DFGFunctionWhitelist.h */; };
</del><span class="cx">                 2AAAA31218BD49D100394CC8 /* StructureIDBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AAAA31018BD49D100394CC8 /* StructureIDBlob.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2AABCDE718EF294200002096 /* GCLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AABCDE618EF294200002096 /* GCLogging.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2AACE63C18CA5A0300ED0191 /* GCActivityCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AACE63A18CA5A0300ED0191 /* GCActivityCallback.cpp */; };
</span><span class="lines">@@ -2094,6 +2092,8 @@
</span><span class="cx">                 FE99B24A1C24C3D700C82159 /* JITNegGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE99B2471C24B6D300C82159 /* JITNegGenerator.cpp */; };
</span><span class="cx">                 FEA08620182B7A0400F6D851 /* Breakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA0861E182B7A0400F6D851 /* Breakpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 FEA08621182B7A0400F6D851 /* DebuggerPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA0861F182B7A0400F6D851 /* DebuggerPrimitives.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                FEA0C4021CDD7D1D00481991 /* FunctionWhitelist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEA0C4001CDD7D0E00481991 /* FunctionWhitelist.cpp */; };
+                FEA0C4031CDD7D1D00481991 /* FunctionWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA0C4011CDD7D0E00481991 /* FunctionWhitelist.h */; };
</ins><span class="cx">                 FEA1E4391C213A2B00277A16 /* ValueProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEA1E4381C213A2600277A16 /* ValueProfile.cpp */; };
</span><span class="cx">                 FEB137571BB11EF900CD5100 /* MacroAssemblerARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEB137561BB11EEE00CD5100 /* MacroAssemblerARM64.cpp */; };
</span><span class="cx">                 FEB51F6C1A97B688001F921C /* Regress141809.mm in Sources */ = {isa = PBXBuildFile; fileRef = FEB51F6B1A97B688001F921C /* Regress141809.mm */; };
</span><span class="lines">@@ -3265,8 +3265,6 @@
</span><span class="cx">                 2A83638418D7D0EE0000EBCC /* EdenGCActivityCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EdenGCActivityCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2A83638718D7D0FE0000EBCC /* FullGCActivityCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FullGCActivityCallback.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2A83638818D7D0FE0000EBCC /* FullGCActivityCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FullGCActivityCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                2A88067619107D5500CB0BBB /* DFGFunctionWhitelist.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGFunctionWhitelist.cpp; path = dfg/DFGFunctionWhitelist.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                2A88067719107D5500CB0BBB /* DFGFunctionWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGFunctionWhitelist.h; path = dfg/DFGFunctionWhitelist.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 2AAAA31018BD49D100394CC8 /* StructureIDBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureIDBlob.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2AABCDE618EF294200002096 /* GCLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCLogging.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2AACE63A18CA5A0300ED0191 /* GCActivityCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCActivityCallback.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4347,6 +4345,8 @@
</span><span class="cx">                 FE99B2481C24B6D300C82159 /* JITNegGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITNegGenerator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FEA0861E182B7A0400F6D851 /* Breakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Breakpoint.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FEA0861F182B7A0400F6D851 /* DebuggerPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebuggerPrimitives.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                FEA0C4001CDD7D0E00481991 /* FunctionWhitelist.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionWhitelist.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                FEA0C4011CDD7D0E00481991 /* FunctionWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FunctionWhitelist.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 FEA1E4381C213A2600277A16 /* ValueProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ValueProfile.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FEB137561BB11EEE00CD5100 /* MacroAssemblerARM64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacroAssemblerARM64.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FEB51F6A1A97B688001F921C /* Regress141809.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Regress141809.h; path = API/tests/Regress141809.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -6060,6 +6060,8 @@
</span><span class="cx">                                 8603CEF314C7546400AE59E3 /* CodeProfiling.h */,
</span><span class="cx">                                 FE4BFF291AD476E700088F87 /* FunctionOverrides.cpp */,
</span><span class="cx">                                 FE4BFF2A1AD476E700088F87 /* FunctionOverrides.h */,
</span><ins>+                                FEA0C4001CDD7D0E00481991 /* FunctionWhitelist.cpp */,
+                                FEA0C4011CDD7D0E00481991 /* FunctionWhitelist.h */,
</ins><span class="cx">                                 FE384EE11ADDB7AD0055DE2C /* JSDollarVM.cpp */,
</span><span class="cx">                                 FE384EE21ADDB7AD0055DE2C /* JSDollarVM.h */,
</span><span class="cx">                                 FE384EE31ADDB7AD0055DE2C /* JSDollarVMPrototype.cpp */,
</span><span class="lines">@@ -6214,8 +6216,6 @@
</span><span class="cx">                                 0F2DD8101AB3D8BE00BBB8E8 /* DFGForAllKills.h */,
</span><span class="cx">                                 0F69CC86193AC60A0045759E /* DFGFrozenValue.cpp */,
</span><span class="cx">                                 0F69CC87193AC60A0045759E /* DFGFrozenValue.h */,
</span><del>-                                2A88067619107D5500CB0BBB /* DFGFunctionWhitelist.cpp */,
-                                2A88067719107D5500CB0BBB /* DFGFunctionWhitelist.h */,
</del><span class="cx">                                 86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */,
</span><span class="cx">                                 86EC9DB71328DF82002B2AD7 /* DFGGraph.cpp */,
</span><span class="cx">                                 86EC9DB81328DF82002B2AD7 /* DFGGraph.h */,
</span><span class="lines">@@ -7078,6 +7078,7 @@
</span><span class="cx">                                 99DA00A81BD5993100F4575C /* builtins_generate_combined_implementation.py in Headers */,
</span><span class="cx">                                 99DA00A91BD5993100F4575C /* builtins_generate_separate_header.py in Headers */,
</span><span class="cx">                                 0F338E111BF0276C0013C88F /* B3OpaqueByproduct.h in Headers */,
</span><ins>+                                FEA0C4031CDD7D1D00481991 /* FunctionWhitelist.h in Headers */,
</ins><span class="cx">                                 99DA00AA1BD5993100F4575C /* builtins_generate_separate_implementation.py in Headers */,
</span><span class="cx">                                 99DA00A31BD5993100F4575C /* builtins_generator.py in Headers */,
</span><span class="cx">                                 FE3A06A61C10B72D00390FDD /* JITBitOrGenerator.h in Headers */,
</span><span class="lines">@@ -7267,7 +7268,6 @@
</span><span class="cx">                                 A7D89CF817A0B8CC00773AD8 /* DFGFlushFormat.h in Headers */,
</span><span class="cx">                                 0F2DD8151AB3D8BE00BBB8E8 /* DFGForAllKills.h in Headers */,
</span><span class="cx">                                 0F69CC89193AC60A0045759E /* DFGFrozenValue.h in Headers */,
</span><del>-                                2A88067919107D5500CB0BBB /* DFGFunctionWhitelist.h in Headers */,
</del><span class="cx">                                 86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */,
</span><span class="cx">                                 86EC9DC81328DF82002B2AD7 /* DFGGraph.h in Headers */,
</span><span class="cx">                                 0F2FCCFA18A60070001A27F8 /* DFGGraphSafepoint.h in Headers */,
</span><span class="lines">@@ -8834,7 +8834,6 @@
</span><span class="cx">                                 0F9D339617FFC4E60073C2BC /* DFGFlushedAt.cpp in Sources */,
</span><span class="cx">                                 A7D89CF717A0B8CC00773AD8 /* DFGFlushFormat.cpp in Sources */,
</span><span class="cx">                                 0F69CC88193AC60A0045759E /* DFGFrozenValue.cpp in Sources */,
</span><del>-                                2A88067819107D5500CB0BBB /* DFGFunctionWhitelist.cpp in Sources */,
</del><span class="cx">                                 86EC9DC71328DF82002B2AD7 /* DFGGraph.cpp in Sources */,
</span><span class="cx">                                 0F2FCCF918A60070001A27F8 /* DFGGraphSafepoint.cpp in Sources */,
</span><span class="cx">                                 0FB17660196B8F9E0091052A /* DFGHeapLocation.cpp in Sources */,
</span><span class="lines">@@ -8849,6 +8848,7 @@
</span><span class="cx">                                 86EC9DCB1328DF82002B2AD7 /* DFGJITCompiler.cpp in Sources */,
</span><span class="cx">                                 A78A9778179738B8009DF744 /* DFGJITFinalizer.cpp in Sources */,
</span><span class="cx">                                 0FC97F3F18202119002C9B26 /* DFGJumpReplacement.cpp in Sources */,
</span><ins>+                                FEA0C4021CDD7D1D00481991 /* FunctionWhitelist.cpp in Sources */,
</ins><span class="cx">                                 A73A535A1799CD5D00170C19 /* DFGLazyJSValue.cpp in Sources */,
</span><span class="cx">                                 62F2AA371B0BEDE300610C7A /* DFGLazyNode.cpp in Sources */,
</span><span class="cx">                                 A7D9A29717A0BC7400EE2618 /* DFGLICMPhase.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGDrivercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp (200542 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp        2016-05-07 13:03:58 UTC (rev 200542)
+++ trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -30,16 +30,17 @@
</span><span class="cx"> #include &quot;JSString.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CodeBlock.h&quot;
</span><del>-#include &quot;DFGFunctionWhitelist.h&quot;
</del><span class="cx"> #include &quot;DFGJITCode.h&quot;
</span><span class="cx"> #include &quot;DFGPlan.h&quot;
</span><span class="cx"> #include &quot;DFGThunks.h&quot;
</span><span class="cx"> #include &quot;DFGWorklist.h&quot;
</span><ins>+#include &quot;FunctionWhitelist.h&quot;
</ins><span class="cx"> #include &quot;JITCode.h&quot;
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><span class="cx"> #include &quot;Options.h&quot;
</span><span class="cx"> #include &quot;TypeProfilerLog.h&quot;
</span><span class="cx"> #include &lt;wtf/Atomics.h&gt;
</span><ins>+#include &lt;wtf/NeverDestroyed.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(FTL_JIT)
</span><span class="cx"> #include &quot;FTLThunks.h&quot;
</span><span class="lines">@@ -55,13 +56,24 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DFG_JIT)
</span><ins>+static FunctionWhitelist&amp; ensureGlobalDFGWhitelist()
+{
+    static LazyNeverDestroyed&lt;FunctionWhitelist&gt; dfgWhitelist;
+    static std::once_flag initializeWhitelistFlag;
+    std::call_once(initializeWhitelistFlag, [] {
+        const char* functionWhitelistFile = Options::dfgWhitelist();
+        dfgWhitelist.construct(functionWhitelistFile);
+    });
+    return dfgWhitelist;
+}
+
</ins><span class="cx"> static CompilationResult compileImpl(
</span><span class="cx">     VM&amp; vm, CodeBlock* codeBlock, CodeBlock* profiledDFGCodeBlock, CompilationMode mode,
</span><span class="cx">     unsigned osrEntryBytecodeIndex, const Operands&lt;JSValue&gt;&amp; mustHandleValues,
</span><span class="cx">     PassRefPtr&lt;DeferredCompilationCallback&gt; callback)
</span><span class="cx"> {
</span><span class="cx">     if (!Options::bytecodeRangeToDFGCompile().isInRange(codeBlock-&gt;instructionCount())
</span><del>-        || !FunctionWhitelist::ensureGlobalWhitelist().contains(codeBlock))
</del><ins>+        || !ensureGlobalDFGWhitelist().contains(codeBlock))
</ins><span class="cx">         return CompilationFailed;
</span><span class="cx">     
</span><span class="cx">     numCompilations++;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGFunctionWhitelistcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.cpp (200542 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.cpp        2016-05-07 13:03:58 UTC (rev 200542)
+++ trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.cpp        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -1,115 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;DFGFunctionWhitelist.h&quot;
-
-#if ENABLE(DFG_JIT)
-
-#include &quot;CodeBlock.h&quot;
-#include &quot;Options.h&quot;
-#include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
-#include &lt;wtf/NeverDestroyed.h&gt;
-#include &lt;wtf/text/StringBuilder.h&gt;
-
-namespace JSC { namespace DFG {
-
-FunctionWhitelist&amp; FunctionWhitelist::ensureGlobalWhitelist()
-{
-    static LazyNeverDestroyed&lt;FunctionWhitelist&gt; functionWhitelist;
-    static std::once_flag initializeWhitelistFlag;
-    std::call_once(initializeWhitelistFlag, [] {
-        const char* functionWhitelistFile = Options::dfgWhitelist();
-        functionWhitelist.construct(functionWhitelistFile);
-    });
-    return functionWhitelist;
-}
-
-FunctionWhitelist::FunctionWhitelist(const char* filename)
-{
-    parseFunctionNamesInFile(filename);
-}
-
-void FunctionWhitelist::parseFunctionNamesInFile(const char* filename)
-{
-    if (!filename)
-        return;
-
-    FILE* f = fopen(filename, &quot;r&quot;);
-    if (!f) {
-        dataLogF(&quot;Failed to open file %s. Did you add the file-read-data entitlement to WebProcess.sb?\n&quot;, filename); 
-        return;
-    }
-
-    char* line;
-    char buffer[BUFSIZ];
-    while ((line = fgets(buffer, sizeof(buffer), f))) {
-        if (strstr(line, &quot;//&quot;) == line)
-            continue;
-
-        // Get rid of newlines at the ends of the strings.
-        size_t length = strlen(line);
-        if (line[length - 1] == '\n') {
-            line[length - 1] = '\0';
-            length--;
-        }
-
-        // Skip empty lines.
-        if (!length)
-            continue;
-        
-        m_entries.add(String(line, length));
-    }
-
-    int result = fclose(f);
-    if (result)
-        dataLogF(&quot;Failed to close file %s: %s\n&quot;, filename, strerror(errno));
-}
-
-bool FunctionWhitelist::contains(CodeBlock* codeBlock) const 
-{
-    ASSERT(!isCompilationThread());
-    if (!Options::dfgWhitelist())
-        return true;
-
-    if (m_entries.isEmpty())
-        return false;
-
-    String name = String::fromUTF8(codeBlock-&gt;inferredName());
-    if (m_entries.contains(name))
-        return true;
-
-    String hash = String::fromUTF8(codeBlock-&gt;hashAsStringIfPossible());
-    if (m_entries.contains(hash))
-        return true;
-
-    return m_entries.contains(name + '#' + hash);
-}
-
-} } // namespace JSC::DFG
-
-#endif // ENABLE(DFG_JIT)
-
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGFunctionWhitelisth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.h (200542 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.h        2016-05-07 13:03:58 UTC (rev 200542)
+++ trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.h        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DFGFunctionWhitelist_h
-#define DFGFunctionWhitelist_h
-
-#if ENABLE(DFG_JIT)
-
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace JSC { 
-
-class CodeBlock;
-
-namespace DFG {
-
-class FunctionWhitelist {
-public:
-    static FunctionWhitelist&amp; ensureGlobalWhitelist();
-    explicit FunctionWhitelist(const char*);
-
-    bool contains(CodeBlock*) const;
-
-private:
-    void parseFunctionNamesInFile(const char*);
-
-    HashSet&lt;String&gt; m_entries;
-};
-
-} } // namespace JSC::DFG
-
-#endif // ENABLE(DFG_JIT)
-
-#endif // DFGFunctionWhitelist_h
</del></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (200542 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2016-05-07 13:03:58 UTC (rev 200542)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include &quot;ErrorHandlingScope.h&quot;
</span><span class="cx"> #include &quot;Exception.h&quot;
</span><span class="cx"> #include &quot;ExceptionFuzz.h&quot;
</span><ins>+#include &quot;FunctionWhitelist.h&quot;
</ins><span class="cx"> #include &quot;GetterSetter.h&quot;
</span><span class="cx"> #include &quot;HostCallReturnValue.h&quot;
</span><span class="cx"> #include &quot;Interpreter.h&quot;
</span><span class="lines">@@ -56,6 +57,7 @@
</span><span class="cx"> #include &quot;ShadowChicken.h&quot;
</span><span class="cx"> #include &quot;StructureRareDataInlines.h&quot;
</span><span class="cx"> #include &quot;VMInlines.h&quot;
</span><ins>+#include &lt;wtf/NeverDestroyed.h&gt;
</ins><span class="cx"> #include &lt;wtf/StringPrintStream.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC { namespace LLInt {
</span><span class="lines">@@ -287,8 +289,23 @@
</span><span class="cx"> enum EntryKind { Prologue, ArityCheck };
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(JIT)
</span><del>-inline bool shouldJIT(ExecState* exec, CodeBlock*)
</del><ins>+static FunctionWhitelist&amp; ensureGlobalJITWhitelist()
</ins><span class="cx"> {
</span><ins>+    static LazyNeverDestroyed&lt;FunctionWhitelist&gt; baselineWhitelist;
+    static std::once_flag initializeWhitelistFlag;
+    std::call_once(initializeWhitelistFlag, [] {
+        const char* functionWhitelistFile = Options::jitWhitelist();
+        baselineWhitelist.construct(functionWhitelistFile);
+    });
+    return baselineWhitelist;
+}
+
+inline bool shouldJIT(ExecState* exec, CodeBlock* codeBlock)
+{
+    if (!Options::bytecodeRangeToJITCompile().isInRange(codeBlock-&gt;instructionCount())
+        || !ensureGlobalJITWhitelist().contains(codeBlock))
+        return false;
+
</ins><span class="cx">     // You can modify this to turn off JITting without rebuilding the world.
</span><span class="cx">     return exec-&gt;vm().canUseJIT();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Options.h (200542 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Options.h        2016-05-07 13:03:58 UTC (rev 200542)
+++ trunk/Source/JavaScriptCore/runtime/Options.h        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -145,8 +145,10 @@
</span><span class="cx">     v(bool, dumpDFGDisassembly, false, Normal, &quot;dumps disassembly of DFG function upon compilation&quot;) \
</span><span class="cx">     v(bool, dumpFTLDisassembly, false, Normal, &quot;dumps disassembly of FTL function upon compilation&quot;) \
</span><span class="cx">     v(bool, dumpAllDFGNodes, false, Normal, nullptr) \
</span><ins>+    v(optionRange, bytecodeRangeToJITCompile, 0, Normal, &quot;bytecode size range to allow compilation on, e.g. 1:100&quot;) \
</ins><span class="cx">     v(optionRange, bytecodeRangeToDFGCompile, 0, Normal, &quot;bytecode size range to allow DFG compilation on, e.g. 1:100&quot;) \
</span><span class="cx">     v(optionRange, bytecodeRangeToFTLCompile, 0, Normal, &quot;bytecode size range to allow FTL compilation on, e.g. 1:100&quot;) \
</span><ins>+    v(optionString, jitWhitelist, nullptr, Normal, &quot;file with list of function signatures to allow compilation on&quot;) \
</ins><span class="cx">     v(optionString, dfgWhitelist, nullptr, Normal, &quot;file with list of function signatures to allow DFG compilation on&quot;) \
</span><span class="cx">     v(bool, dumpSourceAtDFGTime, false, Normal, &quot;dumps source code of JS function being DFG compiled&quot;) \
</span><span class="cx">     v(bool, dumpBytecodeAtDFGTime, false, Normal, &quot;dumps bytecode of JS function being DFG compiled&quot;) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretoolsFunctionWhitelistcppfromrev200530trunkSourceJavaScriptCoredfgDFGFunctionWhitelistcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/tools/FunctionWhitelist.cpp (from rev 200530, trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.cpp) (0 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tools/FunctionWhitelist.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/tools/FunctionWhitelist.cpp        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -0,0 +1,100 @@
</span><ins>+/*
+ * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;FunctionWhitelist.h&quot;
+
+#if ENABLE(JIT)
+
+#include &quot;CodeBlock.h&quot;
+#include &quot;Options.h&quot;
+#include &lt;stdio.h&gt;
+#include &lt;string.h&gt;
+#include &lt;wtf/text/StringBuilder.h&gt;
+
+namespace JSC {
+
+FunctionWhitelist::FunctionWhitelist(const char* filename)
+{
+    if (!filename)
+        return;
+
+    FILE* f = fopen(filename, &quot;r&quot;);
+    if (!f) {
+        dataLogF(&quot;Failed to open file %s. Did you add the file-read-data entitlement to WebProcess.sb?\n&quot;, filename); 
+        return;
+    }
+
+    m_hasActiveWhitelist = true;
+
+    char* line;
+    char buffer[BUFSIZ];
+    while ((line = fgets(buffer, sizeof(buffer), f))) {
+        if (strstr(line, &quot;//&quot;) == line)
+            continue;
+
+        // Get rid of newlines at the ends of the strings.
+        size_t length = strlen(line);
+        if (line[length - 1] == '\n') {
+            line[length - 1] = '\0';
+            length--;
+        }
+
+        // Skip empty lines.
+        if (!length)
+            continue;
+        
+        m_entries.add(String(line, length));
+    }
+
+    int result = fclose(f);
+    if (result)
+        dataLogF(&quot;Failed to close file %s: %s\n&quot;, filename, strerror(errno));
+}
+
+bool FunctionWhitelist::contains(CodeBlock* codeBlock) const
+{
+    ASSERT(!isCompilationThread());
+    if (!m_hasActiveWhitelist)
+        return true;
+
+    if (m_entries.isEmpty())
+        return false;
+
+    String name = String::fromUTF8(codeBlock-&gt;inferredName());
+    if (m_entries.contains(name))
+        return true;
+
+    String hash = String::fromUTF8(codeBlock-&gt;hashAsStringIfPossible());
+    if (m_entries.contains(hash))
+        return true;
+
+    return m_entries.contains(name + '#' + hash);
+}
+
+} // namespace JSC
+
+#endif // ENABLE(JIT)
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoretoolsFunctionWhitelisthfromrev200530trunkSourceJavaScriptCoredfgDFGFunctionWhitelisth"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/tools/FunctionWhitelist.h (from rev 200530, trunk/Source/JavaScriptCore/dfg/DFGFunctionWhitelist.h) (0 => 200543)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tools/FunctionWhitelist.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/tools/FunctionWhitelist.h        2016-05-07 16:20:16 UTC (rev 200543)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FunctionWhitelist_h
+#define FunctionWhitelist_h
+
+#include &lt;wtf/HashSet.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace JSC { 
+
+class CodeBlock;
+
+class FunctionWhitelist {
+public:
+    explicit FunctionWhitelist(const char*);
+
+    bool contains(CodeBlock*) const;
+
+private:
+    HashSet&lt;String&gt; m_entries;
+    bool m_hasActiveWhitelist { false };
+};
+
+} // namespace JSC
+
+#endif // FunctionWhitelist_h
</ins></span></pre>
</div>
</div>

</body>
</html>