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 #ifndef V8_HEAP_MARK_COMPACT_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
7 | 7 |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
10 | 10 |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 bool sequential_sweeping() const { return sequential_sweeping_; } | 650 bool sequential_sweeping() const { return sequential_sweeping_; } |
651 | 651 |
652 // Mark the global table which maps weak objects to dependent code without | 652 // Mark the global table which maps weak objects to dependent code without |
653 // marking its contents. | 653 // marking its contents. |
654 void MarkWeakObjectToCodeTable(); | 654 void MarkWeakObjectToCodeTable(); |
655 | 655 |
656 // Special case for processing weak references in a full collection. We need | 656 // Special case for processing weak references in a full collection. We need |
657 // to artificially keep AllocationSites alive for a time. | 657 // to artificially keep AllocationSites alive for a time. |
658 void MarkAllocationSite(AllocationSite* site); | 658 void MarkAllocationSite(AllocationSite* site); |
659 | 659 |
| 660 bool IsMarkingDequeEmpty(); |
| 661 |
660 private: | 662 private: |
661 class SweeperTask; | 663 class SweeperTask; |
662 | 664 |
663 explicit MarkCompactCollector(Heap* heap); | 665 explicit MarkCompactCollector(Heap* heap); |
664 ~MarkCompactCollector(); | 666 ~MarkCompactCollector(); |
665 | 667 |
666 bool MarkInvalidatedCode(); | 668 bool MarkInvalidatedCode(); |
667 bool WillBeDeoptimized(Code* code); | 669 bool WillBeDeoptimized(Code* code); |
668 void RemoveDeadInvalidatedCode(); | 670 void RemoveDeadInvalidatedCode(); |
669 void ProcessInvalidatedCode(ObjectVisitor* visitor); | 671 void ProcessInvalidatedCode(ObjectVisitor* visitor); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 private: | 946 private: |
945 MarkCompactCollector* collector_; | 947 MarkCompactCollector* collector_; |
946 }; | 948 }; |
947 | 949 |
948 | 950 |
949 const char* AllocationSpaceName(AllocationSpace space); | 951 const char* AllocationSpaceName(AllocationSpace space); |
950 } | 952 } |
951 } // namespace v8::internal | 953 } // namespace v8::internal |
952 | 954 |
953 #endif // V8_HEAP_MARK_COMPACT_H_ | 955 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |