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/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 | 757 |
758 | 758 |
759 void Heap::HandleGCRequest() { | 759 void Heap::HandleGCRequest() { |
760 if (incremental_marking()->request_type() == | 760 if (incremental_marking()->request_type() == |
761 IncrementalMarking::COMPLETE_MARKING) { | 761 IncrementalMarking::COMPLETE_MARKING) { |
762 CollectAllGarbage(current_gc_flags_, "GC interrupt", | 762 CollectAllGarbage(current_gc_flags_, "GC interrupt", |
763 current_gc_callback_flags_); | 763 current_gc_callback_flags_); |
764 return; | 764 return; |
765 } | 765 } |
766 DCHECK(FLAG_finalize_marking_incrementally); | 766 DCHECK(FLAG_finalize_marking_incrementally); |
767 if (!incremental_marking()->finalize_marking_completed()) { | 767 if (incremental_marking()->IsMarking() && |
| 768 !incremental_marking()->finalize_marking_completed()) { |
768 FinalizeIncrementalMarking("GC interrupt: finalize incremental marking"); | 769 FinalizeIncrementalMarking("GC interrupt: finalize incremental marking"); |
769 } | 770 } |
770 } | 771 } |
771 | 772 |
772 | 773 |
773 void Heap::ScheduleIdleScavengeIfNeeded(int bytes_allocated) { | 774 void Heap::ScheduleIdleScavengeIfNeeded(int bytes_allocated) { |
774 scavenge_job_->ScheduleIdleTaskIfNeeded(this, bytes_allocated); | 775 scavenge_job_->ScheduleIdleTaskIfNeeded(this, bytes_allocated); |
775 } | 776 } |
776 | 777 |
777 | 778 |
(...skipping 5321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6099 } | 6100 } |
6100 | 6101 |
6101 | 6102 |
6102 // static | 6103 // static |
6103 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6104 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6104 return StaticVisitorBase::GetVisitorId(map); | 6105 return StaticVisitorBase::GetVisitorId(map); |
6105 } | 6106 } |
6106 | 6107 |
6107 } // namespace internal | 6108 } // namespace internal |
6108 } // namespace v8 | 6109 } // namespace v8 |
OLD | NEW |