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

Side by Side Diff: src/heap/store-buffer.cc

Issue 1614953002: [heap] Cleanup: Remove WAS_SWEPT flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/heap/spaces.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/store-buffer.h" 5 #include "src/heap/store-buffer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/counters.h" 9 #include "src/counters.h"
10 #include "src/heap/incremental-marking.h" 10 #include "src/heap/incremental-marking.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 LargePage* large_page = reinterpret_cast<LargePage*>(chunk); 469 LargePage* large_page = reinterpret_cast<LargePage*>(chunk);
470 HeapObject* array = large_page->GetObject(); 470 HeapObject* array = large_page->GetObject();
471 DCHECK(array->IsFixedArray()); 471 DCHECK(array->IsFixedArray());
472 Address start = array->address(); 472 Address start = array->address();
473 Address end = start + array->Size(); 473 Address end = start + array->Size();
474 FindPointersToNewSpaceInRegion(start, end, slot_callback); 474 FindPointersToNewSpaceInRegion(start, end, slot_callback);
475 } else { 475 } else {
476 Page* page = reinterpret_cast<Page*>(chunk); 476 Page* page = reinterpret_cast<Page*>(chunk);
477 PagedSpace* owner = reinterpret_cast<PagedSpace*>(page->owner()); 477 PagedSpace* owner = reinterpret_cast<PagedSpace*>(page->owner());
478 if (owner == heap_->map_space()) { 478 if (owner == heap_->map_space()) {
479 DCHECK(page->WasSwept()); 479 DCHECK(page->SweepingDone());
480 HeapObjectIterator iterator(page); 480 HeapObjectIterator iterator(page);
481 for (HeapObject* heap_object = iterator.Next(); heap_object != NULL; 481 for (HeapObject* heap_object = iterator.Next(); heap_object != NULL;
482 heap_object = iterator.Next()) { 482 heap_object = iterator.Next()) {
483 // We skip free space objects. 483 // We skip free space objects.
484 if (!heap_object->IsFiller()) { 484 if (!heap_object->IsFiller()) {
485 DCHECK(heap_object->IsMap()); 485 DCHECK(heap_object->IsMap());
486 FindPointersToNewSpaceInRegion( 486 FindPointersToNewSpaceInRegion(
487 heap_object->address() + Map::kPointerFieldsBeginOffset, 487 heap_object->address() + Map::kPointerFieldsBeginOffset,
488 heap_object->address() + Map::kPointerFieldsEndOffset, 488 heap_object->address() + Map::kPointerFieldsEndOffset,
489 slot_callback); 489 slot_callback);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 DCHECK(start_of_current_page_ != store_buffer_->Top()); 615 DCHECK(start_of_current_page_ != store_buffer_->Top());
616 store_buffer_->SetTop(start_of_current_page_); 616 store_buffer_->SetTop(start_of_current_page_);
617 } 617 }
618 } else { 618 } else {
619 UNREACHABLE(); 619 UNREACHABLE();
620 } 620 }
621 } 621 }
622 622
623 } // namespace internal 623 } // namespace internal
624 } // namespace v8 624 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698