| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 INLINE(static void MarkObject(Heap* heap, HeapObject* object)); | 213 INLINE(static void MarkObject(Heap* heap, HeapObject* object)); |
| 214 | 214 |
| 215 Heap* heap() const { return heap_; } | 215 Heap* heap() const { return heap_; } |
| 216 | 216 |
| 217 IncrementalMarkingJob* incremental_marking_job() { | 217 IncrementalMarkingJob* incremental_marking_job() { |
| 218 return &incremental_marking_job_; | 218 return &incremental_marking_job_; |
| 219 } | 219 } |
| 220 | 220 |
| 221 private: | 221 private: |
| 222 class Observer : public InlineAllocationObserver { | 222 class Observer : public AllocationObserver { |
| 223 public: | 223 public: |
| 224 Observer(IncrementalMarking& incremental_marking, intptr_t step_size) | 224 Observer(IncrementalMarking& incremental_marking, intptr_t step_size) |
| 225 : InlineAllocationObserver(step_size), | 225 : AllocationObserver(step_size), |
| 226 incremental_marking_(incremental_marking) {} | 226 incremental_marking_(incremental_marking) {} |
| 227 | 227 |
| 228 void Step(int bytes_allocated, Address, size_t) override { | 228 void Step(int bytes_allocated, Address, size_t) override { |
| 229 incremental_marking_.Step(bytes_allocated, | 229 incremental_marking_.Step(bytes_allocated, |
| 230 IncrementalMarking::GC_VIA_STACK_GUARD); | 230 IncrementalMarking::GC_VIA_STACK_GUARD); |
| 231 } | 231 } |
| 232 | 232 |
| 233 private: | 233 private: |
| 234 IncrementalMarking& incremental_marking_; | 234 IncrementalMarking& incremental_marking_; |
| 235 }; | 235 }; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 GCRequestType request_type_; | 301 GCRequestType request_type_; |
| 302 | 302 |
| 303 IncrementalMarkingJob incremental_marking_job_; | 303 IncrementalMarkingJob incremental_marking_job_; |
| 304 | 304 |
| 305 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 305 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 306 }; | 306 }; |
| 307 } // namespace internal | 307 } // namespace internal |
| 308 } // namespace v8 | 308 } // namespace v8 |
| 309 | 309 |
| 310 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 310 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
| OLD | NEW |