Index: src/heap/spaces.h |
diff --git a/src/heap/spaces.h b/src/heap/spaces.h |
index 532c9b2e878f2cad7e1a3dc3d2c67ae6443d5490..e391c4121f44702d10d972db3b7a70b91e6847de 100644 |
--- a/src/heap/spaces.h |
+++ b/src/heap/spaces.h |
@@ -286,6 +286,7 @@ class Bitmap { |
class SkipList; |
class SlotsBuffer; |
+class SlotSet; |
// MemoryChunk represents a memory region owned by a specific space. |
// It is divided into the header and the body. Chunk start is always |
@@ -298,7 +299,6 @@ class MemoryChunk { |
ABOUT_TO_BE_FREED, |
POINTERS_TO_HERE_ARE_INTERESTING, |
POINTERS_FROM_HERE_ARE_INTERESTING, |
- SCAN_ON_SCAVENGE, |
IN_FROM_SPACE, // Mutually exclusive with IN_TO_SPACE. |
IN_TO_SPACE, // All pages in new space has one of these two set. |
NEW_SPACE_BELOW_AGE_MARK, |
@@ -403,6 +403,7 @@ class MemoryChunk { |
static const size_t kWriteBarrierCounterOffset = |
kSlotsBufferOffset + kPointerSize // SlotsBuffer* slots_buffer_; |
+ + kPointerSize // SlotSet* old_to_new_slots_; |
+ kPointerSize; // SkipList* skip_list_; |
static const size_t kMinHeaderSize = |
@@ -508,16 +509,6 @@ class MemoryChunk { |
reservation_.TakeControl(reservation); |
} |
- bool scan_on_scavenge() { return IsFlagSet(SCAN_ON_SCAVENGE); } |
- void initialize_scan_on_scavenge(bool scan) { |
- if (scan) { |
- SetFlag(SCAN_ON_SCAVENGE); |
- } else { |
- ClearFlag(SCAN_ON_SCAVENGE); |
- } |
- } |
- inline void set_scan_on_scavenge(bool scan); |
- |
bool Contains(Address addr) { |
return addr >= area_start() && addr < area_end(); |
} |
@@ -704,6 +695,11 @@ class MemoryChunk { |
inline SlotsBuffer** slots_buffer_address() { return &slots_buffer_; } |
+ inline SlotSet* old_to_new_slots() { return old_to_new_slots_; } |
+ |
+ void AllocateOldToNewSlots(); |
+ void ReleaseOldToNewSlots(); |
+ |
void MarkEvacuationCandidate() { |
DCHECK(!IsFlagSet(NEVER_EVACUATE)); |
DCHECK(slots_buffer_ == NULL); |
@@ -751,6 +747,10 @@ class MemoryChunk { |
// Count of bytes marked black on page. |
int live_byte_count_; |
SlotsBuffer* slots_buffer_; |
+ // A single slot set for small pages (of size kPageSize) or an array of slot |
+ // set for large pages. In the latter case the number of entries in the array |
+ // is ceil(size() / kPageSize). |
+ SlotSet* old_to_new_slots_; |
SkipList* skip_list_; |
intptr_t write_barrier_counter_; |
// Assuming the initial allocation on a page is sequential, |
@@ -2266,8 +2266,7 @@ class NewSpacePage : public MemoryChunk { |
// flipping semispaces. |
static const intptr_t kCopyOnFlipFlagsMask = |
(1 << MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING) | |
- (1 << MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING) | |
- (1 << MemoryChunk::SCAN_ON_SCAVENGE); |
+ (1 << MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); |
static const int kAreaSize = Page::kAllocatableMemory; |