| 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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 | 737 |
| 738 // Mark the global table which maps weak objects to dependent code without | 738 // Mark the global table which maps weak objects to dependent code without |
| 739 // marking its contents. | 739 // marking its contents. |
| 740 void MarkWeakObjectToCodeTable(); | 740 void MarkWeakObjectToCodeTable(); |
| 741 | 741 |
| 742 // Special case for processing weak references in a full collection. We need | 742 // Special case for processing weak references in a full collection. We need |
| 743 // to artifically keep AllocationSites alive for a time. | 743 // to artifically keep AllocationSites alive for a time. |
| 744 void MarkAllocationSite(AllocationSite* site); | 744 void MarkAllocationSite(AllocationSite* site); |
| 745 | 745 |
| 746 private: | 746 private: |
| 747 class SweeperTask; |
| 748 |
| 747 explicit MarkCompactCollector(Heap* heap); | 749 explicit MarkCompactCollector(Heap* heap); |
| 748 ~MarkCompactCollector(); | 750 ~MarkCompactCollector(); |
| 749 | 751 |
| 750 bool MarkInvalidatedCode(); | 752 bool MarkInvalidatedCode(); |
| 751 bool WillBeDeoptimized(Code* code); | 753 bool WillBeDeoptimized(Code* code); |
| 752 void RemoveDeadInvalidatedCode(); | 754 void RemoveDeadInvalidatedCode(); |
| 753 void ProcessInvalidatedCode(ObjectVisitor* visitor); | 755 void ProcessInvalidatedCode(ObjectVisitor* visitor); |
| 754 | 756 |
| 755 void UnlinkEvacuationCandidates(); | 757 void UnlinkEvacuationCandidates(); |
| 756 void ReleaseEvacuationCandidates(); | 758 void ReleaseEvacuationCandidates(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 784 | 786 |
| 785 // True if we are collecting slots to perform evacuation from evacuation | 787 // True if we are collecting slots to perform evacuation from evacuation |
| 786 // candidates. | 788 // candidates. |
| 787 bool compacting_; | 789 bool compacting_; |
| 788 | 790 |
| 789 bool was_marked_incrementally_; | 791 bool was_marked_incrementally_; |
| 790 | 792 |
| 791 // True if concurrent or parallel sweeping is currently in progress. | 793 // True if concurrent or parallel sweeping is currently in progress. |
| 792 bool sweeping_pending_; | 794 bool sweeping_pending_; |
| 793 | 795 |
| 796 Semaphore pending_sweeper_jobs_semaphore_; |
| 797 |
| 794 bool sequential_sweeping_; | 798 bool sequential_sweeping_; |
| 795 | 799 |
| 796 // A pointer to the current stack-allocated GC tracer object during a full | 800 // A pointer to the current stack-allocated GC tracer object during a full |
| 797 // collection (NULL before and after). | 801 // collection (NULL before and after). |
| 798 GCTracer* tracer_; | 802 GCTracer* tracer_; |
| 799 | 803 |
| 800 SlotsBufferAllocator slots_buffer_allocator_; | 804 SlotsBufferAllocator slots_buffer_allocator_; |
| 801 | 805 |
| 802 SlotsBuffer* migration_slots_buffer_; | 806 SlotsBuffer* migration_slots_buffer_; |
| 803 | 807 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 private: | 1026 private: |
| 1023 MarkCompactCollector* collector_; | 1027 MarkCompactCollector* collector_; |
| 1024 }; | 1028 }; |
| 1025 | 1029 |
| 1026 | 1030 |
| 1027 const char* AllocationSpaceName(AllocationSpace space); | 1031 const char* AllocationSpaceName(AllocationSpace space); |
| 1028 | 1032 |
| 1029 } } // namespace v8::internal | 1033 } } // namespace v8::internal |
| 1030 | 1034 |
| 1031 #endif // V8_MARK_COMPACT_H_ | 1035 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |