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

Unified Diff: src/heap/spaces.h

Issue 1683653002: Add a generic remembered set class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 1ae8101d1d07fdb9711a04016a25980337f02418..92b106c9284bc983a88488b69d24462834059f4e 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -398,6 +398,7 @@ class MemoryChunk {
static const size_t kWriteBarrierCounterOffset =
kSlotsBufferOffset + kPointerSize // SlotsBuffer* slots_buffer_;
+ kPointerSize // SlotSet* old_to_new_slots_;
+ + kPointerSize // SlotSet* old_to_old_slots_;
+ kPointerSize; // SkipList* skip_list_;
static const size_t kMinHeaderSize =
@@ -437,7 +438,6 @@ class MemoryChunk {
return reinterpret_cast<MemoryChunk*>(OffsetFrom(a) & ~kAlignmentMask);
}
- // Only works for addresses in pointer spaces, not data or code spaces.
static inline MemoryChunk* FromAnyPointerAddress(Heap* heap, Address addr);
static inline void UpdateHighWaterMark(Address mark) {
@@ -514,9 +514,13 @@ class MemoryChunk {
inline SlotsBuffer** slots_buffer_address() { return &slots_buffer_; }
inline SlotSet* old_to_new_slots() { return old_to_new_slots_; }
+ inline SlotSet* old_to_old_slots() { return old_to_old_slots_; }
void AllocateOldToNewSlots();
void ReleaseOldToNewSlots();
+ void AllocateOldToOldSlots();
+ void ReleaseOldToOldSlots();
+
Address area_start() { return area_start_; }
Address area_end() { return area_end_; }
@@ -684,6 +688,7 @@ class MemoryChunk {
// set for large pages. In the latter case the number of entries in the array
// is ceil(size() / kPageSize).
SlotSet* old_to_new_slots_;
+ SlotSet* old_to_old_slots_;
SkipList* skip_list_;
@@ -737,6 +742,9 @@ class Page : public MemoryChunk {
return reinterpret_cast<Page*>(OffsetFrom(a) & ~kPageAlignmentMask);
}
+ // Only works for addresses in pointer spaces, not code space.
+ inline static Page* FromAnyPointerAddress(Heap* heap, Address addr);
+
// Returns the page containing an allocation top. Because an allocation
// top address can be the upper bound of the page, we need to subtract
// it with kPointerSize first. The address ranges from

Powered by Google App Engine
This is Rietveld 408576698