Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: src/heap/mark-compact.h

Issue 871253005: Use weak cells in dependent code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_MARK_COMPACT_H_ 5 #ifndef V8_HEAP_MARK_COMPACT_H_
6 #define V8_HEAP_MARK_COMPACT_H_ 6 #define V8_HEAP_MARK_COMPACT_H_
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/heap/spaces.h" 9 #include "src/heap/spaces.h"
10 10
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 649
650 void RefillFreeList(PagedSpace* space); 650 void RefillFreeList(PagedSpace* space);
651 651
652 // Checks if sweeping is in progress right now on any space. 652 // Checks if sweeping is in progress right now on any space.
653 bool sweeping_in_progress() { return sweeping_in_progress_; } 653 bool sweeping_in_progress() { return sweeping_in_progress_; }
654 654
655 void set_evacuation(bool evacuation) { evacuation_ = evacuation; } 655 void set_evacuation(bool evacuation) { evacuation_ = evacuation; }
656 656
657 bool evacuation() const { return evacuation_; } 657 bool evacuation() const { return evacuation_; }
658 658
659 // Mark the global table which maps weak objects to dependent code without
660 // marking its contents.
661 void MarkWeakObjectToCodeTable();
662
663 // Special case for processing weak references in a full collection. We need 659 // Special case for processing weak references in a full collection. We need
664 // to artificially keep AllocationSites alive for a time. 660 // to artificially keep AllocationSites alive for a time.
665 void MarkAllocationSite(AllocationSite* site); 661 void MarkAllocationSite(AllocationSite* site);
666 662
667 MarkingDeque* marking_deque() { return &marking_deque_; } 663 MarkingDeque* marking_deque() { return &marking_deque_; }
668 664
669 void EnsureMarkingDequeIsCommittedAndInitialize(); 665 void EnsureMarkingDequeIsCommittedAndInitialize();
670 666
671 void InitializeMarkingDeque(); 667 void InitializeMarkingDeque();
672 668
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 // We replace them with a null descriptor, with the same key. 807 // We replace them with a null descriptor, with the same key.
812 void ClearNonLiveReferences(); 808 void ClearNonLiveReferences();
813 void ClearNonLivePrototypeTransitions(Map* map); 809 void ClearNonLivePrototypeTransitions(Map* map);
814 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); 810 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark);
815 void ClearMapTransitions(Map* map); 811 void ClearMapTransitions(Map* map);
816 bool ClearMapBackPointer(Map* map); 812 bool ClearMapBackPointer(Map* map);
817 void TrimDescriptorArray(Map* map, DescriptorArray* descriptors, 813 void TrimDescriptorArray(Map* map, DescriptorArray* descriptors,
818 int number_of_own_descriptors); 814 int number_of_own_descriptors);
819 void TrimEnumCache(Map* map, DescriptorArray* descriptors); 815 void TrimEnumCache(Map* map, DescriptorArray* descriptors);
820 816
821 void ClearDependentCode(DependentCode* dependent_code);
822 void ClearNonLiveDependentCode(DependentCode* dependent_code);
823 int ClearNonLiveDependentCodeInGroup(DependentCode* dependent_code, int group,
824 int start, int end, int new_start);
825
826 // Mark all values associated with reachable keys in weak collections 817 // Mark all values associated with reachable keys in weak collections
827 // encountered so far. This might push new object or even new weak maps onto 818 // encountered so far. This might push new object or even new weak maps onto
828 // the marking stack. 819 // the marking stack.
829 void ProcessWeakCollections(); 820 void ProcessWeakCollections();
830 821
831 // After all reachable objects have been marked those weak map entries 822 // After all reachable objects have been marked those weak map entries
832 // with an unreachable key are removed from all encountered weak maps. 823 // with an unreachable key are removed from all encountered weak maps.
833 // The linked list of all encountered weak maps is destroyed. 824 // The linked list of all encountered weak maps is destroyed.
834 void ClearWeakCollections(); 825 void ClearWeakCollections();
835 826
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 private: 954 private:
964 MarkCompactCollector* collector_; 955 MarkCompactCollector* collector_;
965 }; 956 };
966 957
967 958
968 const char* AllocationSpaceName(AllocationSpace space); 959 const char* AllocationSpaceName(AllocationSpace space);
969 } 960 }
970 } // namespace v8::internal 961 } // namespace v8::internal
971 962
972 #endif // V8_HEAP_MARK_COMPACT_H_ 963 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698