Bug 126181 - CStack: Cosmetic: rename reservationEnd() to reservationTop()
Summary: CStack: Cosmetic: rename reservationEnd() to reservationTop()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks: 125849
  Show dependency treegraph
 
Reported: 2013-12-23 14:53 PST by Mark Lam
Modified: 2013-12-23 16:50 PST (History)
5 users (show)

See Also:


Attachments
the patch. (2.89 KB, patch)
2013-12-23 14:57 PST, Mark Lam
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2013-12-23 14:53:22 PST
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, 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 will rename it to reservationTop().
Comment 1 Mark Lam 2013-12-23 14:57:49 PST
Created attachment 219932 [details]
the patch.
Comment 2 Mark Lam 2013-12-23 15:01:18 PST
Landed in r161025 on the jsCStack branch: <http://trac.webkit.org/r161025>.
Comment 3 Mark Lam 2013-12-23 16:50:24 PST
Thanks for the review. Review status updated in r161039: <http://trac.webkit.org/r161039>.