<!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>[150807] branches/dfgFourthTier</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/150807">150807</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2013-05-28 10:08:51 -0700 (Tue, 28 May 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>testRunner should be able to tell you if a function is DFG compiled
https://bugs.webkit.org/show_bug.cgi?id=116847

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore: 

* API/JSCTestRunnerUtils.cpp: Added.
(JSC):
(JSC::numberOfDFGCompiles):
* API/JSCTestRunnerUtils.h: Added.
(JSC):
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::numberOfDFGCompiles):
(JSC):
* bytecode/CodeBlock.h:
(CodeBlock):
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::runThread):
* runtime/Executable.h:
(JSC):
* runtime/JSFunctionInlines.h: Added.
(JSC):
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::jsExecutable):
(JSC::JSFunction::isHostFunction):
(JSC::JSFunction::nativeFunction):
(JSC::JSFunction::nativeConstructor):
* runtime/Operations.h:

Source/WebCore: 

Bail early if we're in the compilation thread. This is only relevant for
debug dumps.

No new tests becase no new behavior.

* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script):

Tools: 

* DumpRenderTree/TestRunner.cpp:
(numberOfDFGCompiles):
(TestRunner::staticFunctions):

LayoutTests: 

* fast/js/script-tests/dfg-min-max.js:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesdfgFourthTierLayoutTestsChangeLog">branches/dfgFourthTier/LayoutTests/ChangeLog</a></li>
<li><a href="#branchesdfgFourthTierLayoutTestsfastjsscripttestsdfgminmaxjs">branches/dfgFourthTier/LayoutTests/fast/js/script-tests/dfg-min-max.js</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreChangeLog">branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">branches/dfgFourthTier/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCorebytecodeCodeBlockcpp">branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCorebytecodeCodeBlockh">branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoredfgDFGWorklistcpp">branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGWorklist.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreruntimeExecutableh">branches/dfgFourthTier/Source/JavaScriptCore/runtime/Executable.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreruntimeOperationsh">branches/dfgFourthTier/Source/JavaScriptCore/runtime/Operations.h</a></li>
<li><a href="#branchesdfgFourthTierSourceWebCoreChangeLog">branches/dfgFourthTier/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchesdfgFourthTierSourceWebCoreloadercacheCachedScriptcpp">branches/dfgFourthTier/Source/WebCore/loader/cache/CachedScript.cpp</a></li>
<li><a href="#branchesdfgFourthTierToolsChangeLog">branches/dfgFourthTier/Tools/ChangeLog</a></li>
<li><a href="#branchesdfgFourthTierToolsDumpRenderTreeTestRunnercpp">branches/dfgFourthTier/Tools/DumpRenderTree/TestRunner.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreAPIJSCTestRunnerUtilscpp">branches/dfgFourthTier/Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreAPIJSCTestRunnerUtilsh">branches/dfgFourthTier/Source/JavaScriptCore/API/JSCTestRunnerUtils.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreruntimeJSFunctionInlinesh">branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSFunctionInlines.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesdfgFourthTierLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/LayoutTests/ChangeLog (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/LayoutTests/ChangeLog        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/LayoutTests/ChangeLog        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -1,5 +1,14 @@
</span><span class="cx"> 2013-05-27  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        testRunner should be able to tell you if a function is DFG compiled
+        https://bugs.webkit.org/show_bug.cgi?id=116847
+
+        Reviewed by Mark Hahnenberg.
+
+        * fast/js/script-tests/dfg-min-max.js:
+
+2013-05-27  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
</ins><span class="cx">         fourthTier: DFG ArithMod should have the !nodeUsedAsNumber optimizations that ArithDiv has
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=116841
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesdfgFourthTierLayoutTestsfastjsscripttestsdfgminmaxjs"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/LayoutTests/fast/js/script-tests/dfg-min-max.js (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/LayoutTests/fast/js/script-tests/dfg-min-max.js        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/LayoutTests/fast/js/script-tests/dfg-min-max.js        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -10,9 +10,11 @@
</span><span class="cx">     return Math.max(a, b);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-for (var i = 0; i &lt; 1000; ++i) {
</del><ins>+var count = 0;
+while (!testRunner.numberOfDFGCompiles(doMin) || !testRunner.numberOfDFGCompiles(doMax)) {
</ins><span class="cx">     doMin(1.5, 2.5);
</span><span class="cx">     doMax(1.5, 2.5);
</span><ins>+    count++;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> shouldBe(&quot;doMin(1.5, 2.5)&quot;, &quot;1.5&quot;);
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreAPIJSCTestRunnerUtilscpp"></a>
<div class="addfile"><h4>Added: branches/dfgFourthTier/Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp (0 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp                                (rev 0)
+++ branches/dfgFourthTier/Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include &quot;config.h&quot;
+#include &quot;JSCTestRunnerUtils.h&quot;
+
+#include &quot;APICast.h&quot;
+#include &quot;CodeBlock.h&quot;
+#include &quot;Operations.h&quot;
+
+namespace JSC {
+
+JSValueRef numberOfDFGCompiles(JSContextRef context, JSValueRef theFunctionValueRef)
+{
+    ExecState* exec = toJS(context);
+    JSValue theFunctionValue = toJS(exec, theFunctionValueRef);
+    
+    JSFunction* theFunction = jsDynamicCast&lt;JSFunction*&gt;(theFunctionValue);
+    if (!theFunction)
+        return JSValueMakeUndefined(context);
+    
+    FunctionExecutable* executable = jsDynamicCast&lt;FunctionExecutable*&gt;(
+        theFunction-&gt;executable());
+    if (!executable)
+        return JSValueMakeUndefined(context);
+    
+    CodeBlock* baselineCodeBlock = executable-&gt;baselineCodeBlockFor(CodeForCall);
+    
+    if (!baselineCodeBlock)
+        return JSValueMakeNumber(context, 0);
+    
+    return JSValueMakeNumber(context, baselineCodeBlock-&gt;numberOfDFGCompiles());
+}
+
+} // namespace JSC
+
</ins></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreAPIJSCTestRunnerUtilsh"></a>
<div class="addfile"><h4>Added: branches/dfgFourthTier/Source/JavaScriptCore/API/JSCTestRunnerUtils.h (0 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/API/JSCTestRunnerUtils.h                                (rev 0)
+++ branches/dfgFourthTier/Source/JavaScriptCore/API/JSCTestRunnerUtils.h        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef JSCTestRunnerUtils_h
+#define JSCTestRunnerUtils_h
+
+#include &lt;JavaScriptCore/JSContextRef.h&gt;
+#include &lt;JavaScriptCore/JSValueRef.h&gt;
+
+namespace JSC {
+
+JS_EXPORT_PRIVATE JSValueRef numberOfDFGCompiles(JSContextRef, JSValueRef theFunction);
+
+} // namespace JSC
+
+#endif // JSCTestRunnerUtils_h
</ins></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -1,5 +1,36 @@
</span><span class="cx"> 2013-05-27  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        testRunner should be able to tell you if a function is DFG compiled
+        https://bugs.webkit.org/show_bug.cgi?id=116847
+
+        Reviewed by Mark Hahnenberg.
+
+        * API/JSCTestRunnerUtils.cpp: Added.
+        (JSC):
+        (JSC::numberOfDFGCompiles):
+        * API/JSCTestRunnerUtils.h: Added.
+        (JSC):
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::numberOfDFGCompiles):
+        (JSC):
+        * bytecode/CodeBlock.h:
+        (CodeBlock):
+        * dfg/DFGWorklist.cpp:
+        (JSC::DFG::Worklist::runThread):
+        * runtime/Executable.h:
+        (JSC):
+        * runtime/JSFunctionInlines.h: Added.
+        (JSC):
+        (JSC::JSFunction::JSFunction):
+        (JSC::JSFunction::jsExecutable):
+        (JSC::JSFunction::isHostFunction):
+        (JSC::JSFunction::nativeFunction):
+        (JSC::JSFunction::nativeConstructor):
+        * runtime/Operations.h:
+
+2013-05-27  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
</ins><span class="cx">         fourthTier: DFG ArithMod should have the !nodeUsedAsNumber optimizations that ArithDiv has
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=116841
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -116,6 +116,7 @@
</span><span class="cx">                 0F235BEC17178E7300690C7F /* DFGOSRExitBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F235BE817178E7300690C7F /* DFGOSRExitBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F235BED17178E7300690C7F /* DFGOSRExitPreparation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F235BE917178E7300690C7F /* DFGOSRExitPreparation.cpp */; };
</span><span class="cx">                 0F235BEE17178E7300690C7F /* DFGOSRExitPreparation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F235BEA17178E7300690C7F /* DFGOSRExitPreparation.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                0F23BA9517541DBC00C48CFE /* JSFunctionInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F23BA9417541DBC00C48CFE /* JSFunctionInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0F242DA713F3B1E8007ADD4C /* WeakReferenceHarvester.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F256C341627B0AA007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F2BDC15151C5D4D00CD8910 /* DFGFixupPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2BDC12151C5D4A00CD8910 /* DFGFixupPhase.cpp */; };
</span><span class="lines">@@ -178,6 +179,8 @@
</span><span class="cx">                 0F56A1D315000F35002992B1 /* ExecutionCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F56A1D115000F31002992B1 /* ExecutionCounter.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F56A1D515001CF4002992B1 /* ExecutionCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F56A1D415001CF2002992B1 /* ExecutionCounter.cpp */; };
</span><span class="cx">                 0F572D4F16879FDD00E57FBD /* ThunkGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F572D4D16879FDB00E57FBD /* ThunkGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                0F5EE4E8175424AF009AE42D /* JSCTestRunnerUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5EE4E6175424AF009AE42D /* JSCTestRunnerUtils.cpp */; };
+                0F5EE4E9175424AF009AE42D /* JSCTestRunnerUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5EE4E7175424AF009AE42D /* JSCTestRunnerUtils.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0F5EF91E16878F7A003E5C25 /* JITThunks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5EF91B16878F78003E5C25 /* JITThunks.cpp */; };
</span><span class="cx">                 0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5EF91C16878F78003E5C25 /* JITThunks.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F5F08CF146C7633000472A9 /* UnconditionalFinalizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1113,6 +1116,7 @@
</span><span class="cx">                 0F235BE817178E7300690C7F /* DFGOSRExitBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGOSRExitBase.h; path = dfg/DFGOSRExitBase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F235BE917178E7300690C7F /* DFGOSRExitPreparation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGOSRExitPreparation.cpp; path = dfg/DFGOSRExitPreparation.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F235BEA17178E7300690C7F /* DFGOSRExitPreparation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGOSRExitPreparation.h; path = dfg/DFGOSRExitPreparation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0F23BA9417541DBC00C48CFE /* JSFunctionInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFunctionInlines.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakReferenceHarvester.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F256C341627B0AA007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCallArrayAllocatorSlowPathGenerator.h; path = dfg/DFGCallArrayAllocatorSlowPathGenerator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F2BDC12151C5D4A00CD8910 /* DFGFixupPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGFixupPhase.cpp; path = dfg/DFGFixupPhase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1174,6 +1178,8 @@
</span><span class="cx">                 0F56A1D115000F31002992B1 /* ExecutionCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutionCounter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F56A1D415001CF2002992B1 /* ExecutionCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionCounter.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F572D4D16879FDB00E57FBD /* ThunkGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThunkGenerator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0F5EE4E6175424AF009AE42D /* JSCTestRunnerUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCTestRunnerUtils.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F5EE4E7175424AF009AE42D /* JSCTestRunnerUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCTestRunnerUtils.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0F5EF91B16878F78003E5C25 /* JITThunks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITThunks.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F5EF91C16878F78003E5C25 /* JITThunks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITThunks.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnconditionalFinalizer.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2426,6 +2432,8 @@
</span><span class="cx">                                 1CAA8B4B0D32C39A0041BCFF /* JavaScriptCore.h */,
</span><span class="cx">                                 BC0894D50FAFBA2D00001865 /* JSAPIValueWrapper.cpp */,
</span><span class="cx">                                 BC0894D60FAFBA2D00001865 /* JSAPIValueWrapper.h */,
</span><ins>+                                C2CF39BF16E15A8100DD69BE /* JSAPIWrapperObject.cpp */,
+                                C2CF39C016E15A8100DD69BE /* JSAPIWrapperObject.h */,
</ins><span class="cx">                                 1421359A0A677F4F00A8195E /* JSBase.cpp */,
</span><span class="cx">                                 142711380A460BBB0080EEEA /* JSBase.h */,
</span><span class="cx">                                 140D17D60E8AD4A9000CD17D /* JSBasePrivate.h */,
</span><span class="lines">@@ -2444,7 +2452,11 @@
</span><span class="cx">                                 14BD5A290A3E91F600BAF59C /* JSContextRef.cpp */,
</span><span class="cx">                                 14BD5A2A0A3E91F600BAF59C /* JSContextRef.h */,
</span><span class="cx">                                 148CD1D7108CF902008163C6 /* JSContextRefPrivate.h */,
</span><ins>+                                0F5EE4E6175424AF009AE42D /* JSCTestRunnerUtils.cpp */,
+                                0F5EE4E7175424AF009AE42D /* JSCTestRunnerUtils.h */,
</ins><span class="cx">                                 86E3C60A167BAB87006D760A /* JSExport.h */,
</span><ins>+                                C25D709A16DE99F400FCA6BC /* JSManagedValue.h */,
+                                C25D709916DE99F400FCA6BC /* JSManagedValue.mm */,
</ins><span class="cx">                                 1482B7E20A43076000517CFC /* JSObjectRef.cpp */,
</span><span class="cx">                                 1482B7E10A43076000517CFC /* JSObjectRef.h */,
</span><span class="cx">                                 A79EDB0811531CD60019E912 /* JSObjectRefPrivate.h */,
</span><span class="lines">@@ -2476,10 +2488,6 @@
</span><span class="cx">                                 E124A8F60E555775003091F1 /* OpaqueJSString.cpp */,
</span><span class="cx">                                 E124A8F50E555775003091F1 /* OpaqueJSString.h */,
</span><span class="cx">                                 5DE3D0F40DD8DDFB00468714 /* WebKitAvailability.h */,
</span><del>-                                C25D709916DE99F400FCA6BC /* JSManagedValue.mm */,
-                                C25D709A16DE99F400FCA6BC /* JSManagedValue.h */,
-                                C2CF39BF16E15A8100DD69BE /* JSAPIWrapperObject.cpp */,
-                                C2CF39C016E15A8100DD69BE /* JSAPIWrapperObject.h */,
</del><span class="cx">                         );
</span><span class="cx">                         path = API;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -2706,6 +2714,7 @@
</span><span class="cx">                                 A7B4ACAE1484C9CE00B38A36 /* JSExportMacros.h */,
</span><span class="cx">                                 F692A85E0255597D01FF60F7 /* JSFunction.cpp */,
</span><span class="cx">                                 F692A85F0255597D01FF60F7 /* JSFunction.h */,
</span><ins>+                                0F23BA9417541DBC00C48CFE /* JSFunctionInlines.h */,
</ins><span class="cx">                                 14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */,
</span><span class="cx">                                 A8E894330CD0603F00367179 /* JSGlobalObject.h */,
</span><span class="cx">                                 BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */,
</span><span class="lines">@@ -3545,6 +3554,7 @@
</span><span class="cx">                                 FED287B215EC9A5700DA8161 /* LLIntOpcode.h in Headers */,
</span><span class="cx">                                 0F4680A514BA7F8D00BFE272 /* LLIntSlowPaths.h in Headers */,
</span><span class="cx">                                 0F0B839D14BCF46600885B4F /* LLIntThunks.h in Headers */,
</span><ins>+                                0F23BA9517541DBC00C48CFE /* JSFunctionInlines.h in Headers */,
</ins><span class="cx">                                 142E3139134FF0A600AFADB5 /* Local.h in Headers */,
</span><span class="cx">                                 142E313A134FF0A600AFADB5 /* LocalScope.h in Headers */,
</span><span class="cx">                                 BC18C4370E16F5CD00B34460 /* Lookup.h in Headers */,
</span><span class="lines">@@ -3758,6 +3768,7 @@
</span><span class="cx">                                 0FCCAE4516D0CF7400D0C65B /* ParserError.h in Headers */,
</span><span class="cx">                                 0F714CA516EA92F200F3EBEB /* DFGBackwardsPropagationPhase.h in Headers */,
</span><span class="cx">                                 0F136D4D174AD69E0075B354 /* DeferGC.h in Headers */,
</span><ins>+                                0F5EE4E9175424AF009AE42D /* JSCTestRunnerUtils.h in Headers */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span><span class="lines">@@ -4443,6 +4454,7 @@
</span><span class="cx">                                 0F493AFA16D0CAD30084508B /* SourceProvider.cpp in Sources */,
</span><span class="cx">                                 ADE39FFF16DD144B0003CD4A /* PropertyTable.cpp in Sources */,
</span><span class="cx">                                 0F714CA416EA92F000F3EBEB /* DFGBackwardsPropagationPhase.cpp in Sources */,
</span><ins>+                                0F5EE4E8175424AF009AE42D /* JSCTestRunnerUtils.cpp in Sources */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.cpp (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -3017,6 +3017,12 @@
</span><span class="cx">         m_reoptimizationRetryCounter = Options::reoptimizationRetryCounterMax();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+unsigned CodeBlock::numberOfDFGCompiles()
+{
+    ASSERT(JITCode::isBaselineCode(jitType()));
+    return (JITCode::isOptimizingJIT(replacement()-&gt;jitType()) ? 1 : 0) + m_reoptimizationRetryCounter;
+}
+
</ins><span class="cx"> int32_t CodeBlock::codeTypeThresholdMultiplier() const
</span><span class="cx"> {
</span><span class="cx">     if (codeType() == EvalCode)
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCorebytecodeCodeBlockh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.h (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.h        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.h        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -766,6 +766,8 @@
</span><span class="cx">     // to avoid thrashing.
</span><span class="cx">     unsigned reoptimizationRetryCounter() const;
</span><span class="cx">     void countReoptimization();
</span><ins>+    
+    unsigned numberOfDFGCompiles();
</ins><span class="cx"> 
</span><span class="cx">     int32_t codeTypeThresholdMultiplier() const;
</span><span class="cx">         
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoredfgDFGWorklistcpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGWorklist.cpp (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGWorklist.cpp        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGWorklist.cpp        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -211,6 +211,8 @@
</span><span class="cx"> 
</span><span class="cx"> void Worklist::runThread()
</span><span class="cx"> {
</span><ins>+    CompilationScope compilationScope;
+    
</ins><span class="cx">     if (Options::verboseCompilationQueue())
</span><span class="cx">         dataLog(*this, &quot;: Thread started\n&quot;);
</span><span class="cx">     
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreruntimeExecutableh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/runtime/Executable.h (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/runtime/Executable.h        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Source/JavaScriptCore/runtime/Executable.h        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -780,38 +780,6 @@
</span><span class="cx">         RefPtr&lt;FunctionCodeBlock&gt; m_codeBlockForConstruct;
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    inline JSFunction::JSFunction(VM&amp; vm, FunctionExecutable* executable, JSScope* scope)
-        : Base(vm, scope-&gt;globalObject()-&gt;functionStructure())
-        , m_executable(vm, this, executable)
-        , m_scope(vm, this, scope)
-        , m_allocationProfileWatchpoint(InitializedBlind) // See comment in JSFunction.cpp concerning the reason for using InitializedBlind as opposed to InitializedWatching.
-    {
-    }
-
-    inline FunctionExecutable* JSFunction::jsExecutable() const
-    {
-        ASSERT(!isHostFunctionNonInline());
-        return static_cast&lt;FunctionExecutable*&gt;(m_executable.get());
-    }
-
-    inline bool JSFunction::isHostFunction() const
-    {
-        ASSERT(m_executable);
-        return m_executable-&gt;isHostFunction();
-    }
-
-    inline NativeFunction JSFunction::nativeFunction()
-    {
-        ASSERT(isHostFunction());
-        return static_cast&lt;NativeExecutable*&gt;(m_executable.get())-&gt;function();
-    }
-
-    inline NativeFunction JSFunction::nativeConstructor()
-    {
-        ASSERT(isHostFunction());
-        return static_cast&lt;NativeExecutable*&gt;(m_executable.get())-&gt;constructor();
-    }
-
</del><span class="cx">     inline bool isHostFunction(JSValue value, NativeFunction nativeFunction)
</span><span class="cx">     {
</span><span class="cx">         JSFunction* function = jsCast&lt;JSFunction*&gt;(getJSFunction(value));
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreruntimeJSFunctionInlinesh"></a>
<div class="addfile"><h4>Added: branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSFunctionInlines.h (0 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSFunctionInlines.h                                (rev 0)
+++ branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSFunctionInlines.h        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef JSFunctionInlines_h
+#define JSFunctionInlines_h
+
+#include &quot;Executable.h&quot;
+#include &quot;JSFunction.h&quot;
+
+namespace JSC {
+
+inline JSFunction::JSFunction(VM&amp; vm, FunctionExecutable* executable, JSScope* scope)
+    : Base(vm, scope-&gt;globalObject()-&gt;functionStructure())
+    , m_executable(vm, this, executable)
+    , m_scope(vm, this, scope)
+    , m_allocationProfileWatchpoint(InitializedBlind) // See comment in JSFunction.cpp concerning the reason for using InitializedBlind as opposed to InitializedWatching.
+{
+}
+
+inline FunctionExecutable* JSFunction::jsExecutable() const
+{
+    ASSERT(!isHostFunctionNonInline());
+    return static_cast&lt;FunctionExecutable*&gt;(m_executable.get());
+}
+
+inline bool JSFunction::isHostFunction() const
+{
+    ASSERT(m_executable);
+    return m_executable-&gt;isHostFunction();
+}
+
+inline NativeFunction JSFunction::nativeFunction()
+{
+    ASSERT(isHostFunction());
+    return static_cast&lt;NativeExecutable*&gt;(m_executable.get())-&gt;function();
+}
+
+inline NativeFunction JSFunction::nativeConstructor()
+{
+    ASSERT(isHostFunction());
+    return static_cast&lt;NativeExecutable*&gt;(m_executable.get())-&gt;constructor();
+}
+
+} // namespace JSC
+
+#endif // JSFunctionInlines_h
+
</ins></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreruntimeOperationsh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/runtime/Operations.h (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/runtime/Operations.h        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Source/JavaScriptCore/runtime/Operations.h        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> #include &quot;ExceptionHelpers.h&quot;
</span><span class="cx"> #include &quot;Interpreter.h&quot;
</span><span class="cx"> #include &quot;JSCJSValueInlines.h&quot;
</span><ins>+#include &quot;JSFunctionInlines.h&quot;
</ins><span class="cx"> #include &quot;JSProxy.h&quot;
</span><span class="cx"> #include &quot;JSString.h&quot;
</span><span class="cx"> #include &quot;StructureInlines.h&quot;
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/WebCore/ChangeLog (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/WebCore/ChangeLog        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Source/WebCore/ChangeLog        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2013-05-27  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        testRunner should be able to tell you if a function is DFG compiled
+        https://bugs.webkit.org/show_bug.cgi?id=116847
+
+        Reviewed by Mark Hahnenberg.
+
+        Bail early if we're in the compilation thread. This is only relevant for
+        debug dumps.
+
+        No new tests becase no new behavior.
+
+        * loader/cache/CachedScript.cpp:
+        (WebCore::CachedScript::script):
+
</ins><span class="cx"> 2013-05-25  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove Interpreter::retrieveLastCaller().
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceWebCoreloadercacheCachedScriptcpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/WebCore/loader/cache/CachedScript.cpp (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/WebCore/loader/cache/CachedScript.cpp        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Source/WebCore/loader/cache/CachedScript.cpp        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -70,6 +70,11 @@
</span><span class="cx"> 
</span><span class="cx"> const String&amp; CachedScript::script()
</span><span class="cx"> {
</span><ins>+    if (isCompilationThread()) {
+        RELEASE_ASSERT(m_script);
+        return m_script;
+    }
+    
</ins><span class="cx">     ASSERT(!isPurgeable());
</span><span class="cx"> 
</span><span class="cx">     if (!m_script &amp;&amp; m_data) {
</span></span></pre></div>
<a id="branchesdfgFourthTierToolsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Tools/ChangeLog (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Tools/ChangeLog        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Tools/ChangeLog        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2013-05-27  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        testRunner should be able to tell you if a function is DFG compiled
+        https://bugs.webkit.org/show_bug.cgi?id=116847
+
+        Reviewed by Mark Hahnenberg.
+
+        * DumpRenderTree/TestRunner.cpp:
+        (numberOfDFGCompiles):
+        (TestRunner::staticFunctions):
+
</ins><span class="cx"> 2013-05-21  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         fourthTier: display-profiler-output should make it even easier to diff the compilation story between two different runs
</span></span></pre></div>
<a id="branchesdfgFourthTierToolsDumpRenderTreeTestRunnercpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Tools/DumpRenderTree/TestRunner.cpp (150806 => 150807)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Tools/DumpRenderTree/TestRunner.cpp        2013-05-28 16:03:25 UTC (rev 150806)
+++ branches/dfgFourthTier/Tools/DumpRenderTree/TestRunner.cpp        2013-05-28 17:08:51 UTC (rev 150807)
</span><span class="lines">@@ -32,10 +32,11 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;WorkQueue.h&quot;
</span><span class="cx"> #include &quot;WorkQueueItem.h&quot;
</span><del>-#include &lt;cstring&gt;
</del><span class="cx"> #include &lt;JavaScriptCore/JSContextRef.h&gt;
</span><ins>+#include &lt;JavaScriptCore/JSCTestRunnerUtils.h&gt;
</ins><span class="cx"> #include &lt;JavaScriptCore/JSObjectRef.h&gt;
</span><span class="cx"> #include &lt;JavaScriptCore/JSRetainPtr.h&gt;
</span><ins>+#include &lt;cstring&gt;
</ins><span class="cx"> #include &lt;locale.h&gt;
</span><span class="cx"> #include &lt;stdio.h&gt;
</span><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="lines">@@ -1955,6 +1956,14 @@
</span><span class="cx">     return JSValueMakeUndefined(context);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static JSValueRef numberOfDFGCompiles(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    if (argumentCount &lt; 1)
+        return JSValueMakeUndefined(context);
+    
+    return JSC::numberOfDFGCompiles(context, arguments[0]);
+}
+
</ins><span class="cx"> static void testRunnerObjectFinalize(JSObjectRef object)
</span><span class="cx"> {
</span><span class="cx">     TestRunner* controller = static_cast&lt;TestRunner*&gt;(JSObjectGetPrivate(object));
</span><span class="lines">@@ -2155,6 +2164,7 @@
</span><span class="cx">         { &quot;denyWebNotificationPermission&quot;, denyWebNotificationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;removeAllWebNotificationPermissions&quot;, removeAllWebNotificationPermissionsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;simulateWebNotificationClick&quot;, simulateWebNotificationClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><ins>+        { &quot;numberOfDFGCompiles&quot;, numberOfDFGCompiles, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</ins><span class="cx">         { 0, 0, 0 }
</span><span class="cx">     };
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>