| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 531 |
| 532 bool TryPromoteObject(HeapObject* object, int object_size); | 532 bool TryPromoteObject(HeapObject* object, int object_size); |
| 533 | 533 |
| 534 inline Object* encountered_weak_maps() { return encountered_weak_maps_; } | 534 inline Object* encountered_weak_maps() { return encountered_weak_maps_; } |
| 535 inline void set_encountered_weak_maps(Object* weak_map) { | 535 inline void set_encountered_weak_maps(Object* weak_map) { |
| 536 encountered_weak_maps_ = weak_map; | 536 encountered_weak_maps_ = weak_map; |
| 537 } | 537 } |
| 538 | 538 |
| 539 void InvalidateCode(Code* code); | 539 void InvalidateCode(Code* code); |
| 540 | 540 |
| 541 void ClearMarkbits(); |
| 542 |
| 541 private: | 543 private: |
| 542 MarkCompactCollector(); | 544 MarkCompactCollector(); |
| 543 ~MarkCompactCollector(); | 545 ~MarkCompactCollector(); |
| 544 | 546 |
| 545 bool MarkInvalidatedCode(); | 547 bool MarkInvalidatedCode(); |
| 546 void RemoveDeadInvalidatedCode(); | 548 void RemoveDeadInvalidatedCode(); |
| 547 void ProcessInvalidatedCode(ObjectVisitor* visitor); | 549 void ProcessInvalidatedCode(ObjectVisitor* visitor); |
| 548 | 550 |
| 549 | 551 |
| 550 #ifdef DEBUG | 552 #ifdef DEBUG |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 void EvacuateNewSpace(); | 712 void EvacuateNewSpace(); |
| 711 | 713 |
| 712 void EvacuateLiveObjectsFromPage(Page* p); | 714 void EvacuateLiveObjectsFromPage(Page* p); |
| 713 | 715 |
| 714 void EvacuatePages(); | 716 void EvacuatePages(); |
| 715 | 717 |
| 716 void EvacuateNewSpaceAndCandidates(); | 718 void EvacuateNewSpaceAndCandidates(); |
| 717 | 719 |
| 718 void SweepSpace(PagedSpace* space, SweeperType sweeper); | 720 void SweepSpace(PagedSpace* space, SweeperType sweeper); |
| 719 | 721 |
| 720 | |
| 721 #ifdef DEBUG | 722 #ifdef DEBUG |
| 722 // ----------------------------------------------------------------------- | 723 // ----------------------------------------------------------------------- |
| 723 // Debugging variables, functions and classes | 724 // Debugging variables, functions and classes |
| 724 // Counters used for debugging the marking phase of mark-compact or | 725 // Counters used for debugging the marking phase of mark-compact or |
| 725 // mark-sweep collection. | 726 // mark-sweep collection. |
| 726 | 727 |
| 727 // Size of live objects in Heap::to_space_. | 728 // Size of live objects in Heap::to_space_. |
| 728 int live_young_objects_size_; | 729 int live_young_objects_size_; |
| 729 | 730 |
| 730 // Size of live objects in Heap::old_pointer_space_. | 731 // Size of live objects in Heap::old_pointer_space_. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 | 766 |
| 766 friend class Heap; | 767 friend class Heap; |
| 767 }; | 768 }; |
| 768 | 769 |
| 769 | 770 |
| 770 const char* AllocationSpaceName(AllocationSpace space); | 771 const char* AllocationSpaceName(AllocationSpace space); |
| 771 | 772 |
| 772 } } // namespace v8::internal | 773 } } // namespace v8::internal |
| 773 | 774 |
| 774 #endif // V8_MARK_COMPACT_H_ | 775 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |