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/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_ROOTS); | 1665 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_ROOTS); |
1666 IterateRoots(&scavenge_visitor, VISIT_ALL_IN_SCAVENGE); | 1666 IterateRoots(&scavenge_visitor, VISIT_ALL_IN_SCAVENGE); |
1667 } | 1667 } |
1668 | 1668 |
1669 { | 1669 { |
1670 // Copy objects reachable from the old generation. | 1670 // Copy objects reachable from the old generation. |
1671 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS); | 1671 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS); |
1672 RememberedSet<OLD_TO_NEW>::Iterate(this, [this](Address addr) { | 1672 RememberedSet<OLD_TO_NEW>::Iterate(this, [this](Address addr) { |
1673 return Scavenger::CheckAndScavengeObject(this, addr); | 1673 return Scavenger::CheckAndScavengeObject(this, addr); |
1674 }); | 1674 }); |
| 1675 |
| 1676 RememberedSet<OLD_TO_NEW>::IterateTyped( |
| 1677 this, [this](SlotType type, Address addr) { |
| 1678 return UpdateTypedSlotHelper::UpdateTypedSlot( |
| 1679 isolate(), type, addr, [this](Object** addr) { |
| 1680 return Scavenger::CheckAndScavengeObject( |
| 1681 this, reinterpret_cast<Address>(addr)); |
| 1682 }); |
| 1683 }); |
1675 } | 1684 } |
1676 | 1685 |
1677 { | 1686 { |
1678 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_WEAK); | 1687 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_WEAK); |
1679 // Copy objects reachable from the encountered weak collections list. | 1688 // Copy objects reachable from the encountered weak collections list. |
1680 scavenge_visitor.VisitPointer(&encountered_weak_collections_); | 1689 scavenge_visitor.VisitPointer(&encountered_weak_collections_); |
1681 // Copy objects reachable from the encountered weak cells. | 1690 // Copy objects reachable from the encountered weak cells. |
1682 scavenge_visitor.VisitPointer(&encountered_weak_cells_); | 1691 scavenge_visitor.VisitPointer(&encountered_weak_cells_); |
1683 } | 1692 } |
1684 | 1693 |
(...skipping 4674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6359 } | 6368 } |
6360 | 6369 |
6361 | 6370 |
6362 // static | 6371 // static |
6363 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6372 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6364 return StaticVisitorBase::GetVisitorId(map); | 6373 return StaticVisitorBase::GetVisitorId(map); |
6365 } | 6374 } |
6366 | 6375 |
6367 } // namespace internal | 6376 } // namespace internal |
6368 } // namespace v8 | 6377 } // namespace v8 |
OLD | NEW |