<!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>[202992] 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/202992">202992</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2016-07-08 10:54:38 -0700 (Fri, 08 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rename jsCPUStackLimit to osStackLimitWithReserve and jsEmulatedStackLimit to cloopStackLimit.
https://bugs.webkit.org/show_bug.cgi?id=159544

Reviewed by Geoffrey Garen.

This patch does the following refactoring:
1. Rename jsCPUStackLimit to osStackLimitWithReserve.
2. Rename jsEmulatedStackLimit to cloopStackLimit.
2. Remove llintStackLimit (which previously is either an alias for
   jsCPUStackLimit or jsEmulatedStackLimit depending on whether we have a JIT or
   C Loop build).  Instead, we'll change the LLINT to conditionally use the
   osStackLimitWithReserve or cloopStackLimit.

There are no semantic changes.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
* interpreter/JSStack.cpp:
(JSC::JSStack::JSStack):
(JSC::JSStack::growSlowCase):
(JSC::JSStack::lowAddress):
(JSC::JSStack::highAddress):
* interpreter/JSStack.h:
* interpreter/JSStackInlines.h:
(JSC::JSStack::ensureCapacityFor):
(JSC::JSStack::shrink):
(JSC::JSStack::grow):
(JSC::JSStack::setCLoopStackLimit):
(JSC::JSStack::setJSEmulatedStackLimit): Deleted.
* jit/JIT.cpp:
(JSC::JIT::compileWithoutLinking):
* jit/SetupVarargsFrame.cpp:
(JSC::emitSetupVarargsFrameFastCase):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/RegExp.cpp:
(JSC::RegExp::finishCreation):
(JSC::RegExp::compile):
(JSC::RegExp::compileMatchOnly):
* runtime/VM.cpp:
(JSC::VM::updateStackLimit):
* runtime/VM.h:
(JSC::VM::reservedZoneSize):
(JSC::VM::osStackLimitWithReserve):
(JSC::VM::addressOfOSStackLimitWithReserve):
(JSC::VM::cloopStackLimit):
(JSC::VM::setCLoopStackLimit):
(JSC::VM::isSafeToRecurse):
(JSC::VM::jsCPUStackLimit): Deleted.
(JSC::VM::addressOfJSCPUStackLimit): Deleted.
(JSC::VM::jsEmulatedStackLimit): Deleted.
(JSC::VM::setJSEmulatedStackLimit): Deleted.
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::startFunction):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGJITCompilercpp">trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterJSStackcpp">trunk/Source/JavaScriptCore/interpreter/JSStack.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterJSStackh">trunk/Source/JavaScriptCore/interpreter/JSStack.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterJSStackInlinesh">trunk/Source/JavaScriptCore/interpreter/JSStackInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITcpp">trunk/Source/JavaScriptCore/jit/JIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitSetupVarargsFramecpp">trunk/Source/JavaScriptCore/jit/SetupVarargsFrame.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathscpp">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreterasm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreter32_64asm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreter64asm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpcpp">trunk/Source/JavaScriptCore/runtime/RegExp.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMcpp">trunk/Source/JavaScriptCore/runtime/VM.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMh">trunk/Source/JavaScriptCore/runtime/VM.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWASMFunctionCompilerh">trunk/Source/JavaScriptCore/wasm/WASMFunctionCompiler.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -1,3 +1,66 @@
</span><ins>+2016-07-08  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Rename jsCPUStackLimit to osStackLimitWithReserve and jsEmulatedStackLimit to cloopStackLimit.
+        https://bugs.webkit.org/show_bug.cgi?id=159544
+
+        Reviewed by Geoffrey Garen.
+
+        This patch does the following refactoring:
+        1. Rename jsCPUStackLimit to osStackLimitWithReserve.
+        2. Rename jsEmulatedStackLimit to cloopStackLimit.
+        2. Remove llintStackLimit (which previously is either an alias for
+           jsCPUStackLimit or jsEmulatedStackLimit depending on whether we have a JIT or
+           C Loop build).  Instead, we'll change the LLINT to conditionally use the
+           osStackLimitWithReserve or cloopStackLimit.
+
+        There are no semantic changes.
+
+        * dfg/DFGJITCompiler.cpp:
+        (JSC::DFG::JITCompiler::compile):
+        (JSC::DFG::JITCompiler::compileFunction):
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::lower):
+        * interpreter/JSStack.cpp:
+        (JSC::JSStack::JSStack):
+        (JSC::JSStack::growSlowCase):
+        (JSC::JSStack::lowAddress):
+        (JSC::JSStack::highAddress):
+        * interpreter/JSStack.h:
+        * interpreter/JSStackInlines.h:
+        (JSC::JSStack::ensureCapacityFor):
+        (JSC::JSStack::shrink):
+        (JSC::JSStack::grow):
+        (JSC::JSStack::setCLoopStackLimit):
+        (JSC::JSStack::setJSEmulatedStackLimit): Deleted.
+        * jit/JIT.cpp:
+        (JSC::JIT::compileWithoutLinking):
+        * jit/SetupVarargsFrame.cpp:
+        (JSC::emitSetupVarargsFrameFastCase):
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+        * llint/LowLevelInterpreter.asm:
+        * llint/LowLevelInterpreter32_64.asm:
+        * llint/LowLevelInterpreter64.asm:
+        * runtime/RegExp.cpp:
+        (JSC::RegExp::finishCreation):
+        (JSC::RegExp::compile):
+        (JSC::RegExp::compileMatchOnly):
+        * runtime/VM.cpp:
+        (JSC::VM::updateStackLimit):
+        * runtime/VM.h:
+        (JSC::VM::reservedZoneSize):
+        (JSC::VM::osStackLimitWithReserve):
+        (JSC::VM::addressOfOSStackLimitWithReserve):
+        (JSC::VM::cloopStackLimit):
+        (JSC::VM::setCLoopStackLimit):
+        (JSC::VM::isSafeToRecurse):
+        (JSC::VM::jsCPUStackLimit): Deleted.
+        (JSC::VM::addressOfJSCPUStackLimit): Deleted.
+        (JSC::VM::jsEmulatedStackLimit): Deleted.
+        (JSC::VM::setJSEmulatedStackLimit): Deleted.
+        * wasm/WASMFunctionCompiler.h:
+        (JSC::WASMFunctionCompiler::startFunction):
+
</ins><span class="cx"> 2016-07-08  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r202799.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGJITCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -342,7 +342,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Plant a check that sufficient space is available in the JSStack.
</span><span class="cx">     addPtr(TrustedImm32(virtualRegisterForLocal(m_graph.requiredRegisterCountForExecutionAndExit() - 1).offset() * sizeof(Register)), GPRInfo::callFrameRegister, GPRInfo::regT1);
</span><del>-    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm-&gt;addressOfJSCPUStackLimit()), GPRInfo::regT1);
</del><ins>+    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm-&gt;addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
</ins><span class="cx"> 
</span><span class="cx">     addPtr(TrustedImm32(m_graph.stackPointerOffset() * sizeof(Register)), GPRInfo::callFrameRegister, stackPointerRegister);
</span><span class="cx">     checkStackPointerAlignment();
</span><span class="lines">@@ -405,7 +405,7 @@
</span><span class="cx">     Label fromArityCheck(this);
</span><span class="cx">     // Plant a check that sufficient space is available in the JSStack.
</span><span class="cx">     addPtr(TrustedImm32(virtualRegisterForLocal(m_graph.requiredRegisterCountForExecutionAndExit() - 1).offset() * sizeof(Register)), GPRInfo::callFrameRegister, GPRInfo::regT1);
</span><del>-    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm-&gt;addressOfJSCPUStackLimit()), GPRInfo::regT1);
</del><ins>+    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm-&gt;addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
</ins><span class="cx"> 
</span><span class="cx">     // Move the stack pointer down to accommodate locals
</span><span class="cx">     addPtr(TrustedImm32(m_graph.stackPointerOffset() * sizeof(Register)), GPRInfo::callFrameRegister, stackPointerRegister);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -189,7 +189,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Stack Overflow Check.
</span><span class="cx">         unsigned exitFrameSize = m_graph.requiredRegisterCountForExit() * sizeof(Register);
</span><del>-        MacroAssembler::AbsoluteAddress addressOfStackLimit(vm().addressOfJSCPUStackLimit());
</del><ins>+        MacroAssembler::AbsoluteAddress addressOfStackLimit(vm().addressOfOSStackLimitWithReserve());
</ins><span class="cx">         PatchpointValue* stackOverflowHandler = m_out.patchpoint(Void);
</span><span class="cx">         CallSiteIndex callSiteIndex = callSiteIndexForCodeOrigin(m_ftlState, CodeOrigin(0));
</span><span class="cx">         stackOverflowHandler-&gt;appendSomeRegister(m_callFrame);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterJSStackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/JSStack.cpp (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/JSStack.cpp        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/interpreter/JSStack.cpp        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">     ASSERT(capacity &amp;&amp; isPageAligned(capacity));
</span><span class="cx"> 
</span><span class="cx">     m_reservation = PageReservation::reserve(WTF::roundUpToMultipleOf(commitSize(), capacity), OSAllocator::JSVMStackPages);
</span><del>-    setJSEmulatedStackLimit(highAddress());
</del><ins>+    setCLoopStackLimit(highAddress());
</ins><span class="cx">     m_commitTop = highAddress();
</span><span class="cx">     
</span><span class="cx">     m_lastStackTop = baseOfStack();
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">     // If we have already committed enough memory to satisfy this request,
</span><span class="cx">     // just update the end pointer and return.
</span><span class="cx">     if (newTopOfStackWithReservedZone &gt;= m_commitTop) {
</span><del>-        setJSEmulatedStackLimit(newTopOfStack);
</del><ins>+        setCLoopStackLimit(newTopOfStack);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">     m_reservation.commit(newCommitTop, delta);
</span><span class="cx">     addToCommittedByteCount(delta);
</span><span class="cx">     m_commitTop = newCommitTop;
</span><del>-    setJSEmulatedStackLimit(newTopOfStack);
</del><ins>+    setCLoopStackLimit(newTopOfStack);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx"> Register* JSStack::lowAddress() const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(wtfThreadData().stack().isGrowingDownward());
</span><del>-    return reinterpret_cast&lt;Register*&gt;(m_vm.jsCPUStackLimit());
</del><ins>+    return reinterpret_cast&lt;Register*&gt;(m_vm.osStackLimitWithReserve());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Register* JSStack::highAddress() const
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterJSStackh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/JSStack.h (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/JSStack.h        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/interpreter/JSStack.h        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">         void releaseExcessCapacity();
</span><span class="cx">         void addToCommittedByteCount(long);
</span><span class="cx"> 
</span><del>-        void setJSEmulatedStackLimit(Register* newTopOfStack);
</del><ins>+        void setCLoopStackLimit(Register* newTopOfStack);
</ins><span class="cx"> #endif // !ENABLE(JIT)
</span><span class="cx"> 
</span><span class="cx">         VM&amp; m_vm;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterJSStackInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/JSStackInlines.h (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/JSStackInlines.h        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/interpreter/JSStackInlines.h        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">     return grow(newTopOfStack);
</span><span class="cx"> #else
</span><span class="cx">     ASSERT(wtfThreadData().stack().isGrowingDownward());
</span><del>-    return newTopOfStack &gt;= m_vm.jsCPUStackLimit();
</del><ins>+    return newTopOfStack &gt;= m_vm.osStackLimitWithReserve();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">     Register* newEnd = newTopOfStack - 1;
</span><span class="cx">     if (newEnd &gt;= m_end)
</span><span class="cx">         return;
</span><del>-    setJSEmulatedStackLimit(newTopOfStack);
</del><ins>+    setCLoopStackLimit(newTopOfStack);
</ins><span class="cx">     // Note: Clang complains of an unresolved linkage to maxExcessCapacity if
</span><span class="cx">     // invoke std::max() with it as an argument. To work around this, we first
</span><span class="cx">     // assign the constant to a local variable, and use the local instead.
</span><span class="lines">@@ -80,11 +80,11 @@
</span><span class="cx">     return growSlowCase(newTopOfStack);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void JSStack::setJSEmulatedStackLimit(Register* newTopOfStack)
</del><ins>+inline void JSStack::setCLoopStackLimit(Register* newTopOfStack)
</ins><span class="cx"> {
</span><span class="cx">     Register* newEnd = newTopOfStack - 1;
</span><span class="cx">     m_end = newEnd;
</span><del>-    m_vm.setJSEmulatedStackLimit(newTopOfStack);
</del><ins>+    m_vm.setCLoopStackLimit(newTopOfStack);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // !ENABLE(JIT)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.cpp (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.cpp        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/jit/JIT.cpp        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -599,7 +599,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     addPtr(TrustedImm32(stackPointerOffsetFor(m_codeBlock) * sizeof(Register)), callFrameRegister, regT1);
</span><del>-    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm-&gt;addressOfJSCPUStackLimit()), regT1);
</del><ins>+    Jump stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm-&gt;addressOfOSStackLimitWithReserve()), regT1);
</ins><span class="cx"> 
</span><span class="cx">     move(regT1, stackPointerRegister);
</span><span class="cx">     checkStackPointerAlignment();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitSetupVarargsFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/SetupVarargsFrame.cpp (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/SetupVarargsFrame.cpp        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/jit/SetupVarargsFrame.cpp        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">     
</span><span class="cx">     emitSetVarargsFrame(jit, scratchGPR1, true, numUsedSlotsGPR, scratchGPR2);
</span><span class="cx"> 
</span><del>-    slowCase.append(jit.branchPtr(CCallHelpers::Above, CCallHelpers::AbsoluteAddress(jit.vm()-&gt;addressOfJSCPUStackLimit()), scratchGPR2));
</del><ins>+    slowCase.append(jit.branchPtr(CCallHelpers::Above, CCallHelpers::AbsoluteAddress(jit.vm()-&gt;osStackLimitWithReserve()), scratchGPR2));
</ins><span class="cx"> 
</span><span class="cx">     // Initialize ArgumentCount.
</span><span class="cx">     jit.store32(scratchGPR1, CCallHelpers::Address(scratchGPR2, JSStack::ArgumentCount * static_cast&lt;int&gt;(sizeof(Register)) + PayloadOffset));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -484,9 +484,9 @@
</span><span class="cx">     dataLogF(&quot;Num vars = %u.\n&quot;, exec-&gt;codeBlock()-&gt;m_numVars);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(JIT)
</span><del>-    dataLogF(&quot;Current end is at %p.\n&quot;, exec-&gt;vm().jsCPUStackLimit());
</del><ins>+    dataLogF(&quot;Current end is at %p.\n&quot;, exec-&gt;vm().osStackLimitWithReserve());
</ins><span class="cx"> #else
</span><del>-    dataLogF(&quot;Current end is at %p.\n&quot;, exec-&gt;vm().jsEmulatedStackLimit());
</del><ins>+    dataLogF(&quot;Current end is at %p.\n&quot;, exec-&gt;vm().cloopStackLimit());
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreterasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -951,7 +951,11 @@
</span><span class="cx">     getFrameRegisterSizeForCodeBlock(t1, t0)
</span><span class="cx">     subp cfr, t0, t0
</span><span class="cx">     loadp CodeBlock::m_vm[t1], t2
</span><del>-    bpbeq VM::m_llintStackLimit[t2], t0, .stackHeightOK
</del><ins>+    if C_LOOP
+        bpbeq VM::m_cloopStackLimit[t2], t0, .stackHeightOK
+    else
+        bpbeq VM::m_osStackLimitWithReserve[t2], t0, .stackHeightOK
+    end
</ins><span class="cx"> 
</span><span class="cx">     # Stack height check failed - need to call a slow_path.
</span><span class="cx">     # Set up temporary stack pointer for call including callee saves
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreter32_64asm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -152,7 +152,11 @@
</span><span class="cx">     # Ensure that we have enough additional stack capacity for the incoming args,
</span><span class="cx">     # and the frame for the JS code we're executing. We need to do this check
</span><span class="cx">     # before we start copying the args from the protoCallFrame below.
</span><del>-    bpaeq t3, VM::m_llintStackLimit[vm], .stackHeightOK
</del><ins>+    if C_LOOP
+        bpaeq t3, VM::m_cloopStackLimit[vm], .stackHeightOK
+    else
+        bpaeq t3, VM::m_osStackLimitWithReserve[vm], .stackHeightOK
+    end
</ins><span class="cx"> 
</span><span class="cx">     if C_LOOP
</span><span class="cx">         move entry, t4
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreter64asm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -140,7 +140,11 @@
</span><span class="cx">     # Ensure that we have enough additional stack capacity for the incoming args,
</span><span class="cx">     # and the frame for the JS code we're executing. We need to do this check
</span><span class="cx">     # before we start copying the args from the protoCallFrame below.
</span><del>-    bpaeq t3, VM::m_llintStackLimit[vm], .stackHeightOK
</del><ins>+    if C_LOOP
+        bpaeq t3, VM::m_cloopStackLimit[vm], .stackHeightOK
+    else
+        bpaeq t3, VM::m_osStackLimitWithReserve[vm], .stackHeightOK
+    end
</ins><span class="cx"> 
</span><span class="cx">     if C_LOOP
</span><span class="cx">         move entry, t4
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExp.cpp (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExp.cpp        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/runtime/RegExp.cpp        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx"> void RegExp::finishCreation(VM&amp; vm)
</span><span class="cx"> {
</span><span class="cx">     Base::finishCreation(vm);
</span><del>-    Yarr::YarrPattern pattern(m_patternString, m_flags, &amp;m_constructionError, vm.jsCPUStackLimit());
</del><ins>+    Yarr::YarrPattern pattern(m_patternString, m_flags, &amp;m_constructionError, vm.osStackLimitWithReserve());
</ins><span class="cx">     if (m_constructionError)
</span><span class="cx">         m_state = ParseError;
</span><span class="cx">     else
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx"> {
</span><span class="cx">     ConcurrentJITLocker locker(m_lock);
</span><span class="cx">     
</span><del>-    Yarr::YarrPattern pattern(m_patternString, m_flags, &amp;m_constructionError, vm-&gt;jsCPUStackLimit());
</del><ins>+    Yarr::YarrPattern pattern(m_patternString, m_flags, &amp;m_constructionError, vm-&gt;osStackLimitWithReserve());
</ins><span class="cx">     if (m_constructionError) {
</span><span class="cx">         RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx"> #if COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE)
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx"> {
</span><span class="cx">     ConcurrentJITLocker locker(m_lock);
</span><span class="cx">     
</span><del>-    Yarr::YarrPattern pattern(m_patternString, m_flags, &amp;m_constructionError, vm-&gt;jsCPUStackLimit());
</del><ins>+    Yarr::YarrPattern pattern(m_patternString, m_flags, &amp;m_constructionError, vm-&gt;osStackLimitWithReserve());
</ins><span class="cx">     if (m_constructionError) {
</span><span class="cx">         RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx"> #if COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.cpp (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.cpp        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/runtime/VM.cpp        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -650,20 +650,20 @@
</span><span class="cx"> inline void VM::updateStackLimit()
</span><span class="cx"> {
</span><span class="cx"> #if PLATFORM(WIN)
</span><del>-    void* lastJSCPUStackLimit = m_jsCPUStackLimit;
</del><ins>+    void* lastOSStackLimitWithReserve = m_osStackLimitWithReserve;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (m_stackPointerAtVMEntry) {
</span><span class="cx">         ASSERT(wtfThreadData().stack().isGrowingDownward());
</span><span class="cx">         char* startOfStack = reinterpret_cast&lt;char*&gt;(m_stackPointerAtVMEntry);
</span><del>-        m_jsCPUStackLimit = wtfThreadData().stack().recursionLimit(startOfStack, Options::maxPerThreadStackUsage(), m_reservedZoneSize);
</del><ins>+        m_osStackLimitWithReserve = wtfThreadData().stack().recursionLimit(startOfStack, Options::maxPerThreadStackUsage(), m_reservedZoneSize);
</ins><span class="cx">     } else {
</span><del>-        m_jsCPUStackLimit = wtfThreadData().stack().recursionLimit(m_reservedZoneSize);
</del><ins>+        m_osStackLimitWithReserve = wtfThreadData().stack().recursionLimit(m_reservedZoneSize);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN)
</span><del>-    if (lastJSCPUStackLimit != m_jsCPUStackLimit)
-        preCommitStackMemory(m_jsCPUStackLimit);
</del><ins>+    if (lastOSStackLimitWithReserve != m_osStackLimitWithReserve)
+        preCommitStackMemory(m_osStackLimitWithReserve);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.h (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.h        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/runtime/VM.h        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -461,11 +461,11 @@
</span><span class="cx">     size_t reservedZoneSize() const { return m_reservedZoneSize; }
</span><span class="cx">     size_t updateReservedZoneSize(size_t reservedZoneSize);
</span><span class="cx"> 
</span><del>-    void* jsCPUStackLimit() { return m_jsCPUStackLimit; }
-    void** addressOfJSCPUStackLimit() { return &amp;m_jsCPUStackLimit; }
</del><ins>+    void* osStackLimitWithReserve() { return m_osStackLimitWithReserve; }
+    void** addressOfOSStackLimitWithReserve() { return &amp;m_osStackLimitWithReserve; }
</ins><span class="cx"> #if !ENABLE(JIT)
</span><del>-    void* jsEmulatedStackLimit() { return m_jsEmulatedStackLimit; }
-    void setJSEmulatedStackLimit(void* limit) { m_jsEmulatedStackLimit = limit; }
</del><ins>+    void* cloopStackLimit() { return m_cloopStackLimit; }
+    void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     bool isSafeToRecurse(size_t neededStackInBytes = 0) const
</span><span class="lines">@@ -472,7 +472,7 @@
</span><span class="cx">     {
</span><span class="cx">         ASSERT(wtfThreadData().stack().isGrowingDownward());
</span><span class="cx">         int8_t* curr = reinterpret_cast&lt;int8_t*&gt;(&amp;curr);
</span><del>-        int8_t* limit = reinterpret_cast&lt;int8_t*&gt;(m_jsCPUStackLimit);
</del><ins>+        int8_t* limit = reinterpret_cast&lt;int8_t*&gt;(m_osStackLimitWithReserve);
</ins><span class="cx">         return curr &gt;= limit &amp;&amp; static_cast&lt;size_t&gt;(curr - limit) &gt;= neededStackInBytes;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -645,17 +645,9 @@
</span><span class="cx"> 
</span><span class="cx">     void* m_stackPointerAtVMEntry;
</span><span class="cx">     size_t m_reservedZoneSize;
</span><del>-#if ENABLE(JIT)
-    union {
-        void* m_jsCPUStackLimit { nullptr };
-        void* m_llintStackLimit;
-    };
-#else
-    void* m_jsCPUStackLimit { nullptr };
-    union {
-        void* m_jsEmulatedStackLimit { nullptr };
-        void* m_llintStackLimit;
-    };
</del><ins>+    void* m_osStackLimitWithReserve { nullptr };
+#if !ENABLE(JIT)
+    void* m_cloopStackLimit { nullptr };
</ins><span class="cx"> #endif
</span><span class="cx">     void* m_lastStackTop;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWASMFunctionCompilerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WASMFunctionCompiler.h (202991 => 202992)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WASMFunctionCompiler.h        2016-07-08 17:52:31 UTC (rev 202991)
+++ trunk/Source/JavaScriptCore/wasm/WASMFunctionCompiler.h        2016-07-08 17:54:38 UTC (rev 202992)
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx">         m_beginLabel = label();
</span><span class="cx"> 
</span><span class="cx">         addPtr(TrustedImm32(-m_calleeSaveSpace - WTF::roundUpToMultipleOf(stackAlignmentRegisters(), m_stackHeight) * sizeof(StackSlot) - maxFrameExtentForSlowPathCall), GPRInfo::callFrameRegister, GPRInfo::regT1);
</span><del>-        m_stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm-&gt;addressOfJSCPUStackLimit()), GPRInfo::regT1);
</del><ins>+        m_stackOverflow = branchPtr(Above, AbsoluteAddress(m_vm-&gt;addressOfOSStackLimitWithReserve()), GPRInfo::regT1);
</ins><span class="cx"> 
</span><span class="cx">         move(GPRInfo::regT1, stackPointerRegister);
</span><span class="cx">         checkStackPointerAlignment();
</span></span></pre>
</div>
</div>

</body>
</html>