| Index: src/heap/mark-compact.h
|
| diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
|
| index 99a50487f9c457465c8879f9efd20bd08d569eb7..8ab877ef555e82aebfdb12668acc22c4dc1cd418 100644
|
| --- a/src/heap/mark-compact.h
|
| +++ b/src/heap/mark-compact.h
|
| @@ -306,12 +306,15 @@ class SlotsBuffer {
|
| slots_[idx_++] = slot;
|
| }
|
|
|
| - // Should be used for testing only.
|
| + void Set(intptr_t i, ObjectSlot slot) { slots_[i] = slot; }
|
| +
|
| ObjectSlot Get(intptr_t i) {
|
| - DCHECK(i >= 0 && i < kNumberOfElements);
|
| + DCHECK(i >= 0 && i < idx_);
|
| return slots_[i];
|
| }
|
|
|
| + size_t Size() const { return idx_; }
|
| +
|
| enum SlotType {
|
| EMBEDDED_OBJECT_SLOT,
|
| OBJECT_SLOT,
|
| @@ -396,19 +399,10 @@ class SlotsBuffer {
|
| SlotsBuffer** buffer_address, SlotType type, Address addr,
|
| AdditionMode mode);
|
|
|
| - // Eliminates all stale entries from the slots buffer, i.e., slots that
|
| - // are not part of live objects anymore. This method must be called after
|
| - // marking, when the whole transitive closure is known and must be called
|
| - // before sweeping when mark bits are still intact.
|
| - static void RemoveInvalidSlots(Heap* heap, SlotsBuffer* buffer);
|
| -
|
| // Eliminate all slots that are within the given address range.
|
| static void RemoveObjectSlots(Heap* heap, SlotsBuffer* buffer,
|
| Address start_slot, Address end_slot);
|
|
|
| - // Ensures that there are no invalid slots in the chain of slots buffers.
|
| - static void VerifySlots(Heap* heap, SlotsBuffer* buffer);
|
| -
|
| static const int kNumberOfElements = 1021;
|
|
|
| private:
|
| @@ -684,8 +678,16 @@ class MarkCompactCollector {
|
|
|
| bool WillBeDeoptimized(Code* code);
|
| void EvictPopularEvacuationCandidate(Page* page);
|
| +
|
| + // Clears invald store buffer and slots buffer entries. This method must
|
| + // be called after marking, when the whole transitive closure is known and
|
| + // must be called before sweeping when mark bits are still intact.
|
| void ClearInvalidStoreAndSlotsBufferEntries();
|
|
|
| + // Eliminates all stale entries from the slots buffer, i.e., slots that
|
| + // are not part of live objects anymore.
|
| + void ClearInvalidSlotsBufferEntries(SlotsBuffer* buffer);
|
| +
|
| void StartSweeperThreads();
|
|
|
| #ifdef DEBUG
|
|
|