| 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/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 if (from == to) return; | 136 if (from == to) return; |
| 137 | 137 |
| 138 MarkBit new_mark_bit = ObjectMarking::MarkBitFrom(to); | 138 MarkBit new_mark_bit = ObjectMarking::MarkBitFrom(to); |
| 139 MarkBit old_mark_bit = ObjectMarking::MarkBitFrom(from); | 139 MarkBit old_mark_bit = ObjectMarking::MarkBitFrom(from); |
| 140 | 140 |
| 141 #ifdef DEBUG | 141 #ifdef DEBUG |
| 142 Marking::ObjectColor old_color = Marking::Color(old_mark_bit); | 142 Marking::ObjectColor old_color = Marking::Color(old_mark_bit); |
| 143 #endif | 143 #endif |
| 144 | 144 |
| 145 if (Marking::IsBlack(old_mark_bit)) { | 145 if (Marking::IsBlack(old_mark_bit)) { |
| 146 Marking::BlackToWhite(old_mark_bit); | 146 Marking::MarkWhite(old_mark_bit); |
| 147 Marking::WhiteToBlack(new_mark_bit); | 147 Marking::WhiteToBlack(new_mark_bit); |
| 148 return; | 148 return; |
| 149 } else if (Marking::IsGrey(old_mark_bit)) { | 149 } else if (Marking::IsGrey(old_mark_bit)) { |
| 150 Marking::GreyToWhite(old_mark_bit); | 150 Marking::MarkWhite(old_mark_bit); |
| 151 Marking::WhiteToGrey(new_mark_bit); | 151 Marking::WhiteToGrey(new_mark_bit); |
| 152 heap->mark_compact_collector()->marking_deque()->Push(to); | 152 heap->mark_compact_collector()->marking_deque()->Push(to); |
| 153 heap->incremental_marking()->RestartIfNotMarking(); | 153 heap->incremental_marking()->RestartIfNotMarking(); |
| 154 } | 154 } |
| 155 | 155 |
| 156 #ifdef DEBUG | 156 #ifdef DEBUG |
| 157 Marking::ObjectColor new_color = Marking::Color(new_mark_bit); | 157 Marking::ObjectColor new_color = Marking::Color(new_mark_bit); |
| 158 DCHECK(new_color == old_color); | 158 DCHECK(new_color == old_color); |
| 159 #endif | 159 #endif |
| 160 } | 160 } |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 idle_marking_delay_counter_++; | 1168 idle_marking_delay_counter_++; |
| 1169 } | 1169 } |
| 1170 | 1170 |
| 1171 | 1171 |
| 1172 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1172 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1173 idle_marking_delay_counter_ = 0; | 1173 idle_marking_delay_counter_ = 0; |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 } // namespace internal | 1176 } // namespace internal |
| 1177 } // namespace v8 | 1177 } // namespace v8 |
| OLD | NEW |