| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 bool IsIdleMarkingDelayCounterLimitReached(); | 180 bool IsIdleMarkingDelayCounterLimitReached(); |
| 181 | 181 |
| 182 static void MarkGrey(Heap* heap, HeapObject* object); | 182 static void MarkGrey(Heap* heap, HeapObject* object); |
| 183 | 183 |
| 184 static void MarkBlack(HeapObject* object, int size); | 184 static void MarkBlack(HeapObject* object, int size); |
| 185 | 185 |
| 186 static void TransferMark(Heap* heap, HeapObject* from, HeapObject* to); | 186 static void TransferMark(Heap* heap, HeapObject* from, HeapObject* to); |
| 187 | 187 |
| 188 V8_INLINE static void TransferColor(HeapObject* from, HeapObject* to) { | 188 V8_INLINE static void TransferColor(HeapObject* from, HeapObject* to) { |
| 189 if (ObjectMarking::IsBlack(to)) { | 189 if (ObjectMarking::IsBlack(to, MarkingState::Internal(to))) { |
| 190 DCHECK(to->GetHeap()->incremental_marking()->black_allocation()); | 190 DCHECK(to->GetHeap()->incremental_marking()->black_allocation()); |
| 191 return; | 191 return; |
| 192 } | 192 } |
| 193 | 193 |
| 194 DCHECK(ObjectMarking::IsWhite(to)); | 194 DCHECK(ObjectMarking::IsWhite(to, MarkingState::Internal(to))); |
| 195 if (ObjectMarking::IsGrey(from)) { | 195 if (ObjectMarking::IsGrey(from, MarkingState::Internal(from))) { |
| 196 ObjectMarking::WhiteToGrey(to); | 196 ObjectMarking::WhiteToGrey(to, MarkingState::Internal(to)); |
| 197 } else if (ObjectMarking::IsBlack(from)) { | 197 } else if (ObjectMarking::IsBlack(from, MarkingState::Internal(from))) { |
| 198 ObjectMarking::WhiteToBlack(to); | 198 ObjectMarking::WhiteToBlack(to, MarkingState::Internal(to)); |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 void IterateBlackObject(HeapObject* object); | 202 void IterateBlackObject(HeapObject* object); |
| 203 | 203 |
| 204 Heap* heap() const { return heap_; } | 204 Heap* heap() const { return heap_; } |
| 205 | 205 |
| 206 IncrementalMarkingJob* incremental_marking_job() { | 206 IncrementalMarkingJob* incremental_marking_job() { |
| 207 return &incremental_marking_job_; | 207 return &incremental_marking_job_; |
| 208 } | 208 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 IncrementalMarkingJob incremental_marking_job_; | 295 IncrementalMarkingJob incremental_marking_job_; |
| 296 Observer new_generation_observer_; | 296 Observer new_generation_observer_; |
| 297 Observer old_generation_observer_; | 297 Observer old_generation_observer_; |
| 298 | 298 |
| 299 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 299 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 300 }; | 300 }; |
| 301 } // namespace internal | 301 } // namespace internal |
| 302 } // namespace v8 | 302 } // namespace v8 |
| 303 | 303 |
| 304 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 304 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
| OLD | NEW |