| 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 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2362 | 2362 |
| 2363 { | 2363 { |
| 2364 TRACE_GC(heap()->tracer(), GCTracer::Scope::MINOR_MC_MARK_ROOTS); | 2364 TRACE_GC(heap()->tracer(), GCTracer::Scope::MINOR_MC_MARK_ROOTS); |
| 2365 heap()->IterateRoots(&root_visitor, VISIT_ALL_IN_SCAVENGE); | 2365 heap()->IterateRoots(&root_visitor, VISIT_ALL_IN_SCAVENGE); |
| 2366 ProcessMarkingDeque(); | 2366 ProcessMarkingDeque(); |
| 2367 } | 2367 } |
| 2368 | 2368 |
| 2369 { | 2369 { |
| 2370 TRACE_GC(heap()->tracer(), | 2370 TRACE_GC(heap()->tracer(), |
| 2371 GCTracer::Scope::MINOR_MC_MARK_OLD_TO_NEW_POINTERS); | 2371 GCTracer::Scope::MINOR_MC_MARK_OLD_TO_NEW_POINTERS); |
| 2372 RememberedSet<OLD_TO_NEW>::Iterate( | 2372 RememberedSet<OLD_TO_NEW>::Iterate(heap(), [this](Address addr) { |
| 2373 heap(), NON_SYNCHRONIZED, | 2373 return CheckAndMarkObject(heap(), addr); |
| 2374 [this](Address addr) { return CheckAndMarkObject(heap(), addr); }); | 2374 }); |
| 2375 RememberedSet<OLD_TO_NEW>::IterateTyped( | 2375 RememberedSet<OLD_TO_NEW>::IterateTyped( |
| 2376 heap(), NON_SYNCHRONIZED, | 2376 heap(), [this](SlotType type, Address host_addr, Address addr) { |
| 2377 [this](SlotType type, Address host_addr, Address addr) { | |
| 2378 return UpdateTypedSlotHelper::UpdateTypedSlot( | 2377 return UpdateTypedSlotHelper::UpdateTypedSlot( |
| 2379 isolate(), type, addr, [this](Object** addr) { | 2378 isolate(), type, addr, [this](Object** addr) { |
| 2380 return CheckAndMarkObject(heap(), | 2379 return CheckAndMarkObject(heap(), |
| 2381 reinterpret_cast<Address>(addr)); | 2380 reinterpret_cast<Address>(addr)); |
| 2382 }); | 2381 }); |
| 2383 }); | 2382 }); |
| 2384 ProcessMarkingDeque(); | 2383 ProcessMarkingDeque(); |
| 2385 } | 2384 } |
| 2386 | 2385 |
| 2387 { | 2386 { |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4153 // The target is always in old space, we don't have to record the slot in | 4152 // The target is always in old space, we don't have to record the slot in |
| 4154 // the old-to-new remembered set. | 4153 // the old-to-new remembered set. |
| 4155 DCHECK(!heap()->InNewSpace(target)); | 4154 DCHECK(!heap()->InNewSpace(target)); |
| 4156 RecordRelocSlot(host, &rinfo, target); | 4155 RecordRelocSlot(host, &rinfo, target); |
| 4157 } | 4156 } |
| 4158 } | 4157 } |
| 4159 } | 4158 } |
| 4160 | 4159 |
| 4161 } // namespace internal | 4160 } // namespace internal |
| 4162 } // namespace v8 | 4161 } // namespace v8 |
| OLD | NEW |