| 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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 | 828 |
| 829 // Marks the object black assuming that it is not yet marked. | 829 // Marks the object black assuming that it is not yet marked. |
| 830 // This is for non-incremental marking only. | 830 // This is for non-incremental marking only. |
| 831 INLINE(void SetMark(HeapObject* obj, MarkBit mark_bit)); | 831 INLINE(void SetMark(HeapObject* obj, MarkBit mark_bit)); |
| 832 | 832 |
| 833 // Mark the heap roots and all objects reachable from them. | 833 // Mark the heap roots and all objects reachable from them. |
| 834 void MarkRoots(RootMarkingVisitor* visitor); | 834 void MarkRoots(RootMarkingVisitor* visitor); |
| 835 | 835 |
| 836 // Mark the string table specially. References to internalized strings from | 836 // Mark the string table specially. References to internalized strings from |
| 837 // the string table are weak. | 837 // the string table are weak. |
| 838 void MarkStringTable(); | 838 void MarkStringTable(RootMarkingVisitor* visitor); |
| 839 | 839 |
| 840 // Mark objects in implicit references groups if their parent object | 840 // Mark objects in implicit references groups if their parent object |
| 841 // is marked. | 841 // is marked. |
| 842 void MarkImplicitRefGroups(); | 842 void MarkImplicitRefGroups(); |
| 843 | 843 |
| 844 // Mark objects reachable (transitively) from objects in the marking stack | 844 // Mark objects reachable (transitively) from objects in the marking stack |
| 845 // or overflowed in the heap. | 845 // or overflowed in the heap. |
| 846 void ProcessMarkingDeque(); | 846 void ProcessMarkingDeque(); |
| 847 | 847 |
| 848 // Mark objects reachable (transitively) from objects in the marking stack | 848 // Mark objects reachable (transitively) from objects in the marking stack |
| (...skipping 24 matching lines...) Expand all Loading... |
| 873 static bool IsUnmarkedHeapObject(Object** p); | 873 static bool IsUnmarkedHeapObject(Object** p); |
| 874 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); | 874 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); |
| 875 | 875 |
| 876 // Map transitions from a live map to a dead map must be killed. | 876 // Map transitions from a live map to a dead map must be killed. |
| 877 // We replace them with a null descriptor, with the same key. | 877 // We replace them with a null descriptor, with the same key. |
| 878 void ClearNonLiveReferences(); | 878 void ClearNonLiveReferences(); |
| 879 void ClearNonLivePrototypeTransitions(Map* map); | 879 void ClearNonLivePrototypeTransitions(Map* map); |
| 880 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); | 880 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); |
| 881 | 881 |
| 882 void ClearAndDeoptimizeDependentCode(Map* map); | 882 void ClearAndDeoptimizeDependentCode(Map* map); |
| 883 void ClearNonLiveDependentCode(Map* map); | 883 void ClearNonLiveDependentCode(DependentCode* dependent_code); |
| 884 | 884 |
| 885 // Marking detaches initial maps from SharedFunctionInfo objects | 885 // Marking detaches initial maps from SharedFunctionInfo objects |
| 886 // to make this reference weak. We need to reattach initial maps | 886 // to make this reference weak. We need to reattach initial maps |
| 887 // back after collection. This is either done during | 887 // back after collection. This is either done during |
| 888 // ClearNonLiveTransitions pass or by calling this function. | 888 // ClearNonLiveTransitions pass or by calling this function. |
| 889 void ReattachInitialMaps(); | 889 void ReattachInitialMaps(); |
| 890 | 890 |
| 891 // Mark all values associated with reachable keys in weak maps encountered | 891 // Mark all values associated with reachable keys in weak maps encountered |
| 892 // so far. This might push new object or even new weak maps onto the | 892 // so far. This might push new object or even new weak maps onto the |
| 893 // marking stack. | 893 // marking stack. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 private: | 958 private: |
| 959 MarkCompactCollector* collector_; | 959 MarkCompactCollector* collector_; |
| 960 }; | 960 }; |
| 961 | 961 |
| 962 | 962 |
| 963 const char* AllocationSpaceName(AllocationSpace space); | 963 const char* AllocationSpaceName(AllocationSpace space); |
| 964 | 964 |
| 965 } } // namespace v8::internal | 965 } } // namespace v8::internal |
| 966 | 966 |
| 967 #endif // V8_MARK_COMPACT_H_ | 967 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |