| 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_HEAP_INCREMENTAL_MARKING_H_ | 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_ |
| 6 #define V8_HEAP_INCREMENTAL_MARKING_H_ | 6 #define V8_HEAP_INCREMENTAL_MARKING_H_ |
| 7 | 7 |
| 8 #include "src/cancelable-task.h" | 8 #include "src/cancelable-task.h" |
| 9 #include "src/execution.h" | 9 #include "src/execution.h" |
| 10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 void IterateBlackObject(HeapObject* object); | 208 void IterateBlackObject(HeapObject* object); |
| 209 | 209 |
| 210 Heap* heap() const { return heap_; } | 210 Heap* heap() const { return heap_; } |
| 211 | 211 |
| 212 IncrementalMarkingJob* incremental_marking_job() { | 212 IncrementalMarkingJob* incremental_marking_job() { |
| 213 return &incremental_marking_job_; | 213 return &incremental_marking_job_; |
| 214 } | 214 } |
| 215 | 215 |
| 216 bool black_allocation() { return black_allocation_; } | 216 bool black_allocation() { return black_allocation_; } |
| 217 | 217 |
| 218 void StartBlackAllocationForTesting() { StartBlackAllocation(); } |
| 219 |
| 218 private: | 220 private: |
| 219 class Observer : public AllocationObserver { | 221 class Observer : public AllocationObserver { |
| 220 public: | 222 public: |
| 221 Observer(IncrementalMarking& incremental_marking, intptr_t step_size) | 223 Observer(IncrementalMarking& incremental_marking, intptr_t step_size) |
| 222 : AllocationObserver(step_size), | 224 : AllocationObserver(step_size), |
| 223 incremental_marking_(incremental_marking) {} | 225 incremental_marking_(incremental_marking) {} |
| 224 | 226 |
| 225 void Step(int bytes_allocated, Address, size_t) override { | 227 void Step(int bytes_allocated, Address, size_t) override { |
| 226 incremental_marking_.Step(bytes_allocated, | 228 incremental_marking_.Step(bytes_allocated, |
| 227 IncrementalMarking::GC_VIA_STACK_GUARD); | 229 IncrementalMarking::GC_VIA_STACK_GUARD); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 GCRequestType request_type_; | 303 GCRequestType request_type_; |
| 302 | 304 |
| 303 IncrementalMarkingJob incremental_marking_job_; | 305 IncrementalMarkingJob incremental_marking_job_; |
| 304 | 306 |
| 305 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 307 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 306 }; | 308 }; |
| 307 } // namespace internal | 309 } // namespace internal |
| 308 } // namespace v8 | 310 } // namespace v8 |
| 309 | 311 |
| 310 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 312 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
| OLD | NEW |