| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index 05ed81e791e4b20c46d851104d27e03e69dabf0c..ea053c26a847be4eed43144a23f6eebca90496b1 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -356,9 +356,9 @@ class PromotionQueue {
|
| (emergency_stack_ == NULL || emergency_stack_->length() == 0);
|
| }
|
|
|
| - inline void insert(HeapObject* target, int size);
|
| + inline void insert(HeapObject* target, intptr_t size);
|
|
|
| - void remove(HeapObject** target, int* size) {
|
| + void remove(HeapObject** target, intptr_t* size) {
|
| DCHECK(!is_empty());
|
| if (front_ == rear_) {
|
| Entry e = emergency_stack_->RemoveLast();
|
| @@ -367,8 +367,11 @@ class PromotionQueue {
|
| return;
|
| }
|
|
|
| - *target = reinterpret_cast<HeapObject*>(*(--front_));
|
| - *size = static_cast<int>(*(--front_));
|
| + front_ -= kEntrySizeInWords;
|
| + struct Entry* entry = reinterpret_cast<struct Entry*>(front_);
|
| + *target = entry->obj_;
|
| + *size = entry->size_;
|
| +
|
| // Assert no underflow.
|
| SemiSpace::AssertValidRange(reinterpret_cast<Address>(rear_),
|
| reinterpret_cast<Address>(front_));
|
| @@ -383,10 +386,10 @@ class PromotionQueue {
|
| static const int kEntrySizeInWords = 2;
|
|
|
| struct Entry {
|
| - Entry(HeapObject* obj, int size) : obj_(obj), size_(size) {}
|
| + Entry(HeapObject* obj, intptr_t size) : obj_(obj), size_(size) {}
|
|
|
| HeapObject* obj_;
|
| - int size_;
|
| + intptr_t size_;
|
| };
|
| List<Entry>* emergency_stack_;
|
|
|
| @@ -394,6 +397,8 @@ class PromotionQueue {
|
|
|
| void RelocateQueueHead();
|
|
|
| + STATIC_ASSERT(sizeof(struct Entry) == kEntrySizeInWords * kPointerSize);
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PromotionQueue);
|
| };
|
|
|
|
|