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/incremental-marking.h" | 5 #include "src/heap/incremental-marking.h" |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" |
9 #include "src/conversions.h" | 9 #include "src/conversions.h" |
10 #include "src/heap/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 } | 342 } |
343 }; | 343 }; |
344 | 344 |
345 | 345 |
346 class IncrementalMarkingRootMarkingVisitor : public ObjectVisitor { | 346 class IncrementalMarkingRootMarkingVisitor : public ObjectVisitor { |
347 public: | 347 public: |
348 explicit IncrementalMarkingRootMarkingVisitor( | 348 explicit IncrementalMarkingRootMarkingVisitor( |
349 IncrementalMarking* incremental_marking) | 349 IncrementalMarking* incremental_marking) |
350 : heap_(incremental_marking->heap()) {} | 350 : heap_(incremental_marking->heap()) {} |
351 | 351 |
352 void VisitPointer(Object** p) { MarkObjectByPointer(p); } | 352 void VisitPointer(Object** p) override { MarkObjectByPointer(p); } |
353 | 353 |
354 void VisitPointers(Object** start, Object** end) { | 354 void VisitPointers(Object** start, Object** end) override { |
355 for (Object** p = start; p < end; p++) MarkObjectByPointer(p); | 355 for (Object** p = start; p < end; p++) MarkObjectByPointer(p); |
356 } | 356 } |
357 | 357 |
358 private: | 358 private: |
359 void MarkObjectByPointer(Object** p) { | 359 void MarkObjectByPointer(Object** p) { |
360 Object* obj = *p; | 360 Object* obj = *p; |
361 if (!obj->IsHeapObject()) return; | 361 if (!obj->IsHeapObject()) return; |
362 | 362 |
363 IncrementalMarking::MarkObject(heap_, HeapObject::cast(obj)); | 363 IncrementalMarking::MarkObject(heap_, HeapObject::cast(obj)); |
364 } | 364 } |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1151 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1152 idle_marking_delay_counter_++; | 1152 idle_marking_delay_counter_++; |
1153 } | 1153 } |
1154 | 1154 |
1155 | 1155 |
1156 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1156 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1157 idle_marking_delay_counter_ = 0; | 1157 idle_marking_delay_counter_ = 0; |
1158 } | 1158 } |
1159 } // namespace internal | 1159 } // namespace internal |
1160 } // namespace v8 | 1160 } // namespace v8 |
OLD | NEW |