| 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 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 // TODO(mlippautz): We currently do not trace through blink when | 2150 // TODO(mlippautz): We currently do not trace through blink when |
| 2151 // discovering new objects reachable from weak roots (that have been made | 2151 // discovering new objects reachable from weak roots (that have been made |
| 2152 // strong). This is a limitation of not having a separate handle type | 2152 // strong). This is a limitation of not having a separate handle type |
| 2153 // that doesn't require zapping before this phase. See crbug.com/668060. | 2153 // that doesn't require zapping before this phase. See crbug.com/668060. |
| 2154 heap_->local_embedder_heap_tracer()->ClearCachedWrappersToTrace(); | 2154 heap_->local_embedder_heap_tracer()->ClearCachedWrappersToTrace(); |
| 2155 } | 2155 } |
| 2156 ProcessWeakCollections(); | 2156 ProcessWeakCollections(); |
| 2157 work_to_do = !marking_deque()->IsEmpty(); | 2157 work_to_do = !marking_deque()->IsEmpty(); |
| 2158 ProcessMarkingDeque<MarkCompactMode::FULL>(); | 2158 ProcessMarkingDeque<MarkCompactMode::FULL>(); |
| 2159 } | 2159 } |
| 2160 CHECK(heap_->MarkingDequesAreEmpty()); | 2160 CHECK(marking_deque()->IsEmpty()); |
| 2161 CHECK_EQ(0, heap()->local_embedder_heap_tracer()->NumberOfWrappersToTrace()); |
| 2161 } | 2162 } |
| 2162 | 2163 |
| 2163 void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor* visitor) { | 2164 void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor* visitor) { |
| 2164 for (StackFrameIterator it(isolate(), isolate()->thread_local_top()); | 2165 for (StackFrameIterator it(isolate(), isolate()->thread_local_top()); |
| 2165 !it.done(); it.Advance()) { | 2166 !it.done(); it.Advance()) { |
| 2166 if (it.frame()->type() == StackFrame::JAVA_SCRIPT) { | 2167 if (it.frame()->type() == StackFrame::JAVA_SCRIPT) { |
| 2167 return; | 2168 return; |
| 2168 } | 2169 } |
| 2169 if (it.frame()->type() == StackFrame::OPTIMIZED) { | 2170 if (it.frame()->type() == StackFrame::OPTIMIZED) { |
| 2170 Code* code = it.frame()->LookupCode(); | 2171 Code* code = it.frame()->LookupCode(); |
| (...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4080 // The target is always in old space, we don't have to record the slot in | 4081 // The target is always in old space, we don't have to record the slot in |
| 4081 // the old-to-new remembered set. | 4082 // the old-to-new remembered set. |
| 4082 DCHECK(!heap()->InNewSpace(target)); | 4083 DCHECK(!heap()->InNewSpace(target)); |
| 4083 RecordRelocSlot(host, &rinfo, target); | 4084 RecordRelocSlot(host, &rinfo, target); |
| 4084 } | 4085 } |
| 4085 } | 4086 } |
| 4086 } | 4087 } |
| 4087 | 4088 |
| 4088 } // namespace internal | 4089 } // namespace internal |
| 4089 } // namespace v8 | 4090 } // namespace v8 |
| OLD | NEW |