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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 // entries will not point to forwarding addresses. Hence, we can discard | 800 // entries will not point to forwarding addresses. Hence, we can discard |
801 // them. | 801 // them. |
802 if (map_word.IsForwardingAddress()) { | 802 if (map_word.IsForwardingAddress()) { |
803 HeapObject* dest = map_word.ToForwardingAddress(); | 803 HeapObject* dest = map_word.ToForwardingAddress(); |
804 if (Page::FromAddress(dest->address())->IsFlagSet(Page::BLACK_PAGE)) | 804 if (Page::FromAddress(dest->address())->IsFlagSet(Page::BLACK_PAGE)) |
805 continue; | 805 continue; |
806 array[new_top] = dest; | 806 array[new_top] = dest; |
807 new_top = ((new_top + 1) & mask); | 807 new_top = ((new_top + 1) & mask); |
808 DCHECK(new_top != marking_deque->bottom()); | 808 DCHECK(new_top != marking_deque->bottom()); |
809 #ifdef DEBUG | 809 #ifdef DEBUG |
| 810 // Mark bit of the source object should be cleared |
810 MarkBit mark_bit = Marking::MarkBitFrom(obj); | 811 MarkBit mark_bit = Marking::MarkBitFrom(obj); |
811 DCHECK(Marking::IsGrey(mark_bit) || | 812 DCHECK(Marking::IsWhite(mark_bit)); |
812 (obj->IsFiller() && Marking::IsWhite(mark_bit))); | |
813 #endif | 813 #endif |
814 } | 814 } |
815 } else if (obj->map() != filler_map) { | 815 } else if (obj->map() != filler_map) { |
816 // Skip one word filler objects that appear on the | 816 // Skip one word filler objects that appear on the |
817 // stack when we perform in place array shift. | 817 // stack when we perform in place array shift. |
818 array[new_top] = obj; | 818 array[new_top] = obj; |
819 new_top = ((new_top + 1) & mask); | 819 new_top = ((new_top + 1) & mask); |
820 DCHECK(new_top != marking_deque->bottom()); | 820 DCHECK(new_top != marking_deque->bottom()); |
821 #ifdef DEBUG | 821 #ifdef DEBUG |
822 MarkBit mark_bit = Marking::MarkBitFrom(obj); | 822 MarkBit mark_bit = Marking::MarkBitFrom(obj); |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1246 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1247 idle_marking_delay_counter_++; | 1247 idle_marking_delay_counter_++; |
1248 } | 1248 } |
1249 | 1249 |
1250 | 1250 |
1251 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1251 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1252 idle_marking_delay_counter_ = 0; | 1252 idle_marking_delay_counter_ = 0; |
1253 } | 1253 } |
1254 } // namespace internal | 1254 } // namespace internal |
1255 } // namespace v8 | 1255 } // namespace v8 |
OLD | NEW |