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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 | 629 |
630 void MigrateObject(HeapObject* dst, HeapObject* src, int size, | 630 void MigrateObject(HeapObject* dst, HeapObject* src, int size, |
631 AllocationSpace to_old_space); | 631 AllocationSpace to_old_space); |
632 | 632 |
633 bool TryPromoteObject(HeapObject* object, int object_size); | 633 bool TryPromoteObject(HeapObject* object, int object_size); |
634 | 634 |
635 void InvalidateCode(Code* code); | 635 void InvalidateCode(Code* code); |
636 | 636 |
637 void ClearMarkbits(); | 637 void ClearMarkbits(); |
638 | 638 |
639 bool abort_incremental_marking() const { return abort_incremental_marking_; } | 639 bool incremental_marking_abort_requested() const { |
| 640 return incremental_marking_abort_requested_; |
| 641 } |
640 | 642 |
641 bool is_compacting() const { return compacting_; } | 643 bool is_compacting() const { return compacting_; } |
642 | 644 |
643 MarkingParity marking_parity() { return marking_parity_; } | 645 MarkingParity marking_parity() { return marking_parity_; } |
644 | 646 |
645 // Concurrent and parallel sweeping support. If required_freed_bytes was set | 647 // Concurrent and parallel sweeping support. If required_freed_bytes was set |
646 // to a value larger than 0, then sweeping returns after a block of at least | 648 // to a value larger than 0, then sweeping returns after a block of at least |
647 // required_freed_bytes was freed. If required_freed_bytes was set to zero | 649 // required_freed_bytes was freed. If required_freed_bytes was set to zero |
648 // then the whole given space is swept. It returns the size of the maximum | 650 // then the whole given space is swept. It returns the size of the maximum |
649 // continuous freed memory chunk. | 651 // continuous freed memory chunk. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 UPDATE_POINTERS, | 720 UPDATE_POINTERS, |
719 RELOCATE_OBJECTS | 721 RELOCATE_OBJECTS |
720 }; | 722 }; |
721 | 723 |
722 // The current stage of the collector. | 724 // The current stage of the collector. |
723 CollectorState state_; | 725 CollectorState state_; |
724 #endif | 726 #endif |
725 | 727 |
726 bool reduce_memory_footprint_; | 728 bool reduce_memory_footprint_; |
727 | 729 |
728 bool abort_incremental_marking_; | 730 bool incremental_marking_abort_requested_; |
729 | 731 |
730 MarkingParity marking_parity_; | 732 MarkingParity marking_parity_; |
731 | 733 |
732 // True if we are collecting slots to perform evacuation from evacuation | 734 // True if we are collecting slots to perform evacuation from evacuation |
733 // candidates. | 735 // candidates. |
734 bool compacting_; | 736 bool compacting_; |
735 | 737 |
736 bool was_marked_incrementally_; | 738 bool was_marked_incrementally_; |
737 | 739 |
738 // True if concurrent or parallel sweeping is currently in progress. | 740 // True if concurrent or parallel sweeping is currently in progress. |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 private: | 980 private: |
979 MarkCompactCollector* collector_; | 981 MarkCompactCollector* collector_; |
980 }; | 982 }; |
981 | 983 |
982 | 984 |
983 const char* AllocationSpaceName(AllocationSpace space); | 985 const char* AllocationSpaceName(AllocationSpace space); |
984 } | 986 } |
985 } // namespace v8::internal | 987 } // namespace v8::internal |
986 | 988 |
987 #endif // V8_HEAP_MARK_COMPACT_H_ | 989 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |