| 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 | 608 |
| 609 void MigrateObject(HeapObject* dst, HeapObject* src, int size, | 609 void MigrateObject(HeapObject* dst, HeapObject* src, int size, |
| 610 AllocationSpace to_old_space); | 610 AllocationSpace to_old_space); |
| 611 | 611 |
| 612 bool TryPromoteObject(HeapObject* object, int object_size); | 612 bool TryPromoteObject(HeapObject* object, int object_size); |
| 613 | 613 |
| 614 void InvalidateCode(Code* code); | 614 void InvalidateCode(Code* code); |
| 615 | 615 |
| 616 void ClearMarkbits(); | 616 void ClearMarkbits(); |
| 617 | 617 |
| 618 bool abort_incremental_marking() const { return abort_incremental_marking_; } | 618 bool incremental_marking_abort_requested() const { |
| 619 return incremental_marking_abort_requested_; |
| 620 } |
| 619 | 621 |
| 620 bool is_compacting() const { return compacting_; } | 622 bool is_compacting() const { return compacting_; } |
| 621 | 623 |
| 622 MarkingParity marking_parity() { return marking_parity_; } | 624 MarkingParity marking_parity() { return marking_parity_; } |
| 623 | 625 |
| 624 // Concurrent and parallel sweeping support. If required_freed_bytes was set | 626 // Concurrent and parallel sweeping support. If required_freed_bytes was set |
| 625 // to a value larger than 0, then sweeping returns after a block of at least | 627 // to a value larger than 0, then sweeping returns after a block of at least |
| 626 // required_freed_bytes was freed. If required_freed_bytes was set to zero | 628 // required_freed_bytes was freed. If required_freed_bytes was set to zero |
| 627 // then the whole given space is swept. It returns the size of the maximum | 629 // then the whole given space is swept. It returns the size of the maximum |
| 628 // continuous freed memory chunk. | 630 // continuous freed memory chunk. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 UPDATE_POINTERS, | 700 UPDATE_POINTERS, |
| 699 RELOCATE_OBJECTS | 701 RELOCATE_OBJECTS |
| 700 }; | 702 }; |
| 701 | 703 |
| 702 // The current stage of the collector. | 704 // The current stage of the collector. |
| 703 CollectorState state_; | 705 CollectorState state_; |
| 704 #endif | 706 #endif |
| 705 | 707 |
| 706 bool reduce_memory_footprint_; | 708 bool reduce_memory_footprint_; |
| 707 | 709 |
| 708 bool abort_incremental_marking_; | 710 bool incremental_marking_abort_requested_; |
| 709 | 711 |
| 710 MarkingParity marking_parity_; | 712 MarkingParity marking_parity_; |
| 711 | 713 |
| 712 // True if we are collecting slots to perform evacuation from evacuation | 714 // True if we are collecting slots to perform evacuation from evacuation |
| 713 // candidates. | 715 // candidates. |
| 714 bool compacting_; | 716 bool compacting_; |
| 715 | 717 |
| 716 bool was_marked_incrementally_; | 718 bool was_marked_incrementally_; |
| 717 | 719 |
| 718 // True if concurrent or parallel sweeping is currently in progress. | 720 // True if concurrent or parallel sweeping is currently in progress. |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 private: | 960 private: |
| 959 MarkCompactCollector* collector_; | 961 MarkCompactCollector* collector_; |
| 960 }; | 962 }; |
| 961 | 963 |
| 962 | 964 |
| 963 const char* AllocationSpaceName(AllocationSpace space); | 965 const char* AllocationSpaceName(AllocationSpace space); |
| 964 } | 966 } |
| 965 } // namespace v8::internal | 967 } // namespace v8::internal |
| 966 | 968 |
| 967 #endif // V8_HEAP_MARK_COMPACT_H_ | 969 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |