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 #include "src/heap/incremental-marking.h" | 5 #include "src/heap/incremental-marking.h" |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" |
9 #include "src/conversions.h" | 9 #include "src/conversions.h" |
10 #include "src/heap/concurrent-marking.h" | 10 #include "src/heap/concurrent-marking.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 marking_deque()->Push(obj); | 134 marking_deque()->Push(obj); |
135 return true; | 135 return true; |
136 } | 136 } |
137 return false; | 137 return false; |
138 } | 138 } |
139 | 139 |
140 void IncrementalMarking::MarkBlackAndPush(HeapObject* obj) { | 140 void IncrementalMarking::MarkBlackAndPush(HeapObject* obj) { |
141 // Color the object black and push it into the bailout deque. | 141 // Color the object black and push it into the bailout deque. |
142 ObjectMarking::WhiteToGrey<kAtomicity>(obj, marking_state(obj)); | 142 ObjectMarking::WhiteToGrey<kAtomicity>(obj, marking_state(obj)); |
143 if (ObjectMarking::GreyToBlack<kAtomicity>(obj, marking_state(obj))) { | 143 if (ObjectMarking::GreyToBlack<kAtomicity>(obj, marking_state(obj))) { |
144 #if V8_CONCURRENT_MARKING | 144 #ifdef V8_CONCURRENT_MARKING |
145 marking_deque()->Push(obj, MarkingThread::kMain, TargetDeque::kBailout); | 145 marking_deque()->Push(obj, MarkingThread::kMain, TargetDeque::kBailout); |
146 #else | 146 #else |
147 if (!marking_deque()->Push(obj)) { | 147 if (!marking_deque()->Push(obj)) { |
148 ObjectMarking::BlackToGrey<kAtomicity>(obj, marking_state(obj)); | 148 ObjectMarking::BlackToGrey<kAtomicity>(obj, marking_state(obj)); |
149 } | 149 } |
150 #endif | 150 #endif |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 void IncrementalMarking::TransferMark(Heap* heap, HeapObject* from, | 154 void IncrementalMarking::TransferMark(Heap* heap, HeapObject* from, |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 idle_marking_delay_counter_++; | 1224 idle_marking_delay_counter_++; |
1225 } | 1225 } |
1226 | 1226 |
1227 | 1227 |
1228 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1228 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1229 idle_marking_delay_counter_ = 0; | 1229 idle_marking_delay_counter_ = 0; |
1230 } | 1230 } |
1231 | 1231 |
1232 } // namespace internal | 1232 } // namespace internal |
1233 } // namespace v8 | 1233 } // namespace v8 |
OLD | NEW |