| 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 MarkingDeque* marking_deque() { return &marking_deque_; } | 663 MarkingDeque* marking_deque() { return &marking_deque_; } |
| 664 | 664 |
| 665 void EnsureMarkingDequeIsCommittedAndInitialize(); | 665 void EnsureMarkingDequeIsCommittedAndInitialize(); |
| 666 | 666 |
| 667 void InitializeMarkingDeque(); | 667 void InitializeMarkingDeque(); |
| 668 | 668 |
| 669 void UncommitMarkingDeque(); | 669 void UncommitMarkingDeque(); |
| 670 | 670 |
| 671 void OverApproximateWeakClosure(); | 671 void OverApproximateWeakClosure(); |
| 672 | 672 |
| 673 // The following four methods can just be called after marking, when the |
| 674 // whole transitive closure is known. They must be called before sweeping |
| 675 // when mark bits are still intact. |
| 676 bool IsSlotInBlackObject(Page* p, Address slot); |
| 677 bool IsSlotInBlackObjectSlow(Page* p, Address slot); |
| 678 bool IsSlotInLiveObject(HeapObject** address, HeapObject* object); |
| 679 void VerifyIsSlotInLiveObject(HeapObject** address, HeapObject* object); |
| 680 |
| 673 private: | 681 private: |
| 674 class SweeperTask; | 682 class SweeperTask; |
| 675 | 683 |
| 676 explicit MarkCompactCollector(Heap* heap); | 684 explicit MarkCompactCollector(Heap* heap); |
| 677 ~MarkCompactCollector(); | 685 ~MarkCompactCollector(); |
| 678 | 686 |
| 679 bool MarkInvalidatedCode(); | 687 bool MarkInvalidatedCode(); |
| 680 bool WillBeDeoptimized(Code* code); | 688 bool WillBeDeoptimized(Code* code); |
| 681 void RemoveDeadInvalidatedCode(); | 689 void RemoveDeadInvalidatedCode(); |
| 682 void ProcessInvalidatedCode(ObjectVisitor* visitor); | 690 void ProcessInvalidatedCode(ObjectVisitor* visitor); |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 private: | 966 private: |
| 959 MarkCompactCollector* collector_; | 967 MarkCompactCollector* collector_; |
| 960 }; | 968 }; |
| 961 | 969 |
| 962 | 970 |
| 963 const char* AllocationSpaceName(AllocationSpace space); | 971 const char* AllocationSpaceName(AllocationSpace space); |
| 964 } | 972 } |
| 965 } // namespace v8::internal | 973 } // namespace v8::internal |
| 966 | 974 |
| 967 #endif // V8_HEAP_MARK_COMPACT_H_ | 975 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |