Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: src/heap/heap.cc

Issue 1783313003: [heap] Use struct Entry to fill inlined promotion queue entries. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 389af1bec1108e5040d27d90666fe48275976140..9734d5544b117b13bb054cc05cd645a0278fd62e 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1581,13 +1581,12 @@ void PromotionQueue::RelocateQueueHead() {
emergency_stack_ = new List<Entry>(2 * entries_count);
while (head_start != head_end) {
- int size = static_cast<int>(*(head_start++));
- HeapObject* obj = reinterpret_cast<HeapObject*>(*(head_start++));
+ struct Entry* entry = reinterpret_cast<struct Entry*>(head_start);
ulan 2016/03/11 12:16:55 I think we need to increment head_start here.
Hannes Payer (out of office) 2016/03/11 12:23:19 Done.
// New space allocation in SemiSpaceCopyObject marked the region
// overlapping with promotion queue as uninitialized.
- MSAN_MEMORY_IS_INITIALIZED(&size, sizeof(size));
- MSAN_MEMORY_IS_INITIALIZED(&obj, sizeof(obj));
- emergency_stack_->Add(Entry(obj, size));
+ MSAN_MEMORY_IS_INITIALIZED(&entry->size_, sizeof(size));
+ MSAN_MEMORY_IS_INITIALIZED(&entry->obj_, sizeof(obj));
+ emergency_stack_->Add(*entry);
}
rear_ = head_end;
}
@@ -1945,7 +1944,7 @@ Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor,
{
while (!promotion_queue()->is_empty()) {
HeapObject* target;
- int size;
+ intptr_t size;
promotion_queue()->remove(&target, &size);
// Promoted object might be already partially visited
@@ -1954,7 +1953,8 @@ Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor,
// to new space.
DCHECK(!target->IsMap());
- IteratePointersToFromSpace(target, size, &Scavenger::ScavengeObject);
+ IteratePointersToFromSpace(target, static_cast<int>(size),
+ &Scavenger::ScavengeObject);
}
}
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698