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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 // This is for non-incremental marking only. | 749 // This is for non-incremental marking only. |
750 INLINE(void SetMark(HeapObject* obj, MarkBit mark_bit)); | 750 INLINE(void SetMark(HeapObject* obj, MarkBit mark_bit)); |
751 | 751 |
752 // Mark the heap roots and all objects reachable from them. | 752 // Mark the heap roots and all objects reachable from them. |
753 void MarkRoots(RootMarkingVisitor* visitor); | 753 void MarkRoots(RootMarkingVisitor* visitor); |
754 | 754 |
755 // Mark the symbol table specially. References to symbols from the | 755 // Mark the symbol table specially. References to symbols from the |
756 // symbol table are weak. | 756 // symbol table are weak. |
757 void MarkSymbolTable(); | 757 void MarkSymbolTable(); |
758 | 758 |
759 // Mark objects in object groups that have at least one object in the | |
760 // group marked. | |
761 void MarkObjectGroups(); | |
762 | |
763 // Mark objects in implicit references groups if their parent object | 759 // Mark objects in implicit references groups if their parent object |
764 // is marked. | 760 // is marked. |
765 void MarkImplicitRefGroups(); | 761 void MarkImplicitRefGroups(); |
766 | 762 |
767 // Mark all objects which are reachable due to host application | 763 // Mark all objects which are reachable due to host application |
768 // logic like object groups or implicit references' groups. | 764 // logic like object groups or implicit references' groups. |
769 void ProcessExternalMarking(); | 765 void ProcessExternalMarking(RootMarkingVisitor* visitor); |
770 | 766 |
771 // Mark objects reachable (transitively) from objects in the marking stack | 767 // Mark objects reachable (transitively) from objects in the marking stack |
772 // or overflowed in the heap. | 768 // or overflowed in the heap. |
773 void ProcessMarkingDeque(); | 769 void ProcessMarkingDeque(); |
774 | 770 |
775 // Mark objects reachable (transitively) from objects in the marking | 771 // Mark objects reachable (transitively) from objects in the marking |
776 // stack. This function empties the marking stack, but may leave | 772 // stack. This function empties the marking stack, but may leave |
777 // overflowed objects in the heap, in which case the marking stack's | 773 // overflowed objects in the heap, in which case the marking stack's |
778 // overflow flag will be set. | 774 // overflow flag will be set. |
779 void EmptyMarkingDeque(); | 775 void EmptyMarkingDeque(); |
780 | 776 |
781 // Refill the marking stack with overflowed objects from the heap. This | 777 // Refill the marking stack with overflowed objects from the heap. This |
782 // function either leaves the marking stack full or clears the overflow | 778 // function either leaves the marking stack full or clears the overflow |
783 // flag on the marking stack. | 779 // flag on the marking stack. |
784 void RefillMarkingDeque(); | 780 void RefillMarkingDeque(); |
785 | 781 |
786 // After reachable maps have been marked process per context object | 782 // After reachable maps have been marked process per context object |
787 // literal map caches removing unmarked entries. | 783 // literal map caches removing unmarked entries. |
788 void ProcessMapCaches(); | 784 void ProcessMapCaches(); |
789 | 785 |
790 // Callback function for telling whether the object *p is an unmarked | 786 // Callback function for telling whether the object *p is an unmarked |
791 // heap object. | 787 // heap object. |
792 static bool IsUnmarkedHeapObject(Object** p); | 788 static bool IsUnmarkedHeapObject(Object** p); |
| 789 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); |
793 | 790 |
794 // Map transitions from a live map to a dead map must be killed. | 791 // Map transitions from a live map to a dead map must be killed. |
795 // We replace them with a null descriptor, with the same key. | 792 // We replace them with a null descriptor, with the same key. |
796 void ClearNonLiveTransitions(); | 793 void ClearNonLiveTransitions(); |
797 void ClearNonLivePrototypeTransitions(Map* map); | 794 void ClearNonLivePrototypeTransitions(Map* map); |
798 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); | 795 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); |
799 | 796 |
800 // Marking detaches initial maps from SharedFunctionInfo objects | 797 // Marking detaches initial maps from SharedFunctionInfo objects |
801 // to make this reference weak. We need to reattach initial maps | 798 // to make this reference weak. We need to reattach initial maps |
802 // back after collection. This is either done during | 799 // back after collection. This is either done during |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 | 854 |
858 friend class Heap; | 855 friend class Heap; |
859 }; | 856 }; |
860 | 857 |
861 | 858 |
862 const char* AllocationSpaceName(AllocationSpace space); | 859 const char* AllocationSpaceName(AllocationSpace space); |
863 | 860 |
864 } } // namespace v8::internal | 861 } } // namespace v8::internal |
865 | 862 |
866 #endif // V8_MARK_COMPACT_H_ | 863 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |