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

Log Message

CStack: Cosmetic: rename reservationEnd() to reservationTop().
https://bugs.webkit.org/show_bug.cgi?id=126181.

Not yet reviewed.

reservationEnd() computes the end of the stack at the top. The value
is computed as:

    char* reservationEnd = static_cast<char*>(m_reservation.base());
    return reinterpret_cast_ptr<Register*>(reservationEnd);

Since m_reservation.base() points at a slot of memory that is within the
allocatable range of the stack, naming this function reservationEnd() is
inappropriate.  Per Geoff's input, "end" usually refers to the slot past
the end of a buffer. Calling it "top" is more appropriate. Hence, I'm
renaming it to reservationTop().

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

Modified Paths

Diff

Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (161024 => 161025)


--- branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-23 22:51:21 UTC (rev 161024)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-23 23:04:13 UTC (rev 161025)
@@ -1,3 +1,28 @@
+2013-12-23  Mark Lam  <[email protected]>
+
+        CStack: Cosmetic: rename reservationEnd() to reservationTop().
+        https://bugs.webkit.org/show_bug.cgi?id=126181.
+
+        Not yet reviewed.
+
+        reservationEnd() computes the end of the stack at the top. The value
+        is computed as:
+
+            char* reservationEnd = static_cast<char*>(m_reservation.base());
+            return reinterpret_cast_ptr<Register*>(reservationEnd);
+
+        Since m_reservation.base() points at a slot of memory that is within the
+        allocatable range of the stack, naming this function reservationEnd() is
+        inappropriate.  Per Geoff's input, "end" usually refers to the slot past
+        the end of a buffer. Calling it "top" is more appropriate. Hence, I'm
+        renaming it to reservationTop().
+
+        * interpreter/JSStack.cpp:
+        (JSC::JSStack::enableErrorStackReserve):
+        (JSC::JSStack::disableErrorStackReserve):
+        * interpreter/JSStack.h:
+        (JSC::JSStack::reservationTop):
+
 2013-12-23  Filip Pizlo  <[email protected]>
 
         CStack Branch: Several dfg-arguments-osr-exit tests fail

Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp (161024 => 161025)


--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp	2013-12-23 22:51:21 UTC (rev 161024)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp	2013-12-23 23:04:13 UTC (rev 161025)
@@ -147,12 +147,12 @@
 
 void JSStack::enableErrorStackReserve()
 {
-    m_useableEnd = reservationEnd();
+    m_useableEnd = reservationTop();
 }
 
 void JSStack::disableErrorStackReserve()
 {
-    char* useableEnd = reinterpret_cast<char*>(reservationEnd()) + commitSize;
+    char* useableEnd = reinterpret_cast<char*>(reservationTop()) + commitSize;
     m_useableEnd = reinterpret_cast_ptr<Register*>(useableEnd);
 
     // By the time we get here, we are guaranteed to be destructing the last

Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h (161024 => 161025)


--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h	2013-12-23 22:51:21 UTC (rev 161024)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h	2013-12-23 23:04:13 UTC (rev 161025)
@@ -146,10 +146,10 @@
 #endif // ENABLE(LLINT_C_LOOP)
 
 #if ENABLE(LLINT_C_LOOP)
-        Register* reservationEnd() const
+        Register* reservationTop() const
         {
-            char* reservationEnd = static_cast<char*>(m_reservation.base());
-            return reinterpret_cast_ptr<Register*>(reservationEnd);
+            char* reservationTop = static_cast<char*>(m_reservation.base());
+            return reinterpret_cast_ptr<Register*>(reservationTop);
         }
 
 #if ENABLE(DEBUG_JSSTACK)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to