<!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>[161582] branches/jsCStack/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/161582">161582</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2014-01-09 14:07:31 -0800 (Thu, 09 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>CStack: Rename &quot;host zone&quot; to &quot;reserved zone&quot;.
https://bugs.webkit.org/show_bug.cgi?id=126716.

Reviewed by Michael Saboff.

The &quot;zone&quot; is used as a reserve of stack memory for:
1. nominal host code stack usage.
2. stack space for error handling.
3. initial stack space for pushing VMEntrySentinel frames.

The &quot;zone&quot; may reside on the C stack and on the C loop JSStack depending
on context. Hence, the name &quot;host zone&quot; is not quite accurate, and we'll
rename it to &quot;reserved zone&quot;.

* interpreter/JSStack.cpp:
(JSC::JSStack::JSStack):
(JSC::JSStack::growSlowCase):
(JSC::JSStack::releaseExcessCapacity):
(JSC::JSStack::setReservedZoneSize):
* interpreter/JSStack.h:
* interpreter/JSStackInlines.h:
(JSC::JSStack::shrink):
* runtime/ErrorHandlingScope.cpp:
(JSC::ErrorHandlingScope::ErrorHandlingScope):
(JSC::ErrorHandlingScope::~ErrorHandlingScope):
* runtime/ErrorHandlingScope.h:
* runtime/JSLock.cpp:
(JSC::JSLock::DropAllLocks::DropAllLocks):
(JSC::JSLock::DropAllLocks::~DropAllLocks):
* runtime/JSLock.h:
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::updateStackLimitWithReservedZoneSize):
* runtime/VM.h:
(JSC::VM::reservedZoneSize):
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):
* runtime/VMEntryScope.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesjsCStackSourceJavaScriptCoreChangeLog">branches/jsCStack/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreinterpreterJSStackcpp">branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.cpp</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreinterpreterJSStackh">branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.h</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreinterpreterJSStackInlinesh">branches/jsCStack/Source/JavaScriptCore/interpreter/JSStackInlines.h</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCorellintLowLevelInterpreter32_64asm">branches/jsCStack/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCorellintLowLevelInterpreter64asm">branches/jsCStack/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreruntimeErrorHandlingScopecpp">branches/jsCStack/Source/JavaScriptCore/runtime/ErrorHandlingScope.cpp</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreruntimeErrorHandlingScopeh">branches/jsCStack/Source/JavaScriptCore/runtime/ErrorHandlingScope.h</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreruntimeJSLockcpp">branches/jsCStack/Source/JavaScriptCore/runtime/JSLock.cpp</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreruntimeJSLockh">branches/jsCStack/Source/JavaScriptCore/runtime/JSLock.h</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreruntimeOptionsh">branches/jsCStack/Source/JavaScriptCore/runtime/Options.h</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreruntimeVMcpp">branches/jsCStack/Source/JavaScriptCore/runtime/VM.cpp</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreruntimeVMh">branches/jsCStack/Source/JavaScriptCore/runtime/VM.h</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreruntimeVMEntryScopecpp">branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.cpp</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreruntimeVMEntryScopeh">branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesjsCStackSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/ChangeLog (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/ChangeLog        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/ChangeLog        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -1,5 +1,48 @@
</span><span class="cx"> 2014-01-09  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        CStack: Rename &quot;host zone&quot; to &quot;reserved zone&quot;.
+        https://bugs.webkit.org/show_bug.cgi?id=126716.
+
+        Reviewed by Michael Saboff.
+
+        The &quot;zone&quot; is used as a reserve of stack memory for:
+        1. nominal host code stack usage.
+        2. stack space for error handling.
+        3. initial stack space for pushing VMEntrySentinel frames.
+
+        The &quot;zone&quot; may reside on the C stack and on the C loop JSStack depending
+        on context. Hence, the name &quot;host zone&quot; is not quite accurate, and we'll
+        rename it to &quot;reserved zone&quot;.
+
+        * interpreter/JSStack.cpp:
+        (JSC::JSStack::JSStack):
+        (JSC::JSStack::growSlowCase):
+        (JSC::JSStack::releaseExcessCapacity):
+        (JSC::JSStack::setReservedZoneSize):
+        * interpreter/JSStack.h:
+        * interpreter/JSStackInlines.h:
+        (JSC::JSStack::shrink):
+        * runtime/ErrorHandlingScope.cpp:
+        (JSC::ErrorHandlingScope::ErrorHandlingScope):
+        (JSC::ErrorHandlingScope::~ErrorHandlingScope):
+        * runtime/ErrorHandlingScope.h:
+        * runtime/JSLock.cpp:
+        (JSC::JSLock::DropAllLocks::DropAllLocks):
+        (JSC::JSLock::DropAllLocks::~DropAllLocks):
+        * runtime/JSLock.h:
+        * runtime/Options.h:
+        * runtime/VM.cpp:
+        (JSC::VM::VM):
+        (JSC::VM::updateStackLimitWithReservedZoneSize):
+        * runtime/VM.h:
+        (JSC::VM::reservedZoneSize):
+        * runtime/VMEntryScope.cpp:
+        (JSC::VMEntryScope::VMEntryScope):
+        (JSC::VMEntryScope::~VMEntryScope):
+        * runtime/VMEntryScope.h:
+
+2014-01-09  Mark Lam  &lt;mark.lam@apple.com&gt;
+
</ins><span class="cx">         CStack: Need a separate stack limit for the JS stack and the C stack.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=126320.
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreinterpreterJSStackcpp"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.cpp (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.cpp        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.cpp        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">     , m_topCallFrame(vm.topCallFrame)
</span><span class="cx"> #if ENABLE(LLINT_C_LOOP)
</span><span class="cx">     , m_end(0)
</span><del>-    , m_hostZoneSizeInRegisters(0)
</del><ins>+    , m_reservedZoneSizeInRegisters(0)
</ins><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(LLINT_C_LOOP)
</span><span class="lines">@@ -78,11 +78,11 @@
</span><span class="cx"> 
</span><span class="cx"> bool JSStack::growSlowCase(Register* newTopOfStack)
</span><span class="cx"> {
</span><del>-    Register* newTopOfStackWithHostZone = newTopOfStack - m_hostZoneSizeInRegisters;
</del><ins>+    Register* newTopOfStackWithReservedZone = newTopOfStack - m_reservedZoneSizeInRegisters;
</ins><span class="cx"> 
</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><del>-    if (newTopOfStackWithHostZone &gt;= m_commitTop) {
</del><ins>+    if (newTopOfStackWithReservedZone &gt;= m_commitTop) {
</ins><span class="cx">         setStackLimit(newTopOfStack);
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx">     // Compute the chunk size of additional memory to commit, and see if we
</span><span class="cx">     // have it is still within our budget. If not, we'll fail to grow and
</span><span class="cx">     // return false.
</span><del>-    ptrdiff_t delta = reinterpret_cast&lt;char*&gt;(m_commitTop) - reinterpret_cast&lt;char*&gt;(newTopOfStackWithHostZone);
</del><ins>+    ptrdiff_t delta = reinterpret_cast&lt;char*&gt;(m_commitTop) - reinterpret_cast&lt;char*&gt;(newTopOfStackWithReservedZone);
</ins><span class="cx">     delta = WTF::roundUpToMultipleOf(commitSize, delta);
</span><span class="cx">     Register* newCommitTop = m_commitTop - (delta / sizeof(Register));
</span><span class="cx">     if (newCommitTop &lt; reservationTop())
</span><span class="lines">@@ -130,11 +130,11 @@
</span><span class="cx"> 
</span><span class="cx"> void JSStack::releaseExcessCapacity()
</span><span class="cx"> {
</span><del>-    Register* highAddressWithHostZone = highAddress() - m_hostZoneSizeInRegisters;
-    ptrdiff_t delta = reinterpret_cast&lt;char*&gt;(highAddressWithHostZone) - reinterpret_cast&lt;char*&gt;(m_commitTop);
</del><ins>+    Register* highAddressWithReservedZone = highAddress() - m_reservedZoneSizeInRegisters;
+    ptrdiff_t delta = reinterpret_cast&lt;char*&gt;(highAddressWithReservedZone) - reinterpret_cast&lt;char*&gt;(m_commitTop);
</ins><span class="cx">     m_reservation.decommit(m_commitTop, delta);
</span><span class="cx">     addToCommittedByteCount(-delta);
</span><del>-    m_commitTop = highAddressWithHostZone;
</del><ins>+    m_commitTop = highAddressWithReservedZone;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JSStack::initializeThreading()
</span><span class="lines">@@ -149,10 +149,10 @@
</span><span class="cx">     committedBytesCount += byteCount;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void JSStack::setHostZoneSize(size_t hostZoneSize)
</del><ins>+void JSStack::setReservedZoneSize(size_t reservedZoneSize)
</ins><span class="cx"> {
</span><del>-    m_hostZoneSizeInRegisters = hostZoneSize / sizeof(Register);
-    if (m_commitTop &gt;= (m_end + 1) - m_hostZoneSizeInRegisters)
</del><ins>+    m_reservedZoneSizeInRegisters = reservedZoneSize / sizeof(Register);
+    if (m_commitTop &gt;= (m_end + 1) - m_reservedZoneSizeInRegisters)
</ins><span class="cx">         growSlowCase(m_end + 1);
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(LLINT_C_LOOP)
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreinterpreterJSStackh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.h (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.h        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.h        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> 
</span><span class="cx">         static void initializeThreading();
</span><span class="cx"> 
</span><del>-        void setHostZoneSize(size_t);
</del><ins>+        void setReservedZoneSize(size_t);
</ins><span class="cx"> 
</span><span class="cx">         CallFrame* pushFrame(class CodeBlock*, JSScope*, int argsCount, JSObject* callee);
</span><span class="cx"> 
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx">         Register* m_commitTop;
</span><span class="cx">         PageReservation m_reservation;
</span><span class="cx">         Register* m_lastStackTop;
</span><del>-        ptrdiff_t m_hostZoneSizeInRegisters;
</del><ins>+        ptrdiff_t m_reservedZoneSizeInRegisters;
</ins><span class="cx"> #endif // ENABLE(LLINT_C_LOOP)
</span><span class="cx"> 
</span><span class="cx">         friend class LLIntOffsetsExtractor;
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreinterpreterJSStackInlinesh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/interpreter/JSStackInlines.h (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/interpreter/JSStackInlines.h        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/interpreter/JSStackInlines.h        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -161,7 +161,7 @@
</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="cx">     ptrdiff_t maxExcessCapacity = JSStack::maxExcessCapacity;
</span><del>-    ptrdiff_t maxExcessInRegisters = std::max(maxExcessCapacity, m_hostZoneSizeInRegisters);
</del><ins>+    ptrdiff_t maxExcessInRegisters = std::max(maxExcessCapacity, m_reservedZoneSizeInRegisters);
</ins><span class="cx">     if (m_end == baseOfStack() &amp;&amp; (highAddress() - m_commitTop) &gt;= maxExcessInRegisters)
</span><span class="cx">         releaseExcessCapacity();
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCorellintLowLevelInterpreter32_64asm"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -230,7 +230,7 @@
</span><span class="cx">     storep temp2, VM::m_jsStackLimit[vm]
</span><span class="cx">     storep sp, VM::stackPointerAtVMEntry[vm]
</span><span class="cx"> 
</span><del>-    # The stack host zone ensures that we have adequate space for the
</del><ins>+    # The stack reserved zone ensures that we have adequate space for the
</ins><span class="cx">     # VMEntrySentinelFrame. Proceed with allocating and initializing the
</span><span class="cx">     # sentinel frame.
</span><span class="cx">     move sp, cfr
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCorellintLowLevelInterpreter64asm"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx"> 
</span><span class="cx">     checkStackPointerAlignment(temp2, 0xbad0dc01)
</span><span class="cx"> 
</span><del>-    # The stack host zone ensures that we have adequate space for the
</del><ins>+    # The stack reserved zone ensures that we have adequate space for the
</ins><span class="cx">     # VMEntrySentinelFrame. Proceed with allocating and initializing the
</span><span class="cx">     # sentinel frame.
</span><span class="cx">     move sp, cfr
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreruntimeErrorHandlingScopecpp"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/runtime/ErrorHandlingScope.cpp (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/runtime/ErrorHandlingScope.cpp        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/runtime/ErrorHandlingScope.cpp        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -37,10 +37,10 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_vm.stackPointerAtVMEntry)
</span><span class="cx">         m_vm.stackPointerAtVMEntry = this;
</span><del>-    size_t newHostZoneSize = Options::errorModeHostZoneSize();
-    m_savedHostZoneSize = m_vm.updateStackLimitWithHostZoneSize(newHostZoneSize);
</del><ins>+    size_t newReservedZoneSize = Options::errorModeReservedZoneSize();
+    m_savedReservedZoneSize = m_vm.updateStackLimitWithReservedZoneSize(newReservedZoneSize);
</ins><span class="cx"> #if ENABLE(LLINT_C_LOOP)
</span><del>-    m_vm.interpreter-&gt;stack().setHostZoneSize(newHostZoneSize);
</del><ins>+    m_vm.interpreter-&gt;stack().setReservedZoneSize(newReservedZoneSize);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -48,9 +48,9 @@
</span><span class="cx"> {
</span><span class="cx">     if (m_vm.stackPointerAtVMEntry == this)
</span><span class="cx">         m_vm.stackPointerAtVMEntry = nullptr;
</span><del>-    m_vm.updateStackLimitWithHostZoneSize(m_savedHostZoneSize);
</del><ins>+    m_vm.updateStackLimitWithReservedZoneSize(m_savedReservedZoneSize);
</ins><span class="cx"> #if ENABLE(LLINT_C_LOOP)
</span><del>-    m_vm.interpreter-&gt;stack().setHostZoneSize(m_savedHostZoneSize);
</del><ins>+    m_vm.interpreter-&gt;stack().setReservedZoneSize(m_savedReservedZoneSize);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreruntimeErrorHandlingScopeh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/runtime/ErrorHandlingScope.h (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/runtime/ErrorHandlingScope.h        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/runtime/ErrorHandlingScope.h        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">     JS_EXPORT_PRIVATE ~ErrorHandlingScope();
</span><span class="cx"> private:
</span><span class="cx">     VM&amp; m_vm;
</span><del>-    size_t m_savedHostZoneSize;
</del><ins>+    size_t m_savedReservedZoneSize;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreruntimeJSLockcpp"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/runtime/JSLock.cpp (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/runtime/JSLock.cpp        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/runtime/JSLock.cpp        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     SpinLockHolder holder(&amp;spinLock);
</span><span class="cx"> #endif
</span><del>-    m_savedHostZoneSize = m_vm-&gt;hostZoneSize();
</del><ins>+    m_savedReservedZoneSize = m_vm-&gt;reservedZoneSize();
</ins><span class="cx">     m_savedStackPointerAtVMEntry = m_vm-&gt;stackPointerAtVMEntry;
</span><span class="cx">     m_vm-&gt;stackPointerAtVMEntry = nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -310,7 +310,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     SpinLockHolder holder(&amp;spinLock);
</span><span class="cx"> #endif
</span><del>-    m_savedHostZoneSize = m_vm-&gt;hostZoneSize();
</del><ins>+    m_savedReservedZoneSize = m_vm-&gt;reservedZoneSize();
</ins><span class="cx">     m_savedStackPointerAtVMEntry = m_vm-&gt;stackPointerAtVMEntry;
</span><span class="cx">     m_vm-&gt;stackPointerAtVMEntry = nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx">     m_vm-&gt;apiLock().grabAllLocks(m_lockCount, spinLock);
</span><span class="cx"> 
</span><span class="cx">     m_vm-&gt;stackPointerAtVMEntry = m_savedStackPointerAtVMEntry;
</span><del>-    m_vm-&gt;updateStackLimitWithHostZoneSize(m_savedHostZoneSize);
</del><ins>+    m_vm-&gt;updateStackLimitWithReservedZoneSize(m_savedReservedZoneSize);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreruntimeJSLockh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/runtime/JSLock.h (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/runtime/JSLock.h        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/runtime/JSLock.h        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">         private:
</span><span class="cx">             intptr_t m_lockCount;
</span><span class="cx">             RefPtr&lt;VM&gt; m_vm;
</span><del>-            size_t m_savedHostZoneSize;
</del><ins>+            size_t m_savedReservedZoneSize;
</ins><span class="cx">             void* m_savedStackPointerAtVMEntry;
</span><span class="cx">         };
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreruntimeOptionsh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/runtime/Options.h (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/runtime/Options.h        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/runtime/Options.h        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -96,8 +96,8 @@
</span><span class="cx">     v(bool, useRegExpJIT, true) \
</span><span class="cx">     \
</span><span class="cx">     v(unsigned, maxPerThreadStackUsage, 4 * MB) \
</span><del>-    v(unsigned, hostZoneSize, 128 * KB) \
-    v(unsigned, errorModeHostZoneSize, 64 * KB) \
</del><ins>+    v(unsigned, reservedZoneSize, 128 * KB) \
+    v(unsigned, errorModeReservedZoneSize, 64 * KB) \
</ins><span class="cx">     \
</span><span class="cx">     v(bool, crashIfCantAllocateJITMemory, false) \
</span><span class="cx">     \
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreruntimeVMcpp"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/runtime/VM.cpp (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/runtime/VM.cpp        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/runtime/VM.cpp        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -229,9 +229,9 @@
</span><span class="cx"> {
</span><span class="cx">     interpreter = new Interpreter(*this);
</span><span class="cx">     StackBounds stack = wtfThreadData().stack();
</span><del>-    updateStackLimitWithHostZoneSize(Options::hostZoneSize());
</del><ins>+    updateStackLimitWithReservedZoneSize(Options::reservedZoneSize());
</ins><span class="cx"> #if ENABLE(LLINT_C_LOOP)
</span><del>-    interpreter-&gt;stack().setHostZoneSize(Options::hostZoneSize());
</del><ins>+    interpreter-&gt;stack().setReservedZoneSize(Options::reservedZoneSize());
</ins><span class="cx"> #endif
</span><span class="cx">     setLastStackTop(stack.origin());
</span><span class="cx"> 
</span><span class="lines">@@ -715,22 +715,22 @@
</span><span class="cx">     m_exceptionStack = RefCountedArray&lt;StackFrame&gt;();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-size_t VM::updateStackLimitWithHostZoneSize(size_t hostZoneSize)
</del><ins>+size_t VM::updateStackLimitWithReservedZoneSize(size_t reservedZoneSize)
</ins><span class="cx"> {
</span><del>-    size_t oldHostZoneSize = m_hostZoneSize;
-    m_hostZoneSize = hostZoneSize;
</del><ins>+    size_t oldReservedZoneSize = m_reservedZoneSize;
+    m_reservedZoneSize = reservedZoneSize;
</ins><span class="cx"> 
</span><span class="cx">     void* stackLimit;
</span><span class="cx">     if (stackPointerAtVMEntry) {
</span><span class="cx">         ASSERT(wtfThreadData().stack().isGrowingDownward());
</span><span class="cx">         char* startOfStack = reinterpret_cast&lt;char*&gt;(stackPointerAtVMEntry);
</span><del>-        char* desiredStackLimit = startOfStack - Options::maxPerThreadStackUsage() + hostZoneSize;
-        stackLimit = wtfThreadData().stack().recursionLimit(hostZoneSize, desiredStackLimit);
</del><ins>+        char* desiredStackLimit = startOfStack - Options::maxPerThreadStackUsage() + reservedZoneSize;
+        stackLimit = wtfThreadData().stack().recursionLimit(reservedZoneSize, desiredStackLimit);
</ins><span class="cx">     } else
</span><del>-        stackLimit = wtfThreadData().stack().recursionLimit(hostZoneSize);
</del><ins>+        stackLimit = wtfThreadData().stack().recursionLimit(reservedZoneSize);
</ins><span class="cx"> 
</span><span class="cx">     setStackLimit(stackLimit);
</span><del>-    return oldHostZoneSize;
</del><ins>+    return oldReservedZoneSize;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void releaseExecutableMemory(VM&amp; vm)
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreruntimeVMh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/runtime/VM.h (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/runtime/VM.h        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/runtime/VM.h        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -375,8 +375,8 @@
</span><span class="cx">         JS_EXPORT_PRIVATE JSValue throwException(ExecState*, JSValue);
</span><span class="cx">         JS_EXPORT_PRIVATE JSObject* throwException(ExecState*, JSObject*);
</span><span class="cx">         
</span><del>-        size_t hostZoneSize() const { return m_hostZoneSize; }
-        size_t updateStackLimitWithHostZoneSize(size_t hostZoneSize);
</del><ins>+        size_t reservedZoneSize() const { return m_reservedZoneSize; }
+        size_t updateStackLimitWithReservedZoneSize(size_t reservedZoneSize);
</ins><span class="cx"> 
</span><span class="cx">         void** addressOfJSStackLimit() { return &amp;m_jsStackLimit; }
</span><span class="cx"> #if ENABLE(LLINT_C_LOOP)
</span><span class="lines">@@ -513,7 +513,7 @@
</span><span class="cx"> #if ENABLE(GC_VALIDATION)
</span><span class="cx">         const ClassInfo* m_initializingObjectClass;
</span><span class="cx"> #endif
</span><del>-        size_t m_hostZoneSize;
</del><ins>+        size_t m_reservedZoneSize;
</ins><span class="cx"> #if ENABLE(LLINT_C_LOOP)
</span><span class="cx">         struct {
</span><span class="cx">             void* m_stackLimit;
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreruntimeVMEntryScopecpp"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.cpp (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.cpp        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.cpp        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!vm.stackPointerAtVMEntry) {
</span><span class="cx">         vm.stackPointerAtVMEntry = this;
</span><del>-        m_savedHostZoneSize = vm.updateStackLimitWithHostZoneSize(Options::hostZoneSize());
</del><ins>+        m_savedReservedZoneSize = vm.updateStackLimitWithReservedZoneSize(Options::reservedZoneSize());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Clear the captured exception stack between entries
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">         m_vm.entryScope = nullptr;
</span><span class="cx">     if (m_vm.stackPointerAtVMEntry == this) {
</span><span class="cx">         m_vm.stackPointerAtVMEntry = nullptr;
</span><del>-        m_vm.updateStackLimitWithHostZoneSize(m_savedHostZoneSize);
</del><ins>+        m_vm.updateStackLimitWithReservedZoneSize(m_savedReservedZoneSize);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreruntimeVMEntryScopeh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.h (161581 => 161582)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.h        2014-01-09 22:05:40 UTC (rev 161581)
+++ branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.h        2014-01-09 22:07:31 UTC (rev 161582)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     VM&amp; m_vm;
</span><span class="cx">     StackStats::CheckPoint m_stackCheckPoint;
</span><span class="cx">     JSGlobalObject* m_globalObject;
</span><del>-    size_t m_savedHostZoneSize;
</del><ins>+    size_t m_savedReservedZoneSize;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre>
</div>
</div>

</body>
</html>