| 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/v8.h" | 5 #include "src/v8.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/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
| (...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2204 CHECK(success); | 2204 CHECK(success); |
| 2205 marking_deque_memory_committed_ = false; | 2205 marking_deque_memory_committed_ = false; |
| 2206 } | 2206 } |
| 2207 } | 2207 } |
| 2208 | 2208 |
| 2209 | 2209 |
| 2210 void MarkCompactCollector::OverApproximateWeakClosure() { | 2210 void MarkCompactCollector::OverApproximateWeakClosure() { |
| 2211 GCTracer::Scope gc_scope(heap()->tracer(), | 2211 GCTracer::Scope gc_scope(heap()->tracer(), |
| 2212 GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE); | 2212 GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE); |
| 2213 | 2213 |
| 2214 // Make sure that the marking deque is empty, even if it has overflown. |
| 2215 // Otherwise, we might miss some objects in an object group that would |
| 2216 // otherwise made the entire group alive. |
| 2217 ProcessMarkingDeque(); |
| 2218 |
| 2214 RootMarkingVisitor root_visitor(heap()); | 2219 RootMarkingVisitor root_visitor(heap()); |
| 2215 isolate()->global_handles()->IterateObjectGroups( | 2220 isolate()->global_handles()->IterateObjectGroups( |
| 2216 &root_visitor, &IsUnmarkedHeapObjectWithHeap); | 2221 &root_visitor, &IsUnmarkedHeapObjectWithHeap); |
| 2217 MarkImplicitRefGroups(); | 2222 MarkImplicitRefGroups(); |
| 2218 | 2223 |
| 2219 // Remove object groups after marking phase. | 2224 // Remove object groups after marking phase. |
| 2220 heap()->isolate()->global_handles()->RemoveObjectGroups(); | 2225 heap()->isolate()->global_handles()->RemoveObjectGroups(); |
| 2221 heap()->isolate()->global_handles()->RemoveImplicitRefGroups(); | 2226 heap()->isolate()->global_handles()->RemoveImplicitRefGroups(); |
| 2222 } | 2227 } |
| 2223 | 2228 |
| (...skipping 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4496 SlotsBuffer* buffer = *buffer_address; | 4501 SlotsBuffer* buffer = *buffer_address; |
| 4497 while (buffer != NULL) { | 4502 while (buffer != NULL) { |
| 4498 SlotsBuffer* next_buffer = buffer->next(); | 4503 SlotsBuffer* next_buffer = buffer->next(); |
| 4499 DeallocateBuffer(buffer); | 4504 DeallocateBuffer(buffer); |
| 4500 buffer = next_buffer; | 4505 buffer = next_buffer; |
| 4501 } | 4506 } |
| 4502 *buffer_address = NULL; | 4507 *buffer_address = NULL; |
| 4503 } | 4508 } |
| 4504 } | 4509 } |
| 4505 } // namespace v8::internal | 4510 } // namespace v8::internal |
| OLD | NEW |