| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |