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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 FLAG_max_object_groups_marking_rounds) || | 571 FLAG_max_object_groups_marking_rounds) || |
572 (marking_progress < FLAG_min_progress_during_object_groups_marking)) { | 572 (marking_progress < FLAG_min_progress_during_object_groups_marking)) { |
573 weak_closure_was_overapproximated_ = true; | 573 weak_closure_was_overapproximated_ = true; |
574 } | 574 } |
575 | 575 |
576 heap_->isolate()->global_handles()->RemoveImplicitRefGroups(); | 576 heap_->isolate()->global_handles()->RemoveImplicitRefGroups(); |
577 heap_->isolate()->global_handles()->RemoveObjectGroups(); | 577 heap_->isolate()->global_handles()->RemoveObjectGroups(); |
578 } | 578 } |
579 | 579 |
580 | 580 |
581 void IncrementalMarking::PrepareForScavenge() { | |
582 if (!IsMarking()) return; | |
583 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(), | |
584 heap_->new_space()->FromSpaceEnd()); | |
585 while (it.has_next()) { | |
586 Bitmap::Clear(it.next()); | |
587 } | |
588 } | |
589 | |
590 | |
591 void IncrementalMarking::UpdateMarkingDequeAfterScavenge() { | 581 void IncrementalMarking::UpdateMarkingDequeAfterScavenge() { |
592 if (!IsMarking()) return; | 582 if (!IsMarking()) return; |
593 | 583 |
594 MarkingDeque* marking_deque = | 584 MarkingDeque* marking_deque = |
595 heap_->mark_compact_collector()->marking_deque(); | 585 heap_->mark_compact_collector()->marking_deque(); |
596 int current = marking_deque->bottom(); | 586 int current = marking_deque->bottom(); |
597 int mask = marking_deque->mask(); | 587 int mask = marking_deque->mask(); |
598 int limit = marking_deque->top(); | 588 int limit = marking_deque->top(); |
599 HeapObject** array = marking_deque->array(); | 589 HeapObject** array = marking_deque->array(); |
600 int new_top = current; | 590 int new_top = current; |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1025 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1036 idle_marking_delay_counter_++; | 1026 idle_marking_delay_counter_++; |
1037 } | 1027 } |
1038 | 1028 |
1039 | 1029 |
1040 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1030 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1041 idle_marking_delay_counter_ = 0; | 1031 idle_marking_delay_counter_ = 0; |
1042 } | 1032 } |
1043 } | 1033 } |
1044 } // namespace v8::internal | 1034 } // namespace v8::internal |
OLD | NEW |