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

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

Issue 1259613006: Change RecordSlot interface. Make it more robust by replacing anchor slot with actual object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/mark-compact.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact-inl.h
diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h
index de8df3d77acdfe94c83b4cb98796a327d2024f9c..c78ae650df9ffea23cd42705abdc4d60f75fb09c 100644
--- a/src/heap/mark-compact-inl.h
+++ b/src/heap/mark-compact-inl.h
@@ -55,15 +55,15 @@ bool MarkCompactCollector::IsMarked(Object* obj) {
}
-void MarkCompactCollector::RecordSlot(Object** anchor_slot, Object** slot,
- Object* object,
+void MarkCompactCollector::RecordSlot(HeapObject* object, Object** slot,
+ Object* target,
SlotsBuffer::AdditionMode mode) {
- Page* object_page = Page::FromAddress(reinterpret_cast<Address>(object));
- if (object_page->IsEvacuationCandidate() &&
- !ShouldSkipEvacuationSlotRecording(anchor_slot)) {
+ Page* target_page = Page::FromAddress(reinterpret_cast<Address>(target));
+ if (target_page->IsEvacuationCandidate() &&
+ !ShouldSkipEvacuationSlotRecording(object)) {
if (!SlotsBuffer::AddTo(&slots_buffer_allocator_,
- object_page->slots_buffer_address(), slot, mode)) {
- EvictPopularEvacuationCandidate(object_page);
+ target_page->slots_buffer_address(), slot, mode)) {
+ EvictPopularEvacuationCandidate(target_page);
}
}
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698