| Index: src/spaces.h
|
| diff --git a/src/spaces.h b/src/spaces.h
|
| index 9d299c64841e9256af6ebd0cb5e9811778e8249c..9d47f81ac63dbbf65d357769c02f6307bf6ff15f 100644
|
| --- a/src/spaces.h
|
| +++ b/src/spaces.h
|
| @@ -2061,6 +2061,12 @@ class NewSpacePage : public MemoryChunk {
|
| return NewSpacePage::FromAddress(address_limit - 1);
|
| }
|
|
|
| + // Checks if address1 and address2 are on the same new space page.
|
| + static inline bool OnSamePage(Address address1, Address address2) {
|
| + return NewSpacePage::FromAddress(address1) ==
|
| + NewSpacePage::FromAddress(address2);
|
| + }
|
| +
|
| private:
|
| // Create a NewSpacePage object that is only used as anchor
|
| // for the doubly-linked list of real pages.
|
| @@ -2455,6 +2461,12 @@ class NewSpace : public Space {
|
| allocation_info_.set_top(top);
|
| }
|
|
|
| + // Return the address of the allocation pointer limit in the active semispace.
|
| + Address limit() {
|
| + ASSERT(to_space_.current_page()->ContainsLimit(allocation_info_.limit()));
|
| + return allocation_info_.limit();
|
| + }
|
| +
|
| // Return the address of the first object in the active semispace.
|
| Address bottom() { return to_space_.space_start(); }
|
|
|
|
|