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 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1606 RelocationLock relocation_lock(this); | 1606 RelocationLock relocation_lock(this); |
1607 // There are soft limits in the allocation code, designed to trigger a mark | 1607 // There are soft limits in the allocation code, designed to trigger a mark |
1608 // sweep collection by failing allocations. There is no sense in trying to | 1608 // sweep collection by failing allocations. There is no sense in trying to |
1609 // trigger one during scavenge: scavenges allocation should always succeed. | 1609 // trigger one during scavenge: scavenges allocation should always succeed. |
1610 AlwaysAllocateScope scope(isolate()); | 1610 AlwaysAllocateScope scope(isolate()); |
1611 | 1611 |
1612 // Bump-pointer allocations done during scavenge are not real allocations. | 1612 // Bump-pointer allocations done during scavenge are not real allocations. |
1613 // Pause the inline allocation steps. | 1613 // Pause the inline allocation steps. |
1614 PauseAllocationObserversScope pause_observers(this); | 1614 PauseAllocationObserversScope pause_observers(this); |
1615 | 1615 |
1616 mark_compact_collector()->sweeper().EnsureNewSpaceCompleted(); | |
Michael Lippautz
2016/06/09 09:21:22
This one requires IsSweepingCompleted() to be corr
| |
1617 | |
1616 #ifdef VERIFY_HEAP | 1618 #ifdef VERIFY_HEAP |
1617 if (FLAG_verify_heap) VerifyNonPointerSpacePointers(this); | 1619 if (FLAG_verify_heap) VerifyNonPointerSpacePointers(this); |
1618 #endif | 1620 #endif |
1619 | 1621 |
1620 gc_state_ = SCAVENGE; | 1622 gc_state_ = SCAVENGE; |
1621 | 1623 |
1622 // Implements Cheney's copying algorithm | 1624 // Implements Cheney's copying algorithm |
1623 LOG(isolate_, ResourceEvent("scavenge", "begin")); | 1625 LOG(isolate_, ResourceEvent("scavenge", "begin")); |
1624 | 1626 |
1625 // Used for updating survived_since_last_expansion_ at function end. | 1627 // Used for updating survived_since_last_expansion_ at function end. |
(...skipping 4781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6407 } | 6409 } |
6408 | 6410 |
6409 | 6411 |
6410 // static | 6412 // static |
6411 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6413 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6412 return StaticVisitorBase::GetVisitorId(map); | 6414 return StaticVisitorBase::GetVisitorId(map); |
6413 } | 6415 } |
6414 | 6416 |
6415 } // namespace internal | 6417 } // namespace internal |
6416 } // namespace v8 | 6418 } // namespace v8 |
OLD | NEW |