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

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

Issue 1488393003: Reland of [heap] Cleanup mark bit usage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 INLINE(static void MarkWhite(MarkBit mark_bit)) { 76 INLINE(static void MarkWhite(MarkBit mark_bit)) {
77 mark_bit.Clear(); 77 mark_bit.Clear();
78 mark_bit.Next().Clear(); 78 mark_bit.Next().Clear();
79 } 79 }
80 80
81 INLINE(static void BlackToWhite(MarkBit markbit)) { 81 INLINE(static void BlackToWhite(MarkBit markbit)) {
82 DCHECK(IsBlack(markbit)); 82 DCHECK(IsBlack(markbit));
83 markbit.Clear(); 83 markbit.Clear();
84 } 84 }
85 85
86 INLINE(static void GreyToWhite(MarkBit markbit)) {
87 DCHECK(IsGrey(markbit));
88 markbit.Clear();
89 markbit.Next().Clear();
90 }
91
92 INLINE(static void BlackToGrey(MarkBit markbit)) { 86 INLINE(static void BlackToGrey(MarkBit markbit)) {
93 DCHECK(IsBlack(markbit)); 87 DCHECK(IsBlack(markbit));
94 markbit.Next().Set(); 88 markbit.Next().Set();
95 } 89 }
96 90
97 INLINE(static void WhiteToGrey(MarkBit markbit)) { 91 INLINE(static void WhiteToGrey(MarkBit markbit)) {
98 DCHECK(IsWhite(markbit)); 92 DCHECK(IsWhite(markbit));
99 markbit.Set(); 93 markbit.Set();
100 markbit.Next().Set(); 94 markbit.Next().Set();
101 } 95 }
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 private: 863 private:
870 MarkCompactCollector* collector_; 864 MarkCompactCollector* collector_;
871 }; 865 };
872 866
873 867
874 const char* AllocationSpaceName(AllocationSpace space); 868 const char* AllocationSpaceName(AllocationSpace space);
875 } // namespace internal 869 } // namespace internal
876 } // namespace v8 870 } // namespace v8
877 871
878 #endif // V8_HEAP_MARK_COMPACT_H_ 872 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698