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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 void NotifyOfHighPromotionRate(); | 197 void NotifyOfHighPromotionRate(); |
198 | 198 |
199 void NotifyIncompleteScanOfObject(int unscanned_bytes) { | 199 void NotifyIncompleteScanOfObject(int unscanned_bytes) { |
200 unscanned_bytes_of_large_object_ = unscanned_bytes; | 200 unscanned_bytes_of_large_object_ = unscanned_bytes; |
201 } | 201 } |
202 | 202 |
203 void ClearIdleMarkingDelayCounter(); | 203 void ClearIdleMarkingDelayCounter(); |
204 | 204 |
205 bool IsIdleMarkingDelayCounterLimitReached(); | 205 bool IsIdleMarkingDelayCounterLimitReached(); |
206 | 206 |
207 static void MarkObject(Heap* heap, HeapObject* object); | 207 static void MarkGrey(Heap* heap, HeapObject* object); |
| 208 |
| 209 static void MarkBlack(HeapObject* object, int size); |
208 | 210 |
209 static void TransferMark(Heap* heap, Address old_start, Address new_start); | 211 static void TransferMark(Heap* heap, Address old_start, Address new_start); |
210 | 212 |
211 // Returns true if the color transfer requires live bytes updating. | 213 // Returns true if the color transfer requires live bytes updating. |
212 INLINE(static bool TransferColor(HeapObject* from, HeapObject* to, | 214 INLINE(static bool TransferColor(HeapObject* from, HeapObject* to, |
213 int size)) { | 215 int size)) { |
214 MarkBit from_mark_bit = ObjectMarking::MarkBitFrom(from); | 216 MarkBit from_mark_bit = ObjectMarking::MarkBitFrom(from); |
215 MarkBit to_mark_bit = ObjectMarking::MarkBitFrom(to); | 217 MarkBit to_mark_bit = ObjectMarking::MarkBitFrom(to); |
216 | 218 |
217 if (Marking::IsBlack(to_mark_bit)) { | 219 if (Marking::IsBlack(to_mark_bit)) { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 GCRequestType request_type_; | 332 GCRequestType request_type_; |
331 | 333 |
332 IncrementalMarkingJob incremental_marking_job_; | 334 IncrementalMarkingJob incremental_marking_job_; |
333 | 335 |
334 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 336 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
335 }; | 337 }; |
336 } // namespace internal | 338 } // namespace internal |
337 } // namespace v8 | 339 } // namespace v8 |
338 | 340 |
339 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 341 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
OLD | NEW |