Title: [161027] branches/jsCStack/Source/_javascript_Core
Revision
161027
Author
[email protected]
Date
2013-12-23 15:17:25 -0800 (Mon, 23 Dec 2013)

Log Message

CStack: Cosmetic: rename JSStack::m_useableEnd to m_useableTop.
https://bugs.webkit.org/show_bug.cgi?id=126184.

Not yet reviewed.

In JSStack::enableErrorStackReserve() and disableErrorStackReserve(),
m_useableEnd is initialize to reservationTop() or reservationTop() +
commitSize. Hence, it points to an allocatable slot in the stack, not
past it. Naming it m_useableTop is more correct.

* interpreter/JSStack.cpp:
(JSC::JSStack::growSlowCase):
(JSC::JSStack::enableErrorStackReserve):
(JSC::JSStack::disableErrorStackReserve):
* interpreter/JSStack.h:

Modified Paths

Diff

Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (161026 => 161027)


--- branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-23 23:13:21 UTC (rev 161026)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-23 23:17:25 UTC (rev 161027)
@@ -1,5 +1,23 @@
 2013-12-23  Mark Lam  <[email protected]>
 
+        CStack: Cosmetic: rename JSStack::m_useableEnd to m_useableTop.
+        https://bugs.webkit.org/show_bug.cgi?id=126184.
+
+        Not yet reviewed.
+
+        In JSStack::enableErrorStackReserve() and disableErrorStackReserve(),
+        m_useableEnd is initialize to reservationTop() or reservationTop() +
+        commitSize. Hence, it points to an allocatable slot in the stack, not
+        past it. Naming it m_useableTop is more correct.
+
+        * interpreter/JSStack.cpp:
+        (JSC::JSStack::growSlowCase):
+        (JSC::JSStack::enableErrorStackReserve):
+        (JSC::JSStack::disableErrorStackReserve):
+        * interpreter/JSStack.h:
+
+2013-12-23  Mark Lam  <[email protected]>
+
         CStack: Cosmetic: rename reservationEnd() to reservationTop().
         https://bugs.webkit.org/show_bug.cgi?id=126181.
 

Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp (161026 => 161027)


--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp	2013-12-23 23:13:21 UTC (rev 161026)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp	2013-12-23 23:17:25 UTC (rev 161027)
@@ -90,7 +90,7 @@
     // have it is still within our budget. If not, we'll fail to grow and
     // return false.
     long delta = roundUpAllocationSize(reinterpret_cast<char*>(m_commitEnd) - reinterpret_cast<char*>(newEnd), commitSize);
-    if (reinterpret_cast<char*>(m_commitEnd) - delta <= reinterpret_cast<char*>(m_useableEnd))
+    if (reinterpret_cast<char*>(m_commitEnd) - delta <= reinterpret_cast<char*>(m_useableTop))
         return false;
 
     // Otherwise, the growth is still within our budget. Go ahead and commit
@@ -147,22 +147,22 @@
 
 void JSStack::enableErrorStackReserve()
 {
-    m_useableEnd = reservationTop();
+    m_useableTop = reservationTop();
 }
 
 void JSStack::disableErrorStackReserve()
 {
-    char* useableEnd = reinterpret_cast<char*>(reservationTop()) + commitSize;
-    m_useableEnd = reinterpret_cast_ptr<Register*>(useableEnd);
+    char* useableTop = reinterpret_cast<char*>(reservationTop()) + commitSize;
+    m_useableTop = reinterpret_cast_ptr<Register*>(useableTop);
 
     // By the time we get here, we are guaranteed to be destructing the last
     // Interpreter::ErrorHandlingMode that enabled this reserve in the first
-    // place. That means the stack space beyond m_useableEnd before we
+    // place. That means the stack space beyond m_useableTop before we
     // enabled the reserve was not previously in use. Hence, it is safe to
-    // shrink back to that m_useableEnd.
-    if (m_end < m_useableEnd) {
-        ASSERT(m_topCallFrame->topOfFrame() > m_useableEnd);
-        shrink(m_useableEnd);
+    // shrink back to that m_useableTop.
+    if (m_end < m_useableTop) {
+        ASSERT(m_topCallFrame->topOfFrame() > m_useableTop);
+        shrink(m_useableTop);
     }
 }
 #endif // ENABLE(LLINT_C_LOOP)

Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h (161026 => 161027)


--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h	2013-12-23 23:13:21 UTC (rev 161026)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h	2013-12-23 23:17:25 UTC (rev 161027)
@@ -177,7 +177,7 @@
 #if ENABLE(LLINT_C_LOOP)
         Register* m_end;
         Register* m_commitEnd;
-        Register* m_useableEnd;
+        Register* m_useableTop;
         PageReservation m_reservation;
         Register* m_lastStackTop;
 #endif // ENABLE(LLINT_C_LOOP)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to