| 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/assembler-inl.h" | 9 #include "src/assembler-inl.h" |
| 10 #include "src/ast/context-slot-cache.h" | 10 #include "src/ast/context-slot-cache.h" |
| (...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 | 1716 |
| 1717 { | 1717 { |
| 1718 // Copy roots. | 1718 // Copy roots. |
| 1719 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_ROOTS); | 1719 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_ROOTS); |
| 1720 IterateRoots(&scavenge_visitor, VISIT_ALL_IN_SCAVENGE); | 1720 IterateRoots(&scavenge_visitor, VISIT_ALL_IN_SCAVENGE); |
| 1721 } | 1721 } |
| 1722 | 1722 |
| 1723 { | 1723 { |
| 1724 // Copy objects reachable from the old generation. | 1724 // Copy objects reachable from the old generation. |
| 1725 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS); | 1725 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS); |
| 1726 RememberedSet<OLD_TO_NEW>::Iterate(this, [this](Address addr) { | 1726 RememberedSet<OLD_TO_NEW>::Iterate( |
| 1727 return Scavenger::CheckAndScavengeObject(this, addr); | 1727 this, SYNCHRONIZED, [this](Address addr) { |
| 1728 }); | 1728 return Scavenger::CheckAndScavengeObject(this, addr); |
| 1729 }); |
| 1729 | 1730 |
| 1730 RememberedSet<OLD_TO_NEW>::IterateTyped( | 1731 RememberedSet<OLD_TO_NEW>::IterateTyped( |
| 1731 this, [this](SlotType type, Address host_addr, Address addr) { | 1732 this, SYNCHRONIZED, |
| 1733 [this](SlotType type, Address host_addr, Address addr) { |
| 1732 return UpdateTypedSlotHelper::UpdateTypedSlot( | 1734 return UpdateTypedSlotHelper::UpdateTypedSlot( |
| 1733 isolate(), type, addr, [this](Object** addr) { | 1735 isolate(), type, addr, [this](Object** addr) { |
| 1734 // We expect that objects referenced by code are long living. | 1736 // We expect that objects referenced by code are long living. |
| 1735 // If we do not force promotion, then we need to clear | 1737 // If we do not force promotion, then we need to clear |
| 1736 // old_to_new slots in dead code objects after mark-compact. | 1738 // old_to_new slots in dead code objects after mark-compact. |
| 1737 return Scavenger::CheckAndScavengeObject( | 1739 return Scavenger::CheckAndScavengeObject( |
| 1738 this, reinterpret_cast<Address>(addr)); | 1740 this, reinterpret_cast<Address>(addr)); |
| 1739 }); | 1741 }); |
| 1740 }); | 1742 }); |
| 1741 } | 1743 } |
| (...skipping 4659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6401 } | 6403 } |
| 6402 | 6404 |
| 6403 | 6405 |
| 6404 // static | 6406 // static |
| 6405 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6407 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6406 return StaticVisitorBase::GetVisitorId(map); | 6408 return StaticVisitorBase::GetVisitorId(map); |
| 6407 } | 6409 } |
| 6408 | 6410 |
| 6409 } // namespace internal | 6411 } // namespace internal |
| 6410 } // namespace v8 | 6412 } // namespace v8 |
| OLD | NEW |