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_MARK_COMPACT_H_ | 5 #ifndef V8_MARK_COMPACT_H_ |
6 #define V8_MARK_COMPACT_H_ | 6 #define V8_MARK_COMPACT_H_ |
7 | 7 |
8 #include "compiler-intrinsics.h" | 8 #include "compiler-intrinsics.h" |
9 #include "spaces.h" | 9 #include "spaces.h" |
10 | 10 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 SlotsBuffer::AdditionMode mode = | 642 SlotsBuffer::AdditionMode mode = |
643 SlotsBuffer::FAIL_ON_OVERFLOW)); | 643 SlotsBuffer::FAIL_ON_OVERFLOW)); |
644 | 644 |
645 void MigrateObject(HeapObject* dst, | 645 void MigrateObject(HeapObject* dst, |
646 HeapObject* src, | 646 HeapObject* src, |
647 int size, | 647 int size, |
648 AllocationSpace to_old_space); | 648 AllocationSpace to_old_space); |
649 | 649 |
650 bool TryPromoteObject(HeapObject* object, int object_size); | 650 bool TryPromoteObject(HeapObject* object, int object_size); |
651 | 651 |
652 inline Object* encountered_weak_collections() { | |
653 return encountered_weak_collections_; | |
654 } | |
655 inline void set_encountered_weak_collections(Object* weak_collection) { | |
656 encountered_weak_collections_ = weak_collection; | |
657 } | |
658 | |
659 void InvalidateCode(Code* code); | 652 void InvalidateCode(Code* code); |
660 | 653 |
661 void ClearMarkbits(); | 654 void ClearMarkbits(); |
662 | 655 |
663 bool abort_incremental_marking() const { return abort_incremental_marking_; } | 656 bool abort_incremental_marking() const { return abort_incremental_marking_; } |
664 | 657 |
665 bool is_compacting() const { return compacting_; } | 658 bool is_compacting() const { return compacting_; } |
666 | 659 |
667 MarkingParity marking_parity() { return marking_parity_; } | 660 MarkingParity marking_parity() { return marking_parity_; } |
668 | 661 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 friend class MarkObjectVisitor; | 899 friend class MarkObjectVisitor; |
907 static void VisitObject(HeapObject* obj); | 900 static void VisitObject(HeapObject* obj); |
908 | 901 |
909 friend class UnmarkObjectVisitor; | 902 friend class UnmarkObjectVisitor; |
910 static void UnmarkObject(HeapObject* obj); | 903 static void UnmarkObject(HeapObject* obj); |
911 #endif | 904 #endif |
912 | 905 |
913 Heap* heap_; | 906 Heap* heap_; |
914 MarkingDeque marking_deque_; | 907 MarkingDeque marking_deque_; |
915 CodeFlusher* code_flusher_; | 908 CodeFlusher* code_flusher_; |
916 Object* encountered_weak_collections_; | |
917 bool have_code_to_deoptimize_; | 909 bool have_code_to_deoptimize_; |
918 | 910 |
919 List<Page*> evacuation_candidates_; | 911 List<Page*> evacuation_candidates_; |
920 List<Code*> invalidated_code_; | 912 List<Code*> invalidated_code_; |
921 | 913 |
922 SmartPointer<FreeList> free_list_old_data_space_; | 914 SmartPointer<FreeList> free_list_old_data_space_; |
923 SmartPointer<FreeList> free_list_old_pointer_space_; | 915 SmartPointer<FreeList> free_list_old_pointer_space_; |
924 | 916 |
925 friend class Heap; | 917 friend class Heap; |
926 }; | 918 }; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 private: | 976 private: |
985 MarkCompactCollector* collector_; | 977 MarkCompactCollector* collector_; |
986 }; | 978 }; |
987 | 979 |
988 | 980 |
989 const char* AllocationSpaceName(AllocationSpace space); | 981 const char* AllocationSpaceName(AllocationSpace space); |
990 | 982 |
991 } } // namespace v8::internal | 983 } } // namespace v8::internal |
992 | 984 |
993 #endif // V8_MARK_COMPACT_H_ | 985 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |