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

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

Issue 2005173003: Immediatelly promote marked objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rewrite using PromotionMode Created 4 years, 7 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/scavenger.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/scavenger-inl.h
diff --git a/src/heap/scavenger-inl.h b/src/heap/scavenger-inl.h
index 3b96f648f79a818121e2076d961687680aed2bf3..5c208540abf8c2d3c6edb2f8d0410b55d24d525c 100644
--- a/src/heap/scavenger-inl.h
+++ b/src/heap/scavenger-inl.h
@@ -68,9 +68,12 @@ void StaticScavengeVisitor::VisitPointer(Heap* heap, HeapObject* obj,
Object** p) {
Object* object = *p;
if (!heap->InNewSpace(object)) return;
+ PromotionMode promotion_mode = heap->incremental_marking()->IsMarking()
+ ? PROMOTE_MARKED
+ : DEFAULT_PROMOTION;
Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p),
reinterpret_cast<HeapObject*>(object),
- DEFAULT_PROMOTION);
+ promotion_mode);
}
} // namespace internal
« no previous file with comments | « src/heap/scavenger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698