| Index: src/heap/spaces.h
|
| diff --git a/src/heap/spaces.h b/src/heap/spaces.h
|
| index 51afa7b19aa88788a9f138a3e2c25161389fbf1d..97f9de996f6cc8abd753072b4c003ac36bb4add9 100644
|
| --- a/src/heap/spaces.h
|
| +++ b/src/heap/spaces.h
|
| @@ -1635,39 +1635,51 @@
|
| // space.
|
| class AllocationInfo {
|
| public:
|
| - AllocationInfo() { Reset(nullptr, nullptr); }
|
| - AllocationInfo(Address top, Address limit) { Reset(top, limit); }
|
| + AllocationInfo() : top_(nullptr), limit_(nullptr) {}
|
| + AllocationInfo(Address top, Address limit) : top_(top), limit_(limit) {}
|
|
|
| void Reset(Address top, Address limit) {
|
| set_top(top);
|
| set_limit(limit);
|
| }
|
|
|
| - inline void set_top(Address top) {
|
| - SLOW_DCHECK((reinterpret_cast<intptr_t>(top) & kHeapObjectTagMask) == 0);
|
| - top_ = reinterpret_cast<intptr_t>(top) + kHeapObjectTag;
|
| - }
|
| -
|
| - inline Address top() const {
|
| - SLOW_DCHECK((top_ & kHeapObjectTagMask) == kHeapObjectTag);
|
| - return reinterpret_cast<Address>(top_ - kHeapObjectTag);
|
| - }
|
| -
|
| - Address* top_address() { return reinterpret_cast<Address*>(&top_); }
|
| -
|
| - inline void set_limit(Address limit) {
|
| - limit_ = reinterpret_cast<intptr_t>(limit);
|
| - }
|
| -
|
| - inline Address limit() const { return reinterpret_cast<Address>(limit_); }
|
| -
|
| - Address* limit_address() { return reinterpret_cast<Address*>(&limit_); }
|
| + INLINE(void set_top(Address top)) {
|
| + SLOW_DCHECK(top == NULL ||
|
| + (reinterpret_cast<intptr_t>(top) & kHeapObjectTagMask) == 0);
|
| + top_ = top;
|
| + }
|
| +
|
| + INLINE(Address top()) const {
|
| + SLOW_DCHECK(top_ == NULL ||
|
| + (reinterpret_cast<intptr_t>(top_) & kHeapObjectTagMask) == 0);
|
| + return top_;
|
| + }
|
| +
|
| + Address* top_address() { return &top_; }
|
| +
|
| + INLINE(void set_limit(Address limit)) {
|
| + limit_ = limit;
|
| + }
|
| +
|
| + INLINE(Address limit()) const {
|
| + return limit_;
|
| + }
|
| +
|
| + Address* limit_address() { return &limit_; }
|
| +
|
| +#ifdef DEBUG
|
| + bool VerifyPagedAllocation() {
|
| + return (Page::FromAllocationAreaAddress(top_) ==
|
| + Page::FromAllocationAreaAddress(limit_)) &&
|
| + (top_ <= limit_);
|
| + }
|
| +#endif
|
|
|
| private:
|
| - // Current tagged allocation top.
|
| - intptr_t top_;
|
| - // Current untagged allocation limit.
|
| - intptr_t limit_;
|
| + // Current allocation top.
|
| + Address top_;
|
| + // Current allocation limit.
|
| + Address limit_;
|
| };
|
|
|
|
|
|
|