Bug 126186 - CStack: Cosmetic: rename JSStack::m_commitEnd to m_commitTop.
Summary: CStack: Cosmetic: rename JSStack::m_commitEnd to m_commitTop.
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 15:26 PST by Mark Lam
Modified: 2014-01-13 17:58 PST (History)
5 users (show)

See Also:


Attachments
the patch. (6.56 KB, patch)
2013-12-23 15:36 PST, Mark Lam
ggaren: 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 15:26:43 PST
In the JSStack constructor, m_commitEnd is initialized to highAddress() which is the address just above the start of the stack.  This is appropriate because no memory has been committed for the stack yet i.e. highAddress() - m_commitEnd should equal 0.  When we grow the stack in growSlowCase, we set m_commitEnd to m_commitEnd - delta, where delta is some even multiple of commitSize (some units of page size).  This means that if there is memory committed, m_commitEnd would point to an allocatable slot in the stack, not past it.  Hence, m_commitEnd should more appropriately be named m_commitTop.
Comment 1 Mark Lam 2013-12-23 15:36:05 PST
Created attachment 219937 [details]
the patch.
Comment 2 Mark Lam 2013-12-23 15:36:05 PST
Created attachment 219938
Comment 3 Mark Lam 2013-12-23 15:40:02 PST
Landed in r161030 on the jsCStack branch: <http://trac.webkit.org/r161030>.
Comment 4 Geoffrey Garen 2014-01-13 17:41:35 PST
Comment on attachment 219937 [details]
the patch.

r=me
Comment 5 Mark Lam 2014-01-13 17:58:21 PST
Thanks.  Review status updated in r161934 on the jsCStack branch: <http://trac.webkit.org/r161934>.