Index: src/heap/spaces.cc |
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc |
index cdf1a193b60295099d38b111f09ebba3f550a9f8..3e3f593ae10a41b0f6681eeddf2d0b433077192f 100644 |
--- a/src/heap/spaces.cc |
+++ b/src/heap/spaces.cc |
@@ -35,7 +35,7 @@ HeapObjectIterator::HeapObjectIterator(Page* page) { |
owner == page->heap()->code_space()); |
Initialize(reinterpret_cast<PagedSpace*>(owner), page->area_start(), |
page->area_end(), kOnePageOnly); |
- DCHECK(page->WasSwept() || page->SweepingCompleted()); |
+ DCHECK(page->SweepingDone()); |
} |
@@ -66,7 +66,7 @@ bool HeapObjectIterator::AdvanceToNextPage() { |
cur_page); |
cur_addr_ = cur_page->area_start(); |
cur_end_ = cur_page->area_end(); |
- DCHECK(cur_page->WasSwept() || cur_page->SweepingCompleted()); |
+ DCHECK(cur_page->SweepingDone()); |
return true; |
} |
@@ -469,7 +469,7 @@ MemoryChunk* MemoryChunk::Initialize(Heap* heap, Address base, size_t size, |
chunk->write_barrier_counter_ = kWriteBarrierCounterGranularity; |
chunk->progress_bar_ = 0; |
chunk->high_water_mark_.SetValue(static_cast<intptr_t>(area_start - base)); |
- chunk->parallel_sweeping_state().SetValue(kSweepingDone); |
+ chunk->concurrent_sweeping_state().SetValue(kSweepingDone); |
chunk->parallel_compaction_state().SetValue(kCompactingDone); |
chunk->mutex_ = NULL; |
chunk->available_in_small_free_list_ = 0; |
@@ -480,7 +480,6 @@ MemoryChunk* MemoryChunk::Initialize(Heap* heap, Address base, size_t size, |
chunk->ResetLiveBytes(); |
Bitmap::Clear(chunk); |
chunk->initialize_scan_on_scavenge(false); |
- chunk->SetFlag(WAS_SWEPT); |
chunk->set_next_chunk(nullptr); |
chunk->set_prev_chunk(nullptr); |
@@ -923,7 +922,7 @@ bool MemoryAllocator::CommitExecutableMemory(base::VirtualMemory* vm, |
void MemoryChunk::IncrementLiveBytesFromMutator(HeapObject* object, int by) { |
MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); |
- if (!chunk->InNewSpace() && !static_cast<Page*>(chunk)->WasSwept()) { |
+ if (!chunk->InNewSpace() && !static_cast<Page*>(chunk)->SweepingDone()) { |
static_cast<PagedSpace*>(chunk->owner())->Allocate(by); |
} |
chunk->IncrementLiveBytes(by); |
@@ -1225,11 +1224,11 @@ void PagedSpace::IncreaseCapacity(int size) { |
} |
-void PagedSpace::ReleasePage(Page* page) { |
+void PagedSpace::ReleasePage(Page* page, bool evict_free_list_items) { |
DCHECK(page->LiveBytes() == 0); |
DCHECK(AreaSize() == page->area_size()); |
- if (page->WasSwept()) { |
+ if (evict_free_list_items) { |
intptr_t size = free_list_.EvictFreeListItems(page); |
accounting_stats_.AllocateBytes(size); |
DCHECK_EQ(AreaSize(), static_cast<int>(size)); |
@@ -1275,7 +1274,7 @@ void PagedSpace::Verify(ObjectVisitor* visitor) { |
if (page == Page::FromAllocationTop(allocation_info_.top())) { |
allocation_pointer_found_in_space = true; |
} |
- CHECK(page->WasSwept()); |
+ CHECK(page->SweepingDone()); |
HeapObjectIterator it(page); |
Address end_of_previous_object = page->area_start(); |
Address top = page->area_end(); |