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

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
« no previous file with comments | « src/heap/slot-set.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 86c1ede0ec3eaa26db1a3b38188903c324e162c0..2d291436659130a0e6a7463674685eba27b881b6 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,12 @@ 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_; }
@@ -640,6 +643,8 @@ class MemoryChunk {
kPageHeaderTag);
}
+ bool HasPageHeader() { return owner() != nullptr; }
+
void InsertAfter(MemoryChunk* other);
void Unlink();
@@ -684,6 +689,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 +743,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
« no previous file with comments | « src/heap/slot-set.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698