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

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

Issue 7834018: Support compaction for code space pages. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: port changes from ia32 to arm & x64 Created 9 years, 3 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
Index: src/mark-compact-inl.h
diff --git a/src/mark-compact-inl.h b/src/mark-compact-inl.h
index c28e6e3e29d6507fab97ff0b2ba7da2eef4cc638..20f11a78a2e34f61ce5464217839b6f66b89094e 100644
--- a/src/mark-compact-inl.h
+++ b/src/mark-compact-inl.h
@@ -32,6 +32,7 @@
#include "memory.h"
#include "mark-compact.h"
+
namespace v8 {
namespace internal {
@@ -79,6 +80,22 @@ bool MarkCompactCollector::IsMarked(Object* obj) {
}
+void MarkCompactCollector::RecordSlot(Object** anchor_slot,
+ Object** slot,
+ Object* object) {
+ Page* object_page = Page::FromAddress(reinterpret_cast<Address>(object));
+ if (object_page->IsEvacuationCandidate() &&
+ !ShouldSkipEvacuationSlotRecording(anchor_slot)) {
+ if (!SlotsBuffer::AddTo(&slots_buffer_allocator_,
+ object_page->slots_buffer_address(),
+ slot,
+ SlotsBuffer::FAIL_ON_OVERFLOW)) {
+ EvictEvacuationCandidate(object_page);
+ }
+ }
+}
+
+
} } // namespace v8::internal
#endif // V8_MARK_COMPACT_INL_H_

Powered by Google App Engine
This is Rietveld 408576698