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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 } | 177 } |
178 | 178 |
179 void ClearIdleMarkingDelayCounter(); | 179 void ClearIdleMarkingDelayCounter(); |
180 | 180 |
181 bool IsIdleMarkingDelayCounterLimitReached(); | 181 bool IsIdleMarkingDelayCounterLimitReached(); |
182 | 182 |
183 static void MarkGrey(Heap* heap, HeapObject* object); | 183 static void MarkGrey(Heap* heap, HeapObject* object); |
184 | 184 |
185 static void MarkBlack(HeapObject* object, int size); | 185 static void MarkBlack(HeapObject* object, int size); |
186 | 186 |
187 static void TransferMark(Heap* heap, Address old_start, Address new_start); | 187 static void TransferMark(Heap* heap, HeapObject* from, HeapObject* to); |
188 | 188 |
189 // Returns true if the color transfer requires live bytes updating. | 189 // Returns true if the color transfer requires live bytes updating. |
190 INLINE(static bool TransferColor(HeapObject* from, HeapObject* to, | 190 INLINE(static bool TransferColor(HeapObject* from, HeapObject* to, |
191 int size)) { | 191 int size)) { |
192 MarkBit from_mark_bit = ObjectMarking::MarkBitFrom(from); | 192 MarkBit from_mark_bit = ObjectMarking::MarkBitFrom(from); |
193 MarkBit to_mark_bit = ObjectMarking::MarkBitFrom(to); | 193 MarkBit to_mark_bit = ObjectMarking::MarkBitFrom(to); |
194 | 194 |
195 if (Marking::IsBlack(to_mark_bit)) { | 195 if (Marking::IsBlack(to_mark_bit)) { |
196 DCHECK(to->GetHeap()->incremental_marking()->black_allocation()); | 196 DCHECK(to->GetHeap()->incremental_marking()->black_allocation()); |
197 return false; | 197 return false; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 IncrementalMarkingJob incremental_marking_job_; | 305 IncrementalMarkingJob incremental_marking_job_; |
306 Observer new_generation_observer_; | 306 Observer new_generation_observer_; |
307 Observer old_generation_observer_; | 307 Observer old_generation_observer_; |
308 | 308 |
309 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 309 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
310 }; | 310 }; |
311 } // namespace internal | 311 } // namespace internal |
312 } // namespace v8 | 312 } // namespace v8 |
313 | 313 |
314 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 314 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
OLD | NEW |