| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/heap/incremental-marking.h" | 7 #include "src/heap/incremental-marking.h" |
| 8 | 8 |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR) && | 622 (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR) && |
| 623 Marking::IsBlack(mark_bit))); | 623 Marking::IsBlack(mark_bit))); |
| 624 #endif | 624 #endif |
| 625 } | 625 } |
| 626 } | 626 } |
| 627 marking_deque->set_top(new_top); | 627 marking_deque->set_top(new_top); |
| 628 } | 628 } |
| 629 | 629 |
| 630 | 630 |
| 631 void IncrementalMarking::VisitObject(Map* map, HeapObject* obj, int size) { | 631 void IncrementalMarking::VisitObject(Map* map, HeapObject* obj, int size) { |
| 632 MarkBit map_mark_bit = Marking::MarkBitFrom(map); | 632 MarkObject(heap_, map); |
| 633 if (Marking::IsWhite(map_mark_bit)) { | |
| 634 WhiteToGreyAndPush(map, map_mark_bit); | |
| 635 } | |
| 636 | 633 |
| 637 IncrementalMarkingMarkingVisitor::IterateBody(map, obj); | 634 IncrementalMarkingMarkingVisitor::IterateBody(map, obj); |
| 638 | 635 |
| 639 MarkBit mark_bit = Marking::MarkBitFrom(obj); | 636 MarkBit mark_bit = Marking::MarkBitFrom(obj); |
| 640 #if ENABLE_SLOW_DCHECKS | 637 #if ENABLE_SLOW_DCHECKS |
| 641 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); | 638 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); |
| 642 SLOW_DCHECK(Marking::IsGrey(mark_bit) || | 639 SLOW_DCHECK(Marking::IsGrey(mark_bit) || |
| 643 (obj->IsFiller() && Marking::IsWhite(mark_bit)) || | 640 (obj->IsFiller() && Marking::IsWhite(mark_bit)) || |
| 644 (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR) && | 641 (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR) && |
| 645 Marking::IsBlack(mark_bit))); | 642 Marking::IsBlack(mark_bit))); |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1022 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1026 idle_marking_delay_counter_++; | 1023 idle_marking_delay_counter_++; |
| 1027 } | 1024 } |
| 1028 | 1025 |
| 1029 | 1026 |
| 1030 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1027 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1031 idle_marking_delay_counter_ = 0; | 1028 idle_marking_delay_counter_ = 0; |
| 1032 } | 1029 } |
| 1033 } // namespace internal | 1030 } // namespace internal |
| 1034 } // namespace v8 | 1031 } // namespace v8 |
| OLD | NEW |