<!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>[198582] trunk</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/198582">198582</a></dd>
<dt>Author</dt> <dd>sbarati@apple.com</dd>
<dt>Date</dt> <dd>2016-03-23 02:15:43 -0700 (Wed, 23 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>We should not disable inlining when the debugger is enabled
https://bugs.webkit.org/show_bug.cgi?id=155741

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

We can enable inlining when the debugger is enabled as long
as we make sure we still jettison the proper CodeBlocks when
a breakpoint is set. This means that for any optimized CodeBlock,
we must ask if any of its inlinees contain the breakpoint that
is being set. If any inlinees do contain the breakpoint, we must
jettison the machine code block that they are a part of.

* debugger/Debugger.cpp:
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::applyBreakpoints):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::setLocal):
(JSC::DFG::ByteCodeParser::flush):
(JSC::DFG::ByteCodeParser::flushForTerminal):
(JSC::DFG::ByteCodeParser::inliningCost):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
(JSC::DFG::Graph::~Graph):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::hasDebuggerEnabled): Deleted.
* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::StackLayoutPhase::run):
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):

LayoutTests:

* inspector/debugger/breakpoint-with-inlining-expected.txt: Added.
* inspector/debugger/breakpoint-with-inlining.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggercpp">trunk/Source/JavaScriptCore/debugger/Debugger.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp">trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGGraphcpp">trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGGraphh">trunk/Source/JavaScriptCore/dfg/DFGGraph.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGStackLayoutPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLCompilecpp">trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointwithinliningexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointwithinlininghtml">trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (198581 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-23 09:11:56 UTC (rev 198581)
+++ trunk/LayoutTests/ChangeLog        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-03-23  Saam barati  &lt;sbarati@apple.com&gt;
+
+        We should not disable inlining when the debugger is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=155741
+
+        Reviewed by Oliver Hunt.
+
+        * inspector/debugger/breakpoint-with-inlining-expected.txt: Added.
+        * inspector/debugger/breakpoint-with-inlining.html: Added.
+
</ins><span class="cx"> 2016-03-22  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Tiny tweak to test I just landed.
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointwithinliningexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining-expected.txt (0 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining-expected.txt        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Debugger.setBreakpoint on line:column in &lt;script&gt;
+
+Found &lt;script&gt;
+Running testInlining() without a breakpoint to get it DFG or FTL compiled with foo() inlined.
+Running testInlining() again with a breakpoint set at foo().
+We paused all 10 times as expected!
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointwithinlininghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining.html (0 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining.html        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../http/tests/inspector/resources/protocol-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+// Put this here instead of on &lt;body onload&gt; to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+    // This test sets a breakpoint on line:column in the &lt;script&gt; below.
+    // We first warm the function up to get foo inlined. Then we set a breakpoint
+    // and make sure that we hit it.
+
+    InspectorProtocol.sendCommand(&quot;Debugger.enable&quot;, {});
+
+    InspectorProtocol.eventHandler[&quot;Debugger.scriptParsed&quot;] = function(messageObject)
+    {
+        if (/breakpoint-with-inlining\.html$/.test(messageObject.params.url) &amp;&amp; messageObject.params.startLine &gt; 10) {
+            ProtocolTest.log(&quot;Found &lt;script&gt;&quot;);
+            var scriptIdentifier = messageObject.params.scriptId;
+            var lineNumber = messageObject.params.startLine + 2;
+            var columnNumber = 4;
+            var location = {scriptId: scriptIdentifier, lineNumber: lineNumber, columnNumber: columnNumber};
+
+            ProtocolTest.log(&quot;Running testInlining() without a breakpoint to get it DFG or FTL compiled with foo() inlined.&quot;);
+
+            InspectorProtocol.sendCommand(&quot;Runtime.evaluate&quot;, {expression: &quot;testInlining(100000)&quot;}, function() {
+                InspectorProtocol.sendCommand(&quot;Debugger.setBreakpoint&quot;, {location: location}, function() {
+                    ProtocolTest.log(&quot;Running testInlining() again with a breakpoint set at foo().&quot;);
+                    InspectorProtocol.sendCommand(&quot;Runtime.evaluate&quot;, {expression: &quot;testInlining(10)&quot;});
+                });
+            });
+        }
+    }
+
+    let iters = 0;
+    InspectorProtocol.eventHandler[&quot;Debugger.paused&quot;] = function(messageObject)
+    {
+        InspectorProtocol.sendCommand(&quot;Debugger.resume&quot;, {});
+
+        iters++;
+        if (iters === 10) {
+            ProtocolTest.log(&quot;We paused all 10 times as expected!&quot;);
+            ProtocolTest.completeTest();
+        }
+    }
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p&gt;Debugger.setBreakpoint on line:column in &amp;lt;script&amp;gt;&lt;/p&gt;
+&lt;script&gt;          // Line 0
+function foo(i) { // Line 1;
+    return i*2;   // Line 2;
+}
+function testInlining(iters) {
+    for (let i = 0; i &lt; iters; i++)
+        foo(i);
+}
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (198581 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-03-23 09:11:56 UTC (rev 198581)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2016-03-23  Saam barati  &lt;sbarati@apple.com&gt;
+
+        We should not disable inlining when the debugger is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=155741
+
+        Reviewed by Oliver Hunt.
+
+        We can enable inlining when the debugger is enabled as long
+        as we make sure we still jettison the proper CodeBlocks when
+        a breakpoint is set. This means that for any optimized CodeBlock,
+        we must ask if any of its inlinees contain the breakpoint that
+        is being set. If any inlinees do contain the breakpoint, we must
+        jettison the machine code block that they are a part of.
+
+        * debugger/Debugger.cpp:
+        (JSC::Debugger::toggleBreakpoint):
+        (JSC::Debugger::applyBreakpoints):
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::ByteCodeParser):
+        (JSC::DFG::ByteCodeParser::setLocal):
+        (JSC::DFG::ByteCodeParser::flush):
+        (JSC::DFG::ByteCodeParser::flushForTerminal):
+        (JSC::DFG::ByteCodeParser::inliningCost):
+        * dfg/DFGGraph.cpp:
+        (JSC::DFG::Graph::Graph):
+        (JSC::DFG::Graph::~Graph):
+        * dfg/DFGGraph.h:
+        (JSC::DFG::Graph::hasDebuggerEnabled): Deleted.
+        * dfg/DFGStackLayoutPhase.cpp:
+        (JSC::DFG::StackLayoutPhase::run):
+        * ftl/FTLCompile.cpp:
+        (JSC::FTL::compile):
+
</ins><span class="cx"> 2016-03-23  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ES6] Allow undefined/null for Symbol.search and Symbol.match
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.cpp (198581 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-03-23 09:11:56 UTC (rev 198581)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -23,9 +23,11 @@
</span><span class="cx"> #include &quot;Debugger.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CodeBlock.h&quot;
</span><ins>+#include &quot;DFGCommonData.h&quot;
</ins><span class="cx"> #include &quot;DebuggerCallFrame.h&quot;
</span><span class="cx"> #include &quot;Error.h&quot;
</span><span class="cx"> #include &quot;HeapIterationScope.h&quot;
</span><ins>+#include &quot;InlineCallFrame.h&quot;
</ins><span class="cx"> #include &quot;Interpreter.h&quot;
</span><span class="cx"> #include &quot;JSCJSValueInlines.h&quot;
</span><span class="cx"> #include &quot;JSFunction.h&quot;
</span><span class="lines">@@ -248,40 +250,64 @@
</span><span class="cx"> 
</span><span class="cx"> void Debugger::toggleBreakpoint(CodeBlock* codeBlock, Breakpoint&amp; breakpoint, BreakpointState enabledOrNot)
</span><span class="cx"> {
</span><del>-    ScriptExecutable* executable = codeBlock-&gt;ownerScriptExecutable();
</del><ins>+    auto isBreakpointInCodeBlock = [&amp;] (CodeBlock* codeBlock) -&gt; bool {
+        ScriptExecutable* executable = codeBlock-&gt;ownerScriptExecutable();
</ins><span class="cx"> 
</span><del>-    SourceID sourceID = static_cast&lt;SourceID&gt;(executable-&gt;sourceID());
-    if (breakpoint.sourceID != sourceID)
-        return;
</del><ins>+        SourceID sourceID = static_cast&lt;SourceID&gt;(executable-&gt;sourceID());
+        if (breakpoint.sourceID != sourceID)
+            return false;
</ins><span class="cx"> 
</span><del>-    unsigned line = breakpoint.line;
-    unsigned column = breakpoint.column;
</del><ins>+        unsigned line = breakpoint.line;
+        unsigned column = breakpoint.column;
+        
+        unsigned startLine = executable-&gt;firstLine();
+        unsigned startColumn = executable-&gt;startColumn();
+        unsigned endLine = executable-&gt;lastLine();
+        unsigned endColumn = executable-&gt;endColumn();
+        line += 1;
+        column = column ? column + 1 : Breakpoint::unspecifiedColumn;
</ins><span class="cx"> 
</span><del>-    unsigned startLine = executable-&gt;firstLine();
-    unsigned startColumn = executable-&gt;startColumn();
-    unsigned endLine = executable-&gt;lastLine();
-    unsigned endColumn = executable-&gt;endColumn();
</del><ins>+        if (line &lt; startLine || line &gt; endLine)
+            return false;
+        if (column != Breakpoint::unspecifiedColumn) {
+            if (line == startLine &amp;&amp; column &lt; startColumn)
+                return false;
+            if (line == endLine &amp;&amp; column &gt; endColumn)
+                return false;
+        }
</ins><span class="cx"> 
</span><del>-    // Inspector breakpoint line and column values are zero-based but the executable
-    // and CodeBlock line and column values are one-based.
-    line += 1;
-    column = column ? column + 1 : Breakpoint::unspecifiedColumn;
</del><ins>+        if (!codeBlock-&gt;hasOpDebugForLineAndColumn(line, column))
+            return false;
</ins><span class="cx"> 
</span><del>-    if (line &lt; startLine || line &gt; endLine)
</del><ins>+        return true;
+    };
+
+    if (isBreakpointInCodeBlock(codeBlock)) {
+        if (enabledOrNot == BreakpointEnabled)
+            codeBlock-&gt;addBreakpoint(1);
+        else
+            codeBlock-&gt;removeBreakpoint(1);
+
</ins><span class="cx">         return;
</span><del>-    if (column != Breakpoint::unspecifiedColumn) {
-        if (line == startLine &amp;&amp; column &lt; startColumn)
</del><ins>+    } 
+
+#if ENABLE(DFG_JIT)
+    if (enabledOrNot == BreakpointEnabled) {
+        // See if any of our inlinees contain the breakpoint. We only care about this
+        // when we set a breakpoint.
+        if (!JITCode::isOptimizingJIT(codeBlock-&gt;jitType()))
</ins><span class="cx">             return;
</span><del>-        if (line == endLine &amp;&amp; column &gt; endColumn)
</del><ins>+        InlineCallFrameSet* inlineCallFrameSet = codeBlock-&gt;jitCode()-&gt;dfgCommon()-&gt;inlineCallFrames.get();
+        if (!inlineCallFrameSet)
</ins><span class="cx">             return;
</span><ins>+        for (InlineCallFrame* inlineCallFrame : *inlineCallFrameSet) {
+            if (isBreakpointInCodeBlock(inlineCallFrame-&gt;baselineCodeBlock.get())) {
+                codeBlock-&gt;jettison(Profiler::JettisonDueToDebuggerBreakpoint);
+                break;
+            }
+        }
</ins><span class="cx">     }
</span><del>-    if (!codeBlock-&gt;hasOpDebugForLineAndColumn(line, column))
-        return;
-
-    if (enabledOrNot == BreakpointEnabled)
-        codeBlock-&gt;addBreakpoint(1);
-    else
-        codeBlock-&gt;removeBreakpoint(1);
</del><ins>+#endif // ENABLE(DFG_JIT)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Debugger::applyBreakpoints(CodeBlock* codeBlock)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp (198581 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-03-23 09:11:56 UTC (rev 198581)
+++ trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -150,7 +150,6 @@
</span><span class="cx">         , m_numPassedVarArgs(0)
</span><span class="cx">         , m_inlineStackTop(0)
</span><span class="cx">         , m_currentInstruction(0)
</span><del>-        , m_hasDebuggerEnabled(graph.hasDebuggerEnabled())
</del><span class="cx">     {
</span><span class="cx">         ASSERT(m_profiledBlock);
</span><span class="cx">     }
</span><span class="lines">@@ -447,8 +446,6 @@
</span><span class="cx">             ArgumentPosition* argumentPosition = findArgumentPositionForLocal(operand);
</span><span class="cx">             if (argumentPosition)
</span><span class="cx">                 flushDirect(operand, argumentPosition);
</span><del>-            else if (m_hasDebuggerEnabled &amp;&amp; operand == m_codeBlock-&gt;scopeRegister())
-                flush(operand);
</del><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         VariableAccessData* variableAccessData = newVariableAccessData(operand);
</span><span class="lines">@@ -586,7 +583,6 @@
</span><span class="cx">     {
</span><span class="cx">         int numArguments;
</span><span class="cx">         if (InlineCallFrame* inlineCallFrame = inlineStackEntry-&gt;m_inlineCallFrame) {
</span><del>-            ASSERT(!m_hasDebuggerEnabled);
</del><span class="cx">             numArguments = inlineCallFrame-&gt;arguments.size();
</span><span class="cx">             if (inlineCallFrame-&gt;isClosureCall)
</span><span class="cx">                 flushDirect(inlineStackEntry-&gt;remapOperand(VirtualRegister(JSStack::Callee)));
</span><span class="lines">@@ -596,8 +592,6 @@
</span><span class="cx">             numArguments = inlineStackEntry-&gt;m_codeBlock-&gt;numParameters();
</span><span class="cx">         for (unsigned argument = numArguments; argument-- &gt; 1;)
</span><span class="cx">             flushDirect(inlineStackEntry-&gt;remapOperand(virtualRegisterForArgument(argument)));
</span><del>-        if (m_hasDebuggerEnabled)
-            flush(m_codeBlock-&gt;scopeRegister());
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     void flushForTerminal()
</span><span class="lines">@@ -1121,7 +1115,6 @@
</span><span class="cx">     StubInfoMap m_dfgStubInfos;
</span><span class="cx">     
</span><span class="cx">     Instruction* m_currentInstruction;
</span><del>-    bool m_hasDebuggerEnabled;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #define NEXT_OPCODE(name) \
</span><span class="lines">@@ -1294,12 +1287,6 @@
</span><span class="cx">     if (verbose)
</span><span class="cx">         dataLog(&quot;Considering inlining &quot;, callee, &quot; into &quot;, currentCodeOrigin(), &quot;\n&quot;);
</span><span class="cx">     
</span><del>-    if (m_hasDebuggerEnabled) {
-        if (verbose)
-            dataLog(&quot;    Failing because the debugger is in use.\n&quot;);
-        return UINT_MAX;
-    }
-
</del><span class="cx">     FunctionExecutable* executable = callee.functionExecutable();
</span><span class="cx">     if (!executable) {
</span><span class="cx">         if (verbose)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGGraphcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp (198581 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-03-23 09:11:56 UTC (rev 198581)
+++ trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -77,9 +77,6 @@
</span><span class="cx">     , m_refCountState(EverythingIsLive)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_profiledBlock);
</span><del>-    
-    m_hasDebuggerEnabled = m_profiledBlock-&gt;globalObject()-&gt;hasDebugger()
-        || Options::forceDebuggerBytecodeGeneration();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Graph::~Graph()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGGraphh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGGraph.h (198581 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGGraph.h        2016-03-23 09:11:56 UTC (rev 198581)
+++ trunk/Source/JavaScriptCore/dfg/DFGGraph.h        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -797,8 +797,6 @@
</span><span class="cx">         BasicBlock*, const char* file, int line, const char* function,
</span><span class="cx">         const char* assertion);
</span><span class="cx"> 
</span><del>-    bool hasDebuggerEnabled() const { return m_hasDebuggerEnabled; }
-
</del><span class="cx">     void ensureDominators();
</span><span class="cx">     void ensurePrePostNumbering();
</span><span class="cx">     void ensureNaturalLoops();
</span><span class="lines">@@ -896,7 +894,6 @@
</span><span class="cx">     UnificationState m_unificationState;
</span><span class="cx">     PlanStage m_planStage { PlanStage::Initial };
</span><span class="cx">     RefCountState m_refCountState;
</span><del>-    bool m_hasDebuggerEnabled;
</del><span class="cx">     bool m_hasExceptionHandlers { false };
</span><span class="cx"> private:
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGStackLayoutPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp (198581 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp        2016-03-23 09:11:56 UTC (rev 198581)
+++ trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -173,10 +173,7 @@
</span><span class="cx">             data-&gt;machineLocal = assign(allocation, data-&gt;local);
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        if (LIKELY(!m_graph.hasDebuggerEnabled()))
-            codeBlock()-&gt;setScopeRegister(VirtualRegister());
-        else
-            codeBlock()-&gt;setScopeRegister(assign(allocation, codeBlock()-&gt;scopeRegister()));
</del><ins>+        codeBlock()-&gt;setScopeRegister(VirtualRegister());
</ins><span class="cx"> 
</span><span class="cx">         for (unsigned i = m_graph.m_inlineVariableData.size(); i--;) {
</span><span class="cx">             InlineVariableData data = m_graph.m_inlineVariableData[i];
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLCompilecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp (198581 => 198582)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp        2016-03-23 09:11:56 UTC (rev 198581)
+++ trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp        2016-03-23 09:15:43 UTC (rev 198582)
</span><span class="lines">@@ -102,9 +102,6 @@
</span><span class="cx">             inlineCallFrame-&gt;calleeRecovery =
</span><span class="cx">                 inlineCallFrame-&gt;calleeRecovery.withLocalsOffset(localsOffset);
</span><span class="cx">         }
</span><del>-
-        if (graph.hasDebuggerEnabled())
-            codeBlock-&gt;setScopeRegister(codeBlock-&gt;scopeRegister() + localsOffset);
</del><span class="cx">     }
</span><span class="cx">     for (OSRExitDescriptor&amp; descriptor : state.jitCode-&gt;osrExitDescriptors) {
</span><span class="cx">         for (unsigned i = descriptor.m_values.size(); i--;)
</span></span></pre>
</div>
</div>

</body>
</html>