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

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

Issue 2735713002: [heap] Remove ObjectMarking::ClearMarkBit. (Closed)
Patch Set: merge Created 3 years, 9 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 | « no previous file | src/heap/spaces.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 <deque> 8 #include <deque>
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 V8_INLINE static bool IsGrey(HeapObject* obj) { 66 V8_INLINE static bool IsGrey(HeapObject* obj) {
67 return Marking::IsGrey(MarkBitFrom<mode>(obj)); 67 return Marking::IsGrey(MarkBitFrom<mode>(obj));
68 } 68 }
69 69
70 template <MarkingMode mode = MarkingMode::FULL> 70 template <MarkingMode mode = MarkingMode::FULL>
71 V8_INLINE static bool IsBlackOrGrey(HeapObject* obj) { 71 V8_INLINE static bool IsBlackOrGrey(HeapObject* obj) {
72 return Marking::IsBlackOrGrey(MarkBitFrom<mode>(obj)); 72 return Marking::IsBlackOrGrey(MarkBitFrom<mode>(obj));
73 } 73 }
74 74
75 template <MarkingMode mode = MarkingMode::FULL> 75 template <MarkingMode mode = MarkingMode::FULL>
76 V8_INLINE static void ClearMarkBit(HeapObject* obj) {
77 Marking::MarkWhite(MarkBitFrom<mode>(obj));
78 }
79
80 template <MarkingMode mode = MarkingMode::FULL>
81 V8_INLINE static void BlackToGrey(HeapObject* obj) { 76 V8_INLINE static void BlackToGrey(HeapObject* obj) {
82 DCHECK(IsBlack<mode>(obj)); 77 DCHECK(IsBlack<mode>(obj));
83 MarkBit markbit = MarkBitFrom<mode>(obj); 78 MarkBit markbit = MarkBitFrom<mode>(obj);
84 Marking::BlackToGrey(markbit); 79 Marking::BlackToGrey(markbit);
85 MemoryChunk::IncrementLiveBytes<mode>(obj, -obj->Size()); 80 MemoryChunk::IncrementLiveBytes<mode>(obj, -obj->Size());
86 } 81 }
87 82
88 template <MarkingMode mode = MarkingMode::FULL> 83 template <MarkingMode mode = MarkingMode::FULL>
89 V8_INLINE static void WhiteToGrey(HeapObject* obj) { 84 V8_INLINE static void WhiteToGrey(HeapObject* obj) {
90 DCHECK(IsWhite<mode>(obj)); 85 DCHECK(IsWhite<mode>(obj));
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 830
836 private: 831 private:
837 MarkCompactCollector* collector_; 832 MarkCompactCollector* collector_;
838 }; 833 };
839 834
840 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); 835 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space);
841 } // namespace internal 836 } // namespace internal
842 } // namespace v8 837 } // namespace v8
843 838
844 #endif // V8_HEAP_MARK_COMPACT_H_ 839 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698