OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3473 HeapObject* object = nullptr; | 3473 HeapObject* object = nullptr; |
3474 while ((object = it.Next()) != nullptr) { | 3474 while ((object = it.Next()) != nullptr) { |
3475 DCHECK(Marking::IsBlack(ObjectMarking::MarkBitFrom(object))); | 3475 DCHECK(Marking::IsBlack(ObjectMarking::MarkBitFrom(object))); |
3476 if (!visitor->Visit(object)) { | 3476 if (!visitor->Visit(object)) { |
3477 if (mode == kClearMarkbits) { | 3477 if (mode == kClearMarkbits) { |
3478 page->markbits()->ClearRange( | 3478 page->markbits()->ClearRange( |
3479 page->AddressToMarkbitIndex(page->area_start()), | 3479 page->AddressToMarkbitIndex(page->area_start()), |
3480 page->AddressToMarkbitIndex(object->address())); | 3480 page->AddressToMarkbitIndex(object->address())); |
3481 if (page->old_to_new_slots() != nullptr) { | 3481 if (page->old_to_new_slots() != nullptr) { |
3482 page->old_to_new_slots()->RemoveRange( | 3482 page->old_to_new_slots()->RemoveRange( |
3483 0, static_cast<int>(object->address() - page->address())); | 3483 0, static_cast<int>(object->address() - page->address()), |
| 3484 SlotSet::PREFREE_EMPTY_BUCKETS); |
3484 } | 3485 } |
3485 if (page->typed_old_to_new_slots() != nullptr) { | 3486 if (page->typed_old_to_new_slots() != nullptr) { |
3486 RememberedSet<OLD_TO_NEW>::RemoveRangeTyped(page, page->address(), | 3487 RememberedSet<OLD_TO_NEW>::RemoveRangeTyped(page, page->address(), |
3487 object->address()); | 3488 object->address()); |
3488 } | 3489 } |
3489 RecomputeLiveBytes(page); | 3490 RecomputeLiveBytes(page); |
3490 } | 3491 } |
3491 return false; | 3492 return false; |
3492 } | 3493 } |
3493 } | 3494 } |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4007 // The target is always in old space, we don't have to record the slot in | 4008 // The target is always in old space, we don't have to record the slot in |
4008 // the old-to-new remembered set. | 4009 // the old-to-new remembered set. |
4009 DCHECK(!heap()->InNewSpace(target)); | 4010 DCHECK(!heap()->InNewSpace(target)); |
4010 RecordRelocSlot(host, &rinfo, target); | 4011 RecordRelocSlot(host, &rinfo, target); |
4011 } | 4012 } |
4012 } | 4013 } |
4013 } | 4014 } |
4014 | 4015 |
4015 } // namespace internal | 4016 } // namespace internal |
4016 } // namespace v8 | 4017 } // namespace v8 |
OLD | NEW |