| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 inline void set_encountered_weak_maps(Object* weak_map) { | 639 inline void set_encountered_weak_maps(Object* weak_map) { |
| 640 encountered_weak_maps_ = weak_map; | 640 encountered_weak_maps_ = weak_map; |
| 641 } | 641 } |
| 642 | 642 |
| 643 void InvalidateCode(Code* code); | 643 void InvalidateCode(Code* code); |
| 644 | 644 |
| 645 void ClearMarkbits(); | 645 void ClearMarkbits(); |
| 646 | 646 |
| 647 bool is_compacting() const { return compacting_; } | 647 bool is_compacting() const { return compacting_; } |
| 648 | 648 |
| 649 MarkingParity marking_parity() { return marking_parity_; } |
| 650 |
| 649 private: | 651 private: |
| 650 MarkCompactCollector(); | 652 MarkCompactCollector(); |
| 651 ~MarkCompactCollector(); | 653 ~MarkCompactCollector(); |
| 652 | 654 |
| 653 bool MarkInvalidatedCode(); | 655 bool MarkInvalidatedCode(); |
| 654 void RemoveDeadInvalidatedCode(); | 656 void RemoveDeadInvalidatedCode(); |
| 655 void ProcessInvalidatedCode(ObjectVisitor* visitor); | 657 void ProcessInvalidatedCode(ObjectVisitor* visitor); |
| 656 | 658 |
| 657 | 659 |
| 658 #ifdef DEBUG | 660 #ifdef DEBUG |
| (...skipping 12 matching lines...) Expand all Loading... |
| 671 #endif | 673 #endif |
| 672 | 674 |
| 673 // Global flag that forces sweeping to be precise, so we can traverse the | 675 // Global flag that forces sweeping to be precise, so we can traverse the |
| 674 // heap. | 676 // heap. |
| 675 bool sweep_precisely_; | 677 bool sweep_precisely_; |
| 676 | 678 |
| 677 bool reduce_memory_footprint_; | 679 bool reduce_memory_footprint_; |
| 678 | 680 |
| 679 bool abort_incremental_marking_; | 681 bool abort_incremental_marking_; |
| 680 | 682 |
| 683 MarkingParity marking_parity_; |
| 684 |
| 681 // True if we are collecting slots to perform evacuation from evacuation | 685 // True if we are collecting slots to perform evacuation from evacuation |
| 682 // candidates. | 686 // candidates. |
| 683 bool compacting_; | 687 bool compacting_; |
| 684 | 688 |
| 685 bool was_marked_incrementally_; | 689 bool was_marked_incrementally_; |
| 686 | 690 |
| 687 // A pointer to the current stack-allocated GC tracer object during a full | 691 // A pointer to the current stack-allocated GC tracer object during a full |
| 688 // collection (NULL before and after). | 692 // collection (NULL before and after). |
| 689 GCTracer* tracer_; | 693 GCTracer* tracer_; |
| 690 | 694 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 | 841 |
| 838 friend class Heap; | 842 friend class Heap; |
| 839 }; | 843 }; |
| 840 | 844 |
| 841 | 845 |
| 842 const char* AllocationSpaceName(AllocationSpace space); | 846 const char* AllocationSpaceName(AllocationSpace space); |
| 843 | 847 |
| 844 } } // namespace v8::internal | 848 } } // namespace v8::internal |
| 845 | 849 |
| 846 #endif // V8_MARK_COMPACT_H_ | 850 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |