<!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>[198600] 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/198600">198600</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-23 15:33:17 -0700 (Wed, 23 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/198582">r198582</a>.
https://bugs.webkit.org/show_bug.cgi?id=155812

&quot;It broke debugging in the web inspector&quot; (Requested by
saamyjoon on #webkit).

Reverted changeset:

&quot;We should not disable inlining when the debugger is enabled&quot;
https://bugs.webkit.org/show_bug.cgi?id=155741
http://trac.webkit.org/changeset/198582</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>Removed 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 (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/LayoutTests/ChangeLog        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-03-23  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r198582.
+        https://bugs.webkit.org/show_bug.cgi?id=155812
+
+        &quot;It broke debugging in the web inspector&quot; (Requested by
+        saamyjoon on #webkit).
+
+        Reverted changeset:
+
+        &quot;We should not disable inlining when the debugger is enabled&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=155741
+        http://trac.webkit.org/changeset/198582
+
</ins><span class="cx"> 2016-03-23  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ASSERTION FAILED: y2 &gt;= y1 in WebCore::RenderElement::drawLineForBoxSide
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointwithinliningexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining-expected.txt (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining-expected.txt        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining-expected.txt        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-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!
-
</del></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointwithinlininghtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining.html (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining.html        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-with-inlining.html        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -1,62 +0,0 @@
</span><del>-&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;
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-03-23  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r198582.
+        https://bugs.webkit.org/show_bug.cgi?id=155812
+
+        &quot;It broke debugging in the web inspector&quot; (Requested by
+        saamyjoon on #webkit).
+
+        Reverted changeset:
+
+        &quot;We should not disable inlining when the debugger is enabled&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=155741
+        http://trac.webkit.org/changeset/198582
+
</ins><span class="cx"> 2016-03-23  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         JavaScriptCore ArrayPrototype::join shouldn't cache butterfly when it makes effectful calls
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.cpp (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -23,11 +23,9 @@
</span><span class="cx"> #include &quot;Debugger.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CodeBlock.h&quot;
</span><del>-#include &quot;DFGCommonData.h&quot;
</del><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><del>-#include &quot;InlineCallFrame.h&quot;
</del><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">@@ -250,64 +248,40 @@
</span><span class="cx"> 
</span><span class="cx"> void Debugger::toggleBreakpoint(CodeBlock* codeBlock, Breakpoint&amp; breakpoint, BreakpointState enabledOrNot)
</span><span class="cx"> {
</span><del>-    auto isBreakpointInCodeBlock = [&amp;] (CodeBlock* codeBlock) -&gt; bool {
-        ScriptExecutable* executable = codeBlock-&gt;ownerScriptExecutable();
</del><ins>+    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 false;
</del><ins>+    SourceID sourceID = static_cast&lt;SourceID&gt;(executable-&gt;sourceID());
+    if (breakpoint.sourceID != sourceID)
+        return;
</ins><span class="cx"> 
</span><del>-        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;
</del><ins>+    unsigned line = breakpoint.line;
+    unsigned column = breakpoint.column;
</ins><span class="cx"> 
</span><del>-        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;
-        }
</del><ins>+    unsigned startLine = executable-&gt;firstLine();
+    unsigned startColumn = executable-&gt;startColumn();
+    unsigned endLine = executable-&gt;lastLine();
+    unsigned endColumn = executable-&gt;endColumn();
</ins><span class="cx"> 
</span><del>-        if (!codeBlock-&gt;hasOpDebugForLineAndColumn(line, column))
-            return false;
</del><ins>+    // 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;
</ins><span class="cx"> 
</span><del>-        return true;
-    };
-
-    if (isBreakpointInCodeBlock(codeBlock)) {
-        if (enabledOrNot == BreakpointEnabled)
-            codeBlock-&gt;addBreakpoint(1);
-        else
-            codeBlock-&gt;removeBreakpoint(1);
-
</del><ins>+    if (line &lt; startLine || line &gt; endLine)
</ins><span class="cx">         return;
</span><del>-    } 
-
-#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()))
</del><ins>+    if (column != Breakpoint::unspecifiedColumn) {
+        if (line == startLine &amp;&amp; column &lt; startColumn)
</ins><span class="cx">             return;
</span><del>-        InlineCallFrameSet* inlineCallFrameSet = codeBlock-&gt;jitCode()-&gt;dfgCommon()-&gt;inlineCallFrames.get();
-        if (!inlineCallFrameSet)
</del><ins>+        if (line == endLine &amp;&amp; column &gt; endColumn)
</ins><span class="cx">             return;
</span><del>-        for (InlineCallFrame* inlineCallFrame : *inlineCallFrameSet) {
-            if (isBreakpointInCodeBlock(inlineCallFrame-&gt;baselineCodeBlock.get())) {
-                codeBlock-&gt;jettison(Profiler::JettisonDueToDebuggerBreakpoint);
-                break;
-            }
-        }
</del><span class="cx">     }
</span><del>-#endif // ENABLE(DFG_JIT)
</del><ins>+    if (!codeBlock-&gt;hasOpDebugForLineAndColumn(line, column))
+        return;
+
+    if (enabledOrNot == BreakpointEnabled)
+        codeBlock-&gt;addBreakpoint(1);
+    else
+        codeBlock-&gt;removeBreakpoint(1);
</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 (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -150,6 +150,7 @@
</span><span class="cx">         , m_numPassedVarArgs(0)
</span><span class="cx">         , m_inlineStackTop(0)
</span><span class="cx">         , m_currentInstruction(0)
</span><ins>+        , m_hasDebuggerEnabled(graph.hasDebuggerEnabled())
</ins><span class="cx">     {
</span><span class="cx">         ASSERT(m_profiledBlock);
</span><span class="cx">     }
</span><span class="lines">@@ -446,6 +447,8 @@
</span><span class="cx">             ArgumentPosition* argumentPosition = findArgumentPositionForLocal(operand);
</span><span class="cx">             if (argumentPosition)
</span><span class="cx">                 flushDirect(operand, argumentPosition);
</span><ins>+            else if (m_hasDebuggerEnabled &amp;&amp; operand == m_codeBlock-&gt;scopeRegister())
+                flush(operand);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         VariableAccessData* variableAccessData = newVariableAccessData(operand);
</span><span class="lines">@@ -583,6 +586,7 @@
</span><span class="cx">     {
</span><span class="cx">         int numArguments;
</span><span class="cx">         if (InlineCallFrame* inlineCallFrame = inlineStackEntry-&gt;m_inlineCallFrame) {
</span><ins>+            ASSERT(!m_hasDebuggerEnabled);
</ins><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">@@ -592,6 +596,8 @@
</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><ins>+        if (m_hasDebuggerEnabled)
+            flush(m_codeBlock-&gt;scopeRegister());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     void flushForTerminal()
</span><span class="lines">@@ -1115,6 +1121,7 @@
</span><span class="cx">     StubInfoMap m_dfgStubInfos;
</span><span class="cx">     
</span><span class="cx">     Instruction* m_currentInstruction;
</span><ins>+    bool m_hasDebuggerEnabled;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #define NEXT_OPCODE(name) \
</span><span class="lines">@@ -1287,6 +1294,12 @@
</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><ins>+    if (m_hasDebuggerEnabled) {
+        if (verbose)
+            dataLog(&quot;    Failing because the debugger is in use.\n&quot;);
+        return UINT_MAX;
+    }
+
</ins><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 (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -77,6 +77,9 @@
</span><span class="cx">     , m_refCountState(EverythingIsLive)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_profiledBlock);
</span><ins>+    
+    m_hasDebuggerEnabled = m_profiledBlock-&gt;globalObject()-&gt;hasDebugger()
+        || Options::forceDebuggerBytecodeGeneration();
</ins><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 (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGGraph.h        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/Source/JavaScriptCore/dfg/DFGGraph.h        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -797,6 +797,8 @@
</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><ins>+    bool hasDebuggerEnabled() const { return m_hasDebuggerEnabled; }
+
</ins><span class="cx">     void ensureDominators();
</span><span class="cx">     void ensurePrePostNumbering();
</span><span class="cx">     void ensureNaturalLoops();
</span><span class="lines">@@ -894,6 +896,7 @@
</span><span class="cx">     UnificationState m_unificationState;
</span><span class="cx">     PlanStage m_planStage { PlanStage::Initial };
</span><span class="cx">     RefCountState m_refCountState;
</span><ins>+    bool m_hasDebuggerEnabled;
</ins><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 (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -173,7 +173,10 @@
</span><span class="cx">             data-&gt;machineLocal = assign(allocation, data-&gt;local);
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        codeBlock()-&gt;setScopeRegister(VirtualRegister());
</del><ins>+        if (LIKELY(!m_graph.hasDebuggerEnabled()))
+            codeBlock()-&gt;setScopeRegister(VirtualRegister());
+        else
+            codeBlock()-&gt;setScopeRegister(assign(allocation, codeBlock()-&gt;scopeRegister()));
</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 (198599 => 198600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp        2016-03-23 22:27:42 UTC (rev 198599)
+++ trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp        2016-03-23 22:33:17 UTC (rev 198600)
</span><span class="lines">@@ -102,6 +102,9 @@
</span><span class="cx">             inlineCallFrame-&gt;calleeRecovery =
</span><span class="cx">                 inlineCallFrame-&gt;calleeRecovery.withLocalsOffset(localsOffset);
</span><span class="cx">         }
</span><ins>+
+        if (graph.hasDebuggerEnabled())
+            codeBlock-&gt;setScopeRegister(codeBlock-&gt;scopeRegister() + localsOffset);
</ins><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>