| 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 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 | 1722 |
| 1723 { | 1723 { |
| 1724 // Copy roots. | 1724 // Copy roots. |
| 1725 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_ROOTS); | 1725 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_ROOTS); |
| 1726 IterateRoots(&scavenge_visitor, VISIT_ALL_IN_SCAVENGE); | 1726 IterateRoots(&scavenge_visitor, VISIT_ALL_IN_SCAVENGE); |
| 1727 } | 1727 } |
| 1728 | 1728 |
| 1729 { | 1729 { |
| 1730 // Copy objects reachable from the old generation. | 1730 // Copy objects reachable from the old generation. |
| 1731 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS); | 1731 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS); |
| 1732 RememberedSet<OLD_TO_NEW>::Iterate(this, [this](Address addr) { | 1732 RememberedSet<OLD_TO_NEW>::Iterate( |
| 1733 return Scavenger::CheckAndScavengeObject(this, addr); | 1733 this, SYNCHRONIZED, [this](Address addr) { |
| 1734 }); | 1734 return Scavenger::CheckAndScavengeObject(this, addr); |
| 1735 }); |
| 1735 | 1736 |
| 1736 RememberedSet<OLD_TO_NEW>::IterateTyped( | 1737 RememberedSet<OLD_TO_NEW>::IterateTyped( |
| 1737 this, [this](SlotType type, Address host_addr, Address addr) { | 1738 this, SYNCHRONIZED, |
| 1739 [this](SlotType type, Address host_addr, Address addr) { |
| 1738 return UpdateTypedSlotHelper::UpdateTypedSlot( | 1740 return UpdateTypedSlotHelper::UpdateTypedSlot( |
| 1739 isolate(), type, addr, [this](Object** addr) { | 1741 isolate(), type, addr, [this](Object** addr) { |
| 1740 // We expect that objects referenced by code are long living. | 1742 // We expect that objects referenced by code are long living. |
| 1741 // If we do not force promotion, then we need to clear | 1743 // If we do not force promotion, then we need to clear |
| 1742 // old_to_new slots in dead code objects after mark-compact. | 1744 // old_to_new slots in dead code objects after mark-compact. |
| 1743 return Scavenger::CheckAndScavengeObject( | 1745 return Scavenger::CheckAndScavengeObject( |
| 1744 this, reinterpret_cast<Address>(addr)); | 1746 this, reinterpret_cast<Address>(addr)); |
| 1745 }); | 1747 }); |
| 1746 }); | 1748 }); |
| 1747 } | 1749 } |
| (...skipping 4649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6397 } | 6399 } |
| 6398 | 6400 |
| 6399 | 6401 |
| 6400 // static | 6402 // static |
| 6401 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6403 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6402 return StaticVisitorBase::GetVisitorId(map); | 6404 return StaticVisitorBase::GetVisitorId(map); |
| 6403 } | 6405 } |
| 6404 | 6406 |
| 6405 } // namespace internal | 6407 } // namespace internal |
| 6406 } // namespace v8 | 6408 } // namespace v8 |
| OLD | NEW |