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