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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 | 1621 |
1622 // Implements Cheney's copying algorithm | 1622 // Implements Cheney's copying algorithm |
1623 LOG(isolate_, ResourceEvent("scavenge", "begin")); | 1623 LOG(isolate_, ResourceEvent("scavenge", "begin")); |
1624 | 1624 |
1625 // Used for updating survived_since_last_expansion_ at function end. | 1625 // Used for updating survived_since_last_expansion_ at function end. |
1626 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); | 1626 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); |
1627 | 1627 |
1628 scavenge_collector_->SelectScavengingVisitorsTable(); | 1628 scavenge_collector_->SelectScavengingVisitorsTable(); |
1629 | 1629 |
1630 if (UsingEmbedderHeapTracer()) { | 1630 if (UsingEmbedderHeapTracer()) { |
1631 // Register found wrappers with embedder so he can add them to his marking | 1631 // Register found wrappers with embedder so it can add them to its marking |
1632 // deque and correctly manage the case when v8 scavenger collects the | 1632 // deque and correctly manage the case when v8 scavenger collects the |
1633 // wrappers by either keeping wrappables alive, or cleaning marking deque. | 1633 // wrappers by either keeping wrappables alive, or cleaning marking deque. |
1634 mark_compact_collector()->RegisterWrappersWithEmbedderHeapTracer(); | 1634 mark_compact_collector()->RegisterWrappersWithEmbedderHeapTracer(); |
1635 } | 1635 } |
1636 | 1636 |
1637 // Flip the semispaces. After flipping, to space is empty, from space has | 1637 // Flip the semispaces. After flipping, to space is empty, from space has |
1638 // live objects. | 1638 // live objects. |
1639 new_space_.Flip(); | 1639 new_space_.Flip(); |
1640 new_space_.ResetAllocationInfo(); | 1640 new_space_.ResetAllocationInfo(); |
1641 | 1641 |
(...skipping 4730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6372 } | 6372 } |
6373 | 6373 |
6374 | 6374 |
6375 // static | 6375 // static |
6376 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6376 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6377 return StaticVisitorBase::GetVisitorId(map); | 6377 return StaticVisitorBase::GetVisitorId(map); |
6378 } | 6378 } |
6379 | 6379 |
6380 } // namespace internal | 6380 } // namespace internal |
6381 } // namespace v8 | 6381 } // namespace v8 |
OLD | NEW |