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

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: Add comment 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
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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 646
647 // Checks if sweeping is in progress right now on any space. 647 // Checks if sweeping is in progress right now on any space.
648 bool sweeping_in_progress() { return sweeping_in_progress_; } 648 bool sweeping_in_progress() { return sweeping_in_progress_; }
649 649
650 void set_evacuation(bool evacuation) { evacuation_ = evacuation; } 650 void set_evacuation(bool evacuation) { evacuation_ = evacuation; }
651 651
652 bool evacuation() const { return evacuation_; } 652 bool evacuation() const { return evacuation_; }
653 653
654 // Mark the global table which maps weak objects to dependent code without 654 // Mark the global table which maps weak objects to dependent code without
655 // marking its contents. 655 // marking its contents.
656 void MarkWeakObjectToCodeTable(); 656 void MarkWeakObjectToCodeTable(ObjectVisitor* visitor);
657 657
658 // Special case for processing weak references in a full collection. We need 658 // Special case for processing weak references in a full collection. We need
659 // to artificially keep AllocationSites alive for a time. 659 // to artificially keep AllocationSites alive for a time.
660 void MarkAllocationSite(AllocationSite* site); 660 void MarkAllocationSite(AllocationSite* site);
661 661
662 MarkingDeque* marking_deque() { return &marking_deque_; } 662 MarkingDeque* marking_deque() { return &marking_deque_; }
663 663
664 void EnsureMarkingDequeIsCommittedAndInitialize(); 664 void EnsureMarkingDequeIsCommittedAndInitialize();
665 665
666 void InitializeMarkingDeque(); 666 void InitializeMarkingDeque();
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 // Map transitions from a live map to a dead map must be killed. 803 // Map transitions from a live map to a dead map must be killed.
804 // We replace them with a null descriptor, with the same key. 804 // We replace them with a null descriptor, with the same key.
805 void ClearNonLiveReferences(); 805 void ClearNonLiveReferences();
806 void ClearNonLivePrototypeTransitions(Map* map); 806 void ClearNonLivePrototypeTransitions(Map* map);
807 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); 807 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark);
808 void ClearMapTransitions(Map* map); 808 void ClearMapTransitions(Map* map);
809 bool ClearMapBackPointer(Map* map); 809 bool ClearMapBackPointer(Map* map);
810 void TrimDescriptorArray(Map* map, DescriptorArray* descriptors, 810 void TrimDescriptorArray(Map* map, DescriptorArray* descriptors,
811 int number_of_own_descriptors); 811 int number_of_own_descriptors);
812 void TrimEnumCache(Map* map, DescriptorArray* descriptors); 812 void TrimEnumCache(Map* map, DescriptorArray* descriptors);
813 813
Hannes Payer (out of office) 2015/01/29 21:28:36 Please remove the definitions below.
814 void ClearDependentCode(DependentCode* dependent_code); 814 void ClearDependentCode(DependentCode* dependent_code);
815 void ClearNonLiveDependentCode(DependentCode* dependent_code); 815 void ClearNonLiveDependentCode(DependentCode* dependent_code);
816 int ClearNonLiveDependentCodeInGroup(DependentCode* dependent_code, int group, 816 int ClearNonLiveDependentCodeInGroup(DependentCode* dependent_code, int group,
817 int start, int end, int new_start); 817 int start, int end, int new_start);
818 818
819 // Mark all values associated with reachable keys in weak collections 819 // Mark all values associated with reachable keys in weak collections
820 // encountered so far. This might push new object or even new weak maps onto 820 // encountered so far. This might push new object or even new weak maps onto
821 // the marking stack. 821 // the marking stack.
822 void ProcessWeakCollections(); 822 void ProcessWeakCollections();
823 823
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 private: 956 private:
957 MarkCompactCollector* collector_; 957 MarkCompactCollector* collector_;
958 }; 958 };
959 959
960 960
961 const char* AllocationSpaceName(AllocationSpace space); 961 const char* AllocationSpaceName(AllocationSpace space);
962 } 962 }
963 } // namespace v8::internal 963 } // namespace v8::internal
964 964
965 #endif // V8_HEAP_MARK_COMPACT_H_ 965 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698