| 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 #ifndef V8_OBJECTS_VISITING_INL_H_ | 5 #ifndef V8_OBJECTS_VISITING_INL_H_ |
| 6 #define V8_OBJECTS_VISITING_INL_H_ | 6 #define V8_OBJECTS_VISITING_INL_H_ |
| 7 | 7 |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 StaticVisitor::MarkObject(heap, object); | 226 StaticVisitor::MarkObject(heap, object); |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 | 229 |
| 230 | 230 |
| 231 template <typename StaticVisitor> | 231 template <typename StaticVisitor> |
| 232 void StaticMarkingVisitor<StaticVisitor>::VisitCell(Heap* heap, | 232 void StaticMarkingVisitor<StaticVisitor>::VisitCell(Heap* heap, |
| 233 RelocInfo* rinfo) { | 233 RelocInfo* rinfo) { |
| 234 DCHECK(rinfo->rmode() == RelocInfo::CELL); | 234 DCHECK(rinfo->rmode() == RelocInfo::CELL); |
| 235 Cell* cell = rinfo->target_cell(); | 235 Cell* cell = rinfo->target_cell(); |
| 236 heap->mark_compact_collector()->RecordRelocSlot(rinfo, cell); | 236 // No need to record slots because the cell space is not compacted during GC. |
| 237 if (!rinfo->host()->IsWeakObject(cell)) { | 237 if (!rinfo->host()->IsWeakObject(cell)) { |
| 238 StaticVisitor::MarkObject(heap, cell); | 238 StaticVisitor::MarkObject(heap, cell); |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 | 241 |
| 242 | 242 |
| 243 template <typename StaticVisitor> | 243 template <typename StaticVisitor> |
| 244 void StaticMarkingVisitor<StaticVisitor>::VisitDebugTarget(Heap* heap, | 244 void StaticMarkingVisitor<StaticVisitor>::VisitDebugTarget(Heap* heap, |
| 245 RelocInfo* rinfo) { | 245 RelocInfo* rinfo) { |
| 246 DCHECK((RelocInfo::IsJSReturn(rinfo->rmode()) && | 246 DCHECK((RelocInfo::IsJSReturn(rinfo->rmode()) && |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 | 894 |
| 895 RelocIterator it(this, mode_mask); | 895 RelocIterator it(this, mode_mask); |
| 896 for (; !it.done(); it.next()) { | 896 for (; !it.done(); it.next()) { |
| 897 it.rinfo()->template Visit<StaticVisitor>(heap); | 897 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 898 } | 898 } |
| 899 } | 899 } |
| 900 } | 900 } |
| 901 } // namespace v8::internal | 901 } // namespace v8::internal |
| 902 | 902 |
| 903 #endif // V8_OBJECTS_VISITING_INL_H_ | 903 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |