<!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>[162711] trunk/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/162711">162711</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2014-01-24 11:07:31 -0800 (Fri, 24 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Removing the need for Debugger* and m_shouldPause op_debug check.
&lt;https://webkit.org/b/127532&gt;

Reviewed by Geoffrey Garen.

This patch replaces the checking of the Debugger::m_shouldPause flag
with a procedure to set a SteppingMode flag on all CodeBlocks under
the management of the debugger. This simplifies the op_debug checking
logic in all the execution engines.

* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasDebuggerRequests):
(JSC::CodeBlock::debuggerRequestsAddress):
(JSC::CodeBlock::setSteppingMode):
(JSC::CodeBlock::clearDebuggerRequests):
- CodeBlock::m_debuggerRequests is a union of m_numBreakpoints and the
  new m_steppingMode. The debugger can add/remove breakpoints to the
  CodeBlock as well as set the stepping mode. By having
  m_debuggerRequests as a union of the 2 bit fields, the op_debug code
  can now check if any of the 2 requests made on the CodeBlock is still
  in effect just by testing a single int.

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::detach):
- This was bug from before where I forgot to clear the CodeBlock
  breakpoints before detaching. We now take care of it by clearing all
  debugger requests made to the CodeBlock.

(JSC::Debugger::SetSteppingModeFunctor::SetSteppingModeFunctor):
(JSC::Debugger::SetSteppingModeFunctor::operator()):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::ClearCodeBlockDebuggerRequestsFunctor):
(JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::operator()):
(JSC::Debugger::clearBreakpoints):

(JSC::Debugger::ClearDebuggerRequestsFunctor::ClearDebuggerRequestsFunctor):
(JSC::Debugger::ClearDebuggerRequestsFunctor::operator()):
(JSC::Debugger::clearDebuggerRequests):
- We need a distinct clearDebuggerRequests() from clearBreakpoints()
  because:
  1. When we detach a globalObject, we only want to clear the debugger
     requests in CodeBlocks from that global.
  2. Clearing the debugger requests in the CodeBlocks is not the same
     as clearing the breakpoints. The breakpoints are still in effect
     for the next time a globalObject is attached, or for other
     globalObjects that are still attached.

(JSC::Debugger::setPauseOnNextStatement):
(JSC::Debugger::breakProgram):
(JSC::Debugger::stepIntoStatement):
(JSC::Debugger::updateCallFrameAndPauseIfNeeded):
(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::exception):
(JSC::Debugger::willExecuteProgram):
(JSC::Debugger::didReachBreakpoint):
* debugger/Debugger.h:
- We're always going to support the debugger. So, there's no longer
  a need to check ENABLE(JAVASCRIPT_DEBUGGER). Removed the unneeded code.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::debug):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_debug):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_debug):
* llint/LowLevelInterpreter.asm:
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::setDebugger):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockh">trunk/Source/JavaScriptCore/bytecode/CodeBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggercpp">trunk/Source/JavaScriptCore/debugger/Debugger.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggerh">trunk/Source/JavaScriptCore/debugger/Debugger.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpretercpp">trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOpcodescpp">trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOpcodes32_64cpp">trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreterasm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjecth">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -1,3 +1,80 @@
</span><ins>+2014-01-24  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Removing the need for Debugger* and m_shouldPause op_debug check.
+        &lt;https://webkit.org/b/127532&gt;
+
+        Reviewed by Geoffrey Garen.
+
+        This patch replaces the checking of the Debugger::m_shouldPause flag
+        with a procedure to set a SteppingMode flag on all CodeBlocks under
+        the management of the debugger. This simplifies the op_debug checking
+        logic in all the execution engines.
+
+        * bytecode/CodeBlock.cpp:
+        * bytecode/CodeBlock.h:
+        (JSC::CodeBlock::hasDebuggerRequests):
+        (JSC::CodeBlock::debuggerRequestsAddress):
+        (JSC::CodeBlock::setSteppingMode):
+        (JSC::CodeBlock::clearDebuggerRequests):
+        - CodeBlock::m_debuggerRequests is a union of m_numBreakpoints and the
+          new m_steppingMode. The debugger can add/remove breakpoints to the
+          CodeBlock as well as set the stepping mode. By having
+          m_debuggerRequests as a union of the 2 bit fields, the op_debug code
+          can now check if any of the 2 requests made on the CodeBlock is still
+          in effect just by testing a single int.
+
+        * debugger/Debugger.cpp:
+        (JSC::Debugger::Debugger):
+        (JSC::Debugger::detach):
+        - This was bug from before where I forgot to clear the CodeBlock
+          breakpoints before detaching. We now take care of it by clearing all
+          debugger requests made to the CodeBlock.
+
+        (JSC::Debugger::SetSteppingModeFunctor::SetSteppingModeFunctor):
+        (JSC::Debugger::SetSteppingModeFunctor::operator()):
+        (JSC::Debugger::setSteppingMode):
+        (JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::ClearCodeBlockDebuggerRequestsFunctor):
+        (JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::operator()):
+        (JSC::Debugger::clearBreakpoints):
+
+        (JSC::Debugger::ClearDebuggerRequestsFunctor::ClearDebuggerRequestsFunctor):
+        (JSC::Debugger::ClearDebuggerRequestsFunctor::operator()):
+        (JSC::Debugger::clearDebuggerRequests):
+        - We need a distinct clearDebuggerRequests() from clearBreakpoints()
+          because:
+          1. When we detach a globalObject, we only want to clear the debugger
+             requests in CodeBlocks from that global.
+          2. Clearing the debugger requests in the CodeBlocks is not the same
+             as clearing the breakpoints. The breakpoints are still in effect
+             for the next time a globalObject is attached, or for other
+             globalObjects that are still attached.
+
+        (JSC::Debugger::setPauseOnNextStatement):
+        (JSC::Debugger::breakProgram):
+        (JSC::Debugger::stepIntoStatement):
+        (JSC::Debugger::updateCallFrameAndPauseIfNeeded):
+        (JSC::Debugger::pauseIfNeeded):
+        (JSC::Debugger::exception):
+        (JSC::Debugger::willExecuteProgram):
+        (JSC::Debugger::didReachBreakpoint):
+        * debugger/Debugger.h:
+        - We're always going to support the debugger. So, there's no longer
+          a need to check ENABLE(JAVASCRIPT_DEBUGGER). Removed the unneeded code.
+
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::debug):
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::emit_op_debug):
+        * jit/JITOpcodes32_64.cpp:
+        (JSC::JIT::emit_op_debug):
+        * llint/LowLevelInterpreter.asm:
+        * runtime/JSGlobalObject.h:
+        (JSC::JSGlobalObject::setDebugger):
+
</ins><span class="cx"> 2014-01-24  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ARM Offline assembler temporary register allocator has duplicate register when building fat binaries
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -1469,6 +1469,7 @@
</span><span class="cx">     , m_shouldAlwaysBeInlined(true)
</span><span class="cx">     , m_didFailFTLCompilation(false)
</span><span class="cx">     , m_unlinkedCode(*other.m_vm, other.m_ownerExecutable.get(), other.m_unlinkedCode.get())
</span><ins>+    , m_steppingMode(SteppingModeDisabled)
</ins><span class="cx">     , m_numBreakpoints(0)
</span><span class="cx">     , m_ownerExecutable(*other.m_vm, other.m_ownerExecutable.get(), other.m_ownerExecutable.get())
</span><span class="cx">     , m_vm(other.m_vm)
</span><span class="lines">@@ -1524,6 +1525,7 @@
</span><span class="cx">     , m_shouldAlwaysBeInlined(true)
</span><span class="cx">     , m_didFailFTLCompilation(false)
</span><span class="cx">     , m_unlinkedCode(m_globalObject-&gt;vm(), ownerExecutable, unlinkedCodeBlock)
</span><ins>+    , m_steppingMode(SteppingModeDisabled)
</ins><span class="cx">     , m_numBreakpoints(0)
</span><span class="cx">     , m_ownerExecutable(m_globalObject-&gt;vm(), ownerExecutable, ownerExecutable)
</span><span class="cx">     , m_vm(unlinkedCodeBlock-&gt;vm())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.h (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.h        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.h        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -871,18 +871,24 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasOpDebugForLineAndColumn(unsigned line, unsigned column);
</span><span class="cx"> 
</span><del>-    int numBreakpoints() const { return m_numBreakpoints; }
-    static ptrdiff_t numBreakpointsOffset() { return OBJECT_OFFSETOF(CodeBlock, m_numBreakpoints); }
-    void* numBreakpointsAddress() { return &amp;m_numBreakpoints; }
</del><ins>+    int hasDebuggerRequests() const { return !!m_debuggerRequests; }
+    void* debuggerRequestsAddress() { return &amp;m_debuggerRequests; }
</ins><span class="cx"> 
</span><del>-    void addBreakpoint(int numBreakpoints) { m_numBreakpoints += numBreakpoints; }
-    void removeBreakpoint(int numBreakpoints)
</del><ins>+    void addBreakpoint(unsigned numBreakpoints) { m_numBreakpoints += numBreakpoints; }
+    void removeBreakpoint(unsigned numBreakpoints)
</ins><span class="cx">     {
</span><ins>+        ASSERT(m_numBreakpoints &gt; numBreakpoints);
</ins><span class="cx">         m_numBreakpoints -= numBreakpoints;
</span><del>-        ASSERT(m_numBreakpoints &gt;= 0);
</del><span class="cx">     }
</span><del>-    void clearAllBreakpoints() { m_numBreakpoints = 0; }
</del><span class="cx"> 
</span><ins>+    enum SteppingMode {
+        SteppingModeDisabled,
+        SteppingModeEnabled
+    };
+    void setSteppingMode(SteppingMode mode) { m_steppingMode = mode; }
+
+    void clearDebuggerRequests() { m_debuggerRequests = 0; }
+
</ins><span class="cx">     // FIXME: Make these remaining members private.
</span><span class="cx"> 
</span><span class="cx">     int m_numCalleeRegisters;
</span><span class="lines">@@ -1019,7 +1025,13 @@
</span><span class="cx"> #endif
</span><span class="cx">     WriteBarrier&lt;UnlinkedCodeBlock&gt; m_unlinkedCode;
</span><span class="cx">     int m_numParameters;
</span><del>-    int m_numBreakpoints;
</del><ins>+    union {
+        unsigned m_debuggerRequests;
+        struct {
+            unsigned m_steppingMode : 1;
+            unsigned m_numBreakpoints : 31;
+        };
+    };
</ins><span class="cx">     WriteBarrier&lt;ScriptExecutable&gt; m_ownerExecutable;
</span><span class="cx">     VM* m_vm;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.cpp (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -148,13 +148,13 @@
</span><span class="cx">     , m_breakpointsActivated(true)
</span><span class="cx">     , m_hasHandlerForExceptionCallback(false)
</span><span class="cx">     , m_isInWorkerThread(isInWorkerThread)
</span><ins>+    , m_steppingMode(SteppingModeDisabled)
</ins><span class="cx">     , m_reasonForPause(NotPaused)
</span><span class="cx">     , m_pauseOnCallFrame(0)
</span><span class="cx">     , m_currentCallFrame(0)
</span><span class="cx">     , m_lastExecutedLine(UINT_MAX)
</span><span class="cx">     , m_lastExecutedSourceID(noSourceID)
</span><span class="cx">     , m_topBreakpointID(noBreakpointID)
</span><del>-    , m_shouldPause(false)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -189,26 +189,57 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(m_globalObjects.contains(globalObject));
</span><span class="cx">     m_globalObjects.remove(globalObject);
</span><ins>+
+    clearDebuggerRequests(globalObject);
</ins><span class="cx">     globalObject-&gt;setDebugger(0);
</span><span class="cx">     if (!m_globalObjects.size())
</span><span class="cx">         m_vm = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Debugger::setShouldPause(bool value)
</del><ins>+class Debugger::SetSteppingModeFunctor {
+public:
+    SetSteppingModeFunctor(Debugger* debugger, SteppingMode mode)
+        : m_debugger(debugger)
+        , m_mode(mode)
+    {
+    }
+
+    bool operator()(CodeBlock* codeBlock)
+    {
+        if (m_debugger == codeBlock-&gt;globalObject()-&gt;debugger()) {
+            if (m_mode == SteppingModeEnabled)
+                codeBlock-&gt;setSteppingMode(CodeBlock::SteppingModeEnabled);
+            else
+                codeBlock-&gt;setSteppingMode(CodeBlock::SteppingModeDisabled);
+        }
+        return false;
+    }
+
+private:
+    Debugger* m_debugger;
+    SteppingMode m_mode;
+};
+
+void Debugger::setSteppingMode(SteppingMode mode)
</ins><span class="cx"> {
</span><del>-    m_shouldPause = value;
</del><ins>+    if (mode == m_steppingMode)
+        return;
+    m_steppingMode = mode;
+
+    if (!m_vm)
+        return;
+    HeapIterationScope iterationScope(m_vm-&gt;heap);
+    SetSteppingModeFunctor functor(this, mode);
+    m_vm-&gt;heap.forEachCodeBlock(functor);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Debugger::registerCodeBlock(CodeBlock* codeBlock)
</span><span class="cx"> {
</span><span class="cx">     applyBreakpoints(codeBlock);
</span><ins>+    if (isStepping())
+        codeBlock-&gt;setSteppingMode(CodeBlock::SteppingModeEnabled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Debugger::unregisterCodeBlock(CodeBlock* codeBlock)
-{
-    codeBlock-&gt;clearAllBreakpoints();
-}
-
</del><span class="cx"> void Debugger::toggleBreakpoint(CodeBlock* codeBlock, Breakpoint&amp; breakpoint, BreakpointState enabledOrNot)
</span><span class="cx"> {
</span><span class="cx">     ScriptExecutable* executable = codeBlock-&gt;ownerExecutable();
</span><span class="lines">@@ -435,17 +466,17 @@
</span><span class="cx">     return result.toBoolean(m_currentCallFrame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-class Debugger::ClearBreakpointsFunctor {
</del><ins>+class Debugger::ClearCodeBlockDebuggerRequestsFunctor {
</ins><span class="cx"> public:
</span><del>-    ClearBreakpointsFunctor(Debugger* debugger)
</del><ins>+    ClearCodeBlockDebuggerRequestsFunctor(Debugger* debugger)
</ins><span class="cx">         : m_debugger(debugger)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool operator()(CodeBlock* codeBlock)
</span><span class="cx">     {
</span><del>-        if (codeBlock-&gt;numBreakpoints() &amp;&amp; m_debugger == codeBlock-&gt;globalObject()-&gt;debugger())
-            codeBlock-&gt;clearAllBreakpoints();
</del><ins>+        if (codeBlock-&gt;hasDebuggerRequests() &amp;&amp; m_debugger == codeBlock-&gt;globalObject()-&gt;debugger())
+            codeBlock-&gt;clearDebuggerRequests();
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -462,10 +493,36 @@
</span><span class="cx">     if (!m_vm)
</span><span class="cx">         return;
</span><span class="cx">     HeapIterationScope iterationScope(m_vm-&gt;heap);
</span><del>-    ClearBreakpointsFunctor functor(this);
</del><ins>+    ClearCodeBlockDebuggerRequestsFunctor functor(this);
</ins><span class="cx">     m_vm-&gt;heap.forEachCodeBlock(functor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+class Debugger::ClearDebuggerRequestsFunctor {
+public:
+    ClearDebuggerRequestsFunctor(JSGlobalObject* globalObject)
+        : m_globalObject(globalObject)
+    {
+    }
+
+    bool operator()(CodeBlock* codeBlock)
+    {
+        if (codeBlock-&gt;hasDebuggerRequests() &amp;&amp; m_globalObject == codeBlock-&gt;globalObject())
+            codeBlock-&gt;clearDebuggerRequests();
+        return false;
+    }
+
+private:
+    JSGlobalObject* m_globalObject;
+};
+
+void Debugger::clearDebuggerRequests(JSGlobalObject* globalObject)
+{
+    ASSERT(m_vm);
+    HeapIterationScope iterationScope(m_vm-&gt;heap);
+    ClearDebuggerRequestsFunctor functor(globalObject);
+    m_vm-&gt;heap.forEachCodeBlock(functor);
+}
+
</ins><span class="cx"> void Debugger::setBreakpointsActivated(bool activated)
</span><span class="cx"> {
</span><span class="cx">     m_breakpointsActivated = activated;
</span><span class="lines">@@ -480,7 +537,7 @@
</span><span class="cx"> {
</span><span class="cx">     m_pauseOnNextStatement = pause;
</span><span class="cx">     if (pause)
</span><del>-        setShouldPause(true);
</del><ins>+        setSteppingMode(SteppingModeEnabled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Debugger::breakProgram()
</span><span class="lines">@@ -489,7 +546,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_pauseOnNextStatement = true;
</span><del>-    setShouldPause(true);
</del><ins>+    setSteppingMode(SteppingModeEnabled);
</ins><span class="cx">     m_currentCallFrame = m_vm-&gt;topCallFrame;
</span><span class="cx">     ASSERT(m_currentCallFrame);
</span><span class="cx">     pauseIfNeeded(m_currentCallFrame);
</span><span class="lines">@@ -510,7 +567,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_pauseOnNextStatement = true;
</span><del>-    setShouldPause(true);
</del><ins>+    setSteppingMode(SteppingModeEnabled);
</ins><span class="cx">     notifyDoneProcessingDebuggerEvents();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -546,7 +603,7 @@
</span><span class="cx"> {
</span><span class="cx">     updateCallFrame(callFrame);
</span><span class="cx">     pauseIfNeeded(callFrame);
</span><del>-    if (!shouldPause())
</del><ins>+    if (!isStepping())
</ins><span class="cx">         m_currentCallFrame = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -590,7 +647,7 @@
</span><span class="cx">     handlePause(m_reasonForPause, vmEntryGlobalObject);
</span><span class="cx"> 
</span><span class="cx">     if (!m_pauseOnNextStatement &amp;&amp; !m_pauseOnCallFrame) {
</span><del>-        setShouldPause(false);
</del><ins>+        setSteppingMode(SteppingModeDisabled);
</ins><span class="cx">         m_currentCallFrame = nullptr;
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -603,7 +660,7 @@
</span><span class="cx">     PauseReasonDeclaration reason(*this, PausedForException);
</span><span class="cx">     if (m_pauseOnExceptionsState == PauseOnAllExceptions || (m_pauseOnExceptionsState == PauseOnUncaughtExceptions &amp;&amp; !hasHandler)) {
</span><span class="cx">         m_pauseOnNextStatement = true;
</span><del>-        setShouldPause(true);
</del><ins>+        setSteppingMode(SteppingModeEnabled);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_hasHandlerForExceptionCallback = true;
</span><span class="lines">@@ -661,7 +718,7 @@
</span><span class="cx">     // the debugger implementation to not require callbacks.
</span><span class="cx">     if (!m_isInWorkerThread)
</span><span class="cx">         updateCallFrameAndPauseIfNeeded(callFrame);
</span><del>-    else if (shouldPause())
</del><ins>+    else if (isStepping())
</ins><span class="cx">         updateCallFrame(callFrame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -691,7 +748,7 @@
</span><span class="cx"> 
</span><span class="cx">     PauseReasonDeclaration reason(*this, PausedForBreakpoint);
</span><span class="cx">     m_pauseOnNextStatement = true;
</span><del>-    setShouldPause(true);
</del><ins>+    setSteppingMode(SteppingModeEnabled);
</ins><span class="cx">     updateCallFrameAndPauseIfNeeded(callFrame);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.h (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.h        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.h        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -41,17 +41,11 @@
</span><span class="cx"> 
</span><span class="cx"> typedef ExecState CallFrame;
</span><span class="cx"> 
</span><del>-#if ENABLE(JAVASCRIPT_DEBUGGER)
-
</del><span class="cx"> class JS_EXPORT_PRIVATE Debugger {
</span><span class="cx"> public:
</span><span class="cx">     Debugger(bool isInWorkerThread = false);
</span><span class="cx">     virtual ~Debugger();
</span><span class="cx"> 
</span><del>-    bool shouldPause() const { return m_shouldPause; }
-    static ptrdiff_t shouldPauseOffset() { return OBJECT_OFFSETOF(Debugger, m_shouldPause); }
-    void* shouldPauseAddress() { return &amp;m_shouldPause; }
-
</del><span class="cx">     JSC::DebuggerCallFrame* currentDebuggerCallFrame() const;
</span><span class="cx">     bool hasHandlerForExceptionCallback() const
</span><span class="cx">     {
</span><span class="lines">@@ -106,7 +100,6 @@
</span><span class="cx">     void recompileAllJSFunctions(VM*);
</span><span class="cx"> 
</span><span class="cx">     void registerCodeBlock(CodeBlock*);
</span><del>-    void unregisterCodeBlock(CodeBlock*);
</del><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     virtual bool needPauseHandling(JSGlobalObject*) { return false; }
</span><span class="lines">@@ -134,8 +127,10 @@
</span><span class="cx">     typedef HashMap&lt;unsigned, BreakpointsInLine, WTF::IntHash&lt;int&gt;, WTF::UnsignedWithZeroKeyHashTraits&lt;int&gt;&gt; LineToBreakpointsMap;
</span><span class="cx">     typedef HashMap&lt;SourceID, LineToBreakpointsMap, WTF::IntHash&lt;SourceID&gt;, WTF::UnsignedWithZeroKeyHashTraits&lt;SourceID&gt;&gt; SourceIDToBreakpointsMap;
</span><span class="cx"> 
</span><ins>+    class ClearCodeBlockDebuggerRequestsFunctor;
+    class ClearDebuggerRequestsFunctor;
+    class SetSteppingModeFunctor;
</ins><span class="cx">     class ToggleBreakpointFunctor;
</span><del>-    class ClearBreakpointsFunctor;
</del><span class="cx"> 
</span><span class="cx">     class PauseReasonDeclaration {
</span><span class="cx">     public:
</span><span class="lines">@@ -155,7 +150,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasBreakpoint(SourceID, const TextPosition&amp;, Breakpoint* hitBreakpoint);
</span><span class="cx"> 
</span><del>-    void setShouldPause(bool);
</del><span class="cx">     void updateNeedForOpDebugCallbacks();
</span><span class="cx"> 
</span><span class="cx">     // These update functions are only needed because our current breakpoints are
</span><span class="lines">@@ -167,6 +161,13 @@
</span><span class="cx">     void updateCallFrameAndPauseIfNeeded(JSC::CallFrame*);
</span><span class="cx">     void pauseIfNeeded(JSC::CallFrame*);
</span><span class="cx"> 
</span><ins>+    enum SteppingMode {
+        SteppingModeDisabled,
+        SteppingModeEnabled
+    };
+    void setSteppingMode(SteppingMode);
+    bool isStepping() const { return m_steppingMode == SteppingModeEnabled; }
+
</ins><span class="cx">     enum BreakpointState {
</span><span class="cx">         BreakpointDisabled,
</span><span class="cx">         BreakpointEnabled
</span><span class="lines">@@ -175,6 +176,8 @@
</span><span class="cx">     void applyBreakpoints(CodeBlock*);
</span><span class="cx">     void toggleBreakpoint(Breakpoint&amp;, BreakpointState);
</span><span class="cx"> 
</span><ins>+    void clearDebuggerRequests(JSGlobalObject*);
+
</ins><span class="cx">     VM* m_vm;
</span><span class="cx">     HashSet&lt;JSGlobalObject*&gt; m_globalObjects;
</span><span class="cx"> 
</span><span class="lines">@@ -184,6 +187,7 @@
</span><span class="cx">     bool m_breakpointsActivated : 1;
</span><span class="cx">     bool m_hasHandlerForExceptionCallback : 1;
</span><span class="cx">     bool m_isInWorkerThread : 1;
</span><ins>+    SteppingMode m_steppingMode : 1;
</ins><span class="cx"> 
</span><span class="cx">     ReasonForPause m_reasonForPause;
</span><span class="cx">     JSValue m_currentException;
</span><span class="lines">@@ -196,8 +200,6 @@
</span><span class="cx">     BreakpointIDToBreakpointMap m_breakpointIDToBreakpoint;
</span><span class="cx">     SourceIDToBreakpointsMap m_sourceIDToBreakpoints;
</span><span class="cx"> 
</span><del>-    bool m_shouldPause;
-
</del><span class="cx">     RefPtr&lt;JSC::DebuggerCallFrame&gt; m_currentDebuggerCallFrame;
</span><span class="cx"> 
</span><span class="cx">     friend class DebuggerCallFrameScope;
</span><span class="lines">@@ -205,32 +207,6 @@
</span><span class="cx">     friend class LLIntOffsetsExtractor;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-#else // ENABLE(JAVASCRIPT_DEBUGGER)
-
-class Debugger {
-public:
-    Debugger(bool = false)
-        : m_shouldPause(false)
-    {
-    }
-    bool shouldPause() const { return false; }
-    bool needsExceptionCallbacks() const { return false; }
-    void detach(JSGlobalObject*) { }
-    void sourceParsed(ExecState*, SourceProvider*, int, const WTF::String&amp;) { }
-    void exception(CallFrame*, JSValue, bool) { }
-    void atStatement(CallFrame*) { }
-    void callEvent(CallFrame*) { }
-    void returnEvent(CallFrame*) { }
-    void willExecuteProgram(CallFrame*) { }
-    void didExecuteProgram(CallFrame*) { }
-    void didReachBreakpoint(CallFrame*) { }
-
-private:
-    bool m_shouldPause;
-};
-
-#endif // ENABLE(JAVASCRIPT_DEBUGGER)
-
</del><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span><span class="cx"> #endif // Debugger_h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -4233,28 +4233,15 @@
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case Breakpoint: {
</span><del>-        JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(m_currentNode-&gt;codeOrigin);
</del><span class="cx">         GPRTemporary temp(this);
</span><del>-        m_jit.loadPtr(globalObject-&gt;debuggerAddress(), temp.gpr());
</del><ins>+        GPRReg debuggerRequestsGPR = temp.gpr();
+        m_jit.load32(m_jit.codeBlock()-&gt;debuggerRequestsAddress(), debuggerRequestsGPR);
</ins><span class="cx">         speculationCheck(
</span><span class="cx">             DebuggerEvent, JSValueRegs(), 0,
</span><del>-            m_jit.branchTestPtr(JITCompiler::Zero, temp.gpr()));
-
-        ASSERT(globalObject-&gt;hasDebugger());
-        speculationCheck(
-            DebuggerEvent, JSValueRegs(), 0,
-            m_jit.branchTest8(
-                JITCompiler::NonZero,
-                JITCompiler::AbsoluteAddress(globalObject-&gt;debugger()-&gt;shouldPauseAddress())));
-
-        GPRReg numBreakpointsGPR = temp.gpr();
-        m_jit.load32(m_jit.codeBlock()-&gt;numBreakpointsAddress(), numBreakpointsGPR);
-        speculationCheck(
-            DebuggerEvent, JSValueRegs(), 0,
-            m_jit.branchTest32(JITCompiler::NonZero, numBreakpointsGPR));
</del><ins>+            m_jit.branchTest32(JITCompiler::NonZero, debuggerRequestsGPR));
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><del>-        
</del><ins>+
</ins><span class="cx">     case ProfileWillCall: {
</span><span class="cx">         JSValueOperand profile(this, node-&gt;child1());
</span><span class="cx">         GPRReg profileTagGPR = profile.tagGPR();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -4510,29 +4510,15 @@
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case Breakpoint: {
</span><del>-        JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(m_currentNode-&gt;codeOrigin);
-        speculationCheck(
-            DebuggerEvent, JSValueRegs(), 0,
-            m_jit.branchTestPtr(
-                JITCompiler::Zero,
-                JITCompiler::AbsoluteAddress(globalObject-&gt;debuggerAddress())));
-
-        ASSERT(globalObject-&gt;hasDebugger());
-        speculationCheck(
-            DebuggerEvent, JSValueRegs(), 0,
-            m_jit.branchTest8(
-                JITCompiler::NonZero,
-                JITCompiler::AbsoluteAddress(globalObject-&gt;debugger()-&gt;shouldPauseAddress())));
-
</del><span class="cx">         GPRTemporary temp(this);
</span><del>-        GPRReg numBreakpointsGPR = temp.gpr();
-        m_jit.load32(m_jit.codeBlock()-&gt;numBreakpointsAddress(), numBreakpointsGPR);
</del><ins>+        GPRReg debuggerRequestsGPR = temp.gpr();
+        m_jit.load32(m_jit.codeBlock()-&gt;debuggerRequestsAddress(), debuggerRequestsGPR);
</ins><span class="cx">         speculationCheck(
</span><span class="cx">             DebuggerEvent, JSValueRegs(), 0,
</span><del>-            m_jit.branchTest32(JITCompiler::NonZero, numBreakpointsGPR));
</del><ins>+            m_jit.branchTest32(JITCompiler::NonZero, debuggerRequestsGPR));
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><del>-        
</del><ins>+
</ins><span class="cx">     case ProfileWillCall: {
</span><span class="cx">         JSValueOperand profile(this, node-&gt;child1());
</span><span class="cx">         GPRReg profileGPR = profile.gpr();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -1207,7 +1207,7 @@
</span><span class="cx">     Debugger* debugger = callFrame-&gt;vmEntryGlobalObject()-&gt;debugger();
</span><span class="cx">     if (!debugger)
</span><span class="cx">         return;
</span><del>-    ASSERT(debugger-&gt;shouldPause() || callFrame-&gt;codeBlock()-&gt;numBreakpoints() || callFrame-&gt;hadException());
</del><ins>+    ASSERT(callFrame-&gt;codeBlock()-&gt;hasDebuggerRequests() || callFrame-&gt;hadException());
</ins><span class="cx"> 
</span><span class="cx">     switch (debugHookID) {
</span><span class="cx">         case DidEnterCallFrame:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -710,30 +710,10 @@
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_debug(Instruction* currentInstruction)
</span><span class="cx"> {
</span><del>-#if ENABLE(DEBUG_WITH_BREAKPOINT)
-    UNUSED_PARAM(currentInstruction);
-    breakpoint();
-#elif ENABLE(JAVASCRIPT_DEBUGGER)
-    JSGlobalObject* globalObject = codeBlock()-&gt;globalObject();
-    char* debuggerAddress = reinterpret_cast&lt;char*&gt;(globalObject) + JSGlobalObject::debuggerOffset();
-    Jump noDebugger = branchTestPtr(Zero, AbsoluteAddress(debuggerAddress));
-
-    Debugger* debugger = globalObject-&gt;debugger();
-    char* shouldPauseAddress = reinterpret_cast&lt;char*&gt;(debugger) + Debugger::shouldPauseOffset();
-    Jump callbackNeeded = branchTest8(NonZero, AbsoluteAddress(shouldPauseAddress));
-
-    char* numBreakpointsAddress = reinterpret_cast&lt;char*&gt;(codeBlock()) + CodeBlock::numBreakpointsOffset();
-    load32(numBreakpointsAddress, regT0);
-    Jump noBreakpointSet = branchTest32(Zero, regT0);
-
-    callbackNeeded.link(this);
</del><ins>+    load32(codeBlock()-&gt;debuggerRequestsAddress(), regT0);
+    Jump noDebuggerRequests = branchTest32(Zero, regT0);
</ins><span class="cx">     callOperation(operationDebug, currentInstruction[1].u.operand);
</span><del>-
-    noBreakpointSet.link(this);
-    noDebugger.link(this);
-#else
-    UNUSED_PARAM(currentInstruction);
-#endif
</del><ins>+    noDebuggerRequests.link(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_eq_null(Instruction* currentInstruction)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodes32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -992,31 +992,10 @@
</span><span class="cx"> 
</span><span class="cx"> void JIT::emit_op_debug(Instruction* currentInstruction)
</span><span class="cx"> {
</span><del>-#if ENABLE(DEBUG_WITH_BREAKPOINT)
-    UNUSED_PARAM(currentInstruction);
-    breakpoint();
-#elif ENABLE(JAVASCRIPT_DEBUGGER)
-    JSGlobalObject* globalObject = codeBlock()-&gt;globalObject();
-    char* debuggerAddress = reinterpret_cast&lt;char*&gt;(globalObject) + JSGlobalObject::debuggerOffset();
-    loadPtr(debuggerAddress, regT0);
-    Jump noDebugger = branchTestPtr(Zero, regT0);
-
-    Debugger* debugger = globalObject-&gt;debugger();
-    char* shouldPauseAddress = reinterpret_cast&lt;char*&gt;(debugger) + Debugger::shouldPauseOffset();
-    Jump callbackNeeded = branchTest8(NonZero, AbsoluteAddress(shouldPauseAddress));
-
-    char* numBreakpointsAddress = reinterpret_cast&lt;char*&gt;(codeBlock()) + CodeBlock::numBreakpointsOffset();
-    load32(numBreakpointsAddress, regT0);
-    Jump noBreakpointSet = branchTest32(Zero, regT0);
-
-    callbackNeeded.link(this);
</del><ins>+    load32(codeBlock()-&gt;debuggerRequestsAddress(), regT0);
+    Jump noDebuggerRequests = branchTest32(Zero, regT0);
</ins><span class="cx">     callOperation(operationDebug, currentInstruction[1].u.operand);
</span><del>-
-    noBreakpointSet.link(this);
-    noDebugger.link(this);
-#else
-    UNUSED_PARAM(currentInstruction);
-#endif
</del><ins>+    noDebuggerRequests.link(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreterasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -835,18 +835,9 @@
</span><span class="cx"> 
</span><span class="cx"> _llint_op_debug:
</span><span class="cx">     traceExecution()
</span><del>-    loadp CodeBlock[cfr], t1
-    loadp CodeBlock::m_globalObject[t1], t0
-    loadp JSGlobalObject::m_debugger[t0], t0
</del><ins>+    loadp CodeBlock[cfr], t0
+    loadi CodeBlock::m_debuggerRequests[t0], t0
</ins><span class="cx">     btiz t0, .opDebugDone
</span><del>-
-    loadb Debugger::m_shouldPause[t0], t0
-    btbnz t0, .opDebugDoCallback
-
-    loadi CodeBlock::m_numBreakpoints[t1], t0
-    btiz t0, .opDebugDone
-
-.opDebugDoCallback:
</del><span class="cx">     callSlowPath(_llint_slow_path_debug)
</span><span class="cx"> .opDebugDone:                    
</span><span class="cx">     dispatch(3)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h (162710 => 162711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2014-01-24 18:56:23 UTC (rev 162710)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2014-01-24 19:07:31 UTC (rev 162711)
</span><span class="lines">@@ -472,8 +472,6 @@
</span><span class="cx"> 
</span><span class="cx">     Debugger* debugger() const { return m_debugger; }
</span><span class="cx">     void setDebugger(Debugger* debugger) { m_debugger = debugger; }
</span><del>-    static ptrdiff_t debuggerOffset() { return OBJECT_OFFSETOF(JSGlobalObject, m_debugger); }
-    void* debuggerAddress() { return &amp;m_debugger; }
</del><span class="cx"> 
</span><span class="cx">     const GlobalObjectMethodTable* globalObjectMethodTable() const { return m_globalObjectMethodTable; }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>