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

Unified Diff: src/heap/heap-inl.h

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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap-inl.h
diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
index 1480da34108c5e49cd992b10de421520f777e0aa..de5446d0d53ad2ee80580e8edf405976ab4c6f3f 100644
--- a/src/heap/heap-inl.h
+++ b/src/heap/heap-inl.h
@@ -25,20 +25,22 @@
namespace v8 {
namespace internal {
-void PromotionQueue::insert(HeapObject* target, int size) {
+void PromotionQueue::insert(HeapObject* target, intptr_t size) {
if (emergency_stack_ != NULL) {
emergency_stack_->Add(Entry(target, size));
return;
}
- if ((rear_ - 2) < limit_) {
+ if ((rear_ - 1) < limit_) {
RelocateQueueHead();
emergency_stack_->Add(Entry(target, size));
return;
}
- *(--rear_) = reinterpret_cast<intptr_t>(target);
- *(--rear_) = size;
+ struct Entry* entry = reinterpret_cast<struct Entry*>(--rear_);
+ entry->obj_ = target;
+ entry->size_ = size;
+
// Assert no overflow into live objects.
#ifdef DEBUG
SemiSpace::AssertValidRange(target->GetIsolate()->heap()->new_space()->top(),
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698