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