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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 slot_callback); | 489 slot_callback); |
490 } | 490 } |
491 } | 491 } |
492 } else { | 492 } else { |
493 if (page->IsFlagSet(Page::COMPACTION_WAS_ABORTED)) { | 493 if (page->IsFlagSet(Page::COMPACTION_WAS_ABORTED)) { |
494 // Aborted pages require iterating using mark bits because they | 494 // Aborted pages require iterating using mark bits because they |
495 // don't have an iterable object layout before sweeping (which can | 495 // don't have an iterable object layout before sweeping (which can |
496 // only happen later). Note that we can never reach an | 496 // only happen later). Note that we can never reach an |
497 // aborted page through the scavenger. | 497 // aborted page through the scavenger. |
498 DCHECK_EQ(heap_->gc_state(), Heap::MARK_COMPACT); | 498 DCHECK_EQ(heap_->gc_state(), Heap::MARK_COMPACT); |
499 heap_->mark_compact_collector()->VisitLiveObjects(page, &visitor); | 499 heap_->mark_compact_collector()->VisitLiveObjectsBody(page, |
| 500 &visitor); |
500 } else { | 501 } else { |
501 heap_->mark_compact_collector() | 502 heap_->mark_compact_collector() |
502 ->SweepOrWaitUntilSweepingCompleted(page); | 503 ->SweepOrWaitUntilSweepingCompleted(page); |
503 HeapObjectIterator iterator(page); | 504 HeapObjectIterator iterator(page); |
504 for (HeapObject* heap_object = iterator.Next(); | 505 for (HeapObject* heap_object = iterator.Next(); |
505 heap_object != nullptr; heap_object = iterator.Next()) { | 506 heap_object != nullptr; heap_object = iterator.Next()) { |
506 // We iterate over objects that contain new space pointers only. | 507 // We iterate over objects that contain new space pointers only. |
507 heap_object->IterateBody(&visitor); | 508 heap_object->IterateBody(&visitor); |
508 } | 509 } |
509 } | 510 } |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 DCHECK(start_of_current_page_ != store_buffer_->Top()); | 615 DCHECK(start_of_current_page_ != store_buffer_->Top()); |
615 store_buffer_->SetTop(start_of_current_page_); | 616 store_buffer_->SetTop(start_of_current_page_); |
616 } | 617 } |
617 } else { | 618 } else { |
618 UNREACHABLE(); | 619 UNREACHABLE(); |
619 } | 620 } |
620 } | 621 } |
621 | 622 |
622 } // namespace internal | 623 } // namespace internal |
623 } // namespace v8 | 624 } // namespace v8 |
OLD | NEW |