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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 RelocationLock relocation_lock(this); | 1588 RelocationLock relocation_lock(this); |
1589 // There are soft limits in the allocation code, designed to trigger a mark | 1589 // There are soft limits in the allocation code, designed to trigger a mark |
1590 // sweep collection by failing allocations. There is no sense in trying to | 1590 // sweep collection by failing allocations. There is no sense in trying to |
1591 // trigger one during scavenge: scavenges allocation should always succeed. | 1591 // trigger one during scavenge: scavenges allocation should always succeed. |
1592 AlwaysAllocateScope scope(isolate()); | 1592 AlwaysAllocateScope scope(isolate()); |
1593 | 1593 |
1594 // Bump-pointer allocations done during scavenge are not real allocations. | 1594 // Bump-pointer allocations done during scavenge are not real allocations. |
1595 // Pause the inline allocation steps. | 1595 // Pause the inline allocation steps. |
1596 PauseAllocationObserversScope pause_observers(this); | 1596 PauseAllocationObserversScope pause_observers(this); |
1597 | 1597 |
| 1598 mark_compact_collector()->sweeper().EnsureNewSpaceCompleted(); |
| 1599 |
1598 gc_state_ = SCAVENGE; | 1600 gc_state_ = SCAVENGE; |
1599 | 1601 |
1600 // Implements Cheney's copying algorithm | 1602 // Implements Cheney's copying algorithm |
1601 LOG(isolate_, ResourceEvent("scavenge", "begin")); | 1603 LOG(isolate_, ResourceEvent("scavenge", "begin")); |
1602 | 1604 |
1603 // Used for updating survived_since_last_expansion_ at function end. | 1605 // Used for updating survived_since_last_expansion_ at function end. |
1604 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); | 1606 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); |
1605 | 1607 |
1606 scavenge_collector_->SelectScavengingVisitorsTable(); | 1608 scavenge_collector_->SelectScavengingVisitorsTable(); |
1607 | 1609 |
(...skipping 4876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6484 } | 6486 } |
6485 | 6487 |
6486 | 6488 |
6487 // static | 6489 // static |
6488 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6490 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6489 return StaticVisitorBase::GetVisitorId(map); | 6491 return StaticVisitorBase::GetVisitorId(map); |
6490 } | 6492 } |
6491 | 6493 |
6492 } // namespace internal | 6494 } // namespace internal |
6493 } // namespace v8 | 6495 } // namespace v8 |
OLD | NEW |