| 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/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1732 | 1732 |
| 1733 promotion_queue_.Destroy(); | 1733 promotion_queue_.Destroy(); |
| 1734 | 1734 |
| 1735 incremental_marking()->UpdateMarkingDequeAfterScavenge(); | 1735 incremental_marking()->UpdateMarkingDequeAfterScavenge(); |
| 1736 | 1736 |
| 1737 ScavengeWeakObjectRetainer weak_object_retainer(this); | 1737 ScavengeWeakObjectRetainer weak_object_retainer(this); |
| 1738 ProcessYoungWeakReferences(&weak_object_retainer); | 1738 ProcessYoungWeakReferences(&weak_object_retainer); |
| 1739 | 1739 |
| 1740 DCHECK(new_space_front == new_space_->top()); | 1740 DCHECK(new_space_front == new_space_->top()); |
| 1741 | 1741 |
| 1742 new_space_->SealIntermediateGeneration(); | 1742 // Set age mark. |
| 1743 new_space_->set_age_mark(new_space_->top()); |
| 1743 | 1744 |
| 1744 ArrayBufferTracker::FreeDeadInNewSpace(this); | 1745 ArrayBufferTracker::FreeDeadInNewSpace(this); |
| 1745 | 1746 |
| 1746 // Update how much has survived scavenge. | 1747 // Update how much has survived scavenge. |
| 1747 IncrementYoungSurvivorsCounter( | 1748 IncrementYoungSurvivorsCounter( |
| 1748 static_cast<int>((PromotedSpaceSizeOfObjects() - survived_watermark) + | 1749 static_cast<int>((PromotedSpaceSizeOfObjects() - survived_watermark) + |
| 1749 new_space_->Size())); | 1750 new_space_->Size())); |
| 1750 | 1751 |
| 1751 LOG(isolate_, ResourceEvent("scavenge", "end")); | 1752 LOG(isolate_, ResourceEvent("scavenge", "end")); |
| 1752 | 1753 |
| (...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5083 "semi-space size of %d MB\n", | 5084 "semi-space size of %d MB\n", |
| 5084 max_semi_space_size_ / MB); | 5085 max_semi_space_size_ / MB); |
| 5085 } | 5086 } |
| 5086 } else { | 5087 } else { |
| 5087 initial_semispace_size_ = | 5088 initial_semispace_size_ = |
| 5088 ROUND_UP(initial_semispace_size, Page::kPageSize); | 5089 ROUND_UP(initial_semispace_size, Page::kPageSize); |
| 5089 } | 5090 } |
| 5090 } | 5091 } |
| 5091 | 5092 |
| 5092 initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_); | 5093 initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_); |
| 5094 |
| 5093 if (FLAG_semi_space_growth_factor < 2) { | 5095 if (FLAG_semi_space_growth_factor < 2) { |
| 5094 FLAG_semi_space_growth_factor = 2; | 5096 FLAG_semi_space_growth_factor = 2; |
| 5095 } | 5097 } |
| 5096 | 5098 |
| 5097 // The old generation is paged and needs at least one page for each space. | 5099 // The old generation is paged and needs at least one page for each space. |
| 5098 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; | 5100 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; |
| 5099 max_old_generation_size_ = | 5101 max_old_generation_size_ = |
| 5100 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize), | 5102 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize), |
| 5101 max_old_generation_size_); | 5103 max_old_generation_size_); |
| 5102 | 5104 |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6538 } | 6540 } |
| 6539 | 6541 |
| 6540 | 6542 |
| 6541 // static | 6543 // static |
| 6542 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6544 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6543 return StaticVisitorBase::GetVisitorId(map); | 6545 return StaticVisitorBase::GetVisitorId(map); |
| 6544 } | 6546 } |
| 6545 | 6547 |
| 6546 } // namespace internal | 6548 } // namespace internal |
| 6547 } // namespace v8 | 6549 } // namespace v8 |
| OLD | NEW |