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

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

Issue 1535933002: Revert of [heap] delete Heap::LeftTrimFixedAray (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Bring back GreyToWhite 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 | « src/heap/heap.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 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
86 INLINE(static void BlackToGrey(MarkBit markbit)) { 92 INLINE(static void BlackToGrey(MarkBit markbit)) {
87 DCHECK(IsBlack(markbit)); 93 DCHECK(IsBlack(markbit));
88 markbit.Next().Set(); 94 markbit.Next().Set();
89 } 95 }
90 96
91 INLINE(static void WhiteToGrey(MarkBit markbit)) { 97 INLINE(static void WhiteToGrey(MarkBit markbit)) {
92 DCHECK(IsWhite(markbit)); 98 DCHECK(IsWhite(markbit));
93 markbit.Set(); 99 markbit.Set();
94 markbit.Next().Set(); 100 markbit.Next().Set();
95 } 101 }
(...skipping 10 matching lines...) Expand all
106 112
107 INLINE(static void BlackToGrey(HeapObject* obj)) { 113 INLINE(static void BlackToGrey(HeapObject* obj)) {
108 BlackToGrey(MarkBitFrom(obj)); 114 BlackToGrey(MarkBitFrom(obj));
109 } 115 }
110 116
111 INLINE(static void AnyToGrey(MarkBit markbit)) { 117 INLINE(static void AnyToGrey(MarkBit markbit)) {
112 markbit.Set(); 118 markbit.Set();
113 markbit.Next().Set(); 119 markbit.Next().Set();
114 } 120 }
115 121
122 static void TransferMark(Heap* heap, Address old_start, Address new_start);
123
116 #ifdef DEBUG 124 #ifdef DEBUG
117 enum ObjectColor { 125 enum ObjectColor {
118 BLACK_OBJECT, 126 BLACK_OBJECT,
119 WHITE_OBJECT, 127 WHITE_OBJECT,
120 GREY_OBJECT, 128 GREY_OBJECT,
121 IMPOSSIBLE_COLOR 129 IMPOSSIBLE_COLOR
122 }; 130 };
123 131
124 static const char* ColorName(ObjectColor color) { 132 static const char* ColorName(ObjectColor color) {
125 switch (color) { 133 switch (color) {
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 private: 866 private:
859 MarkCompactCollector* collector_; 867 MarkCompactCollector* collector_;
860 }; 868 };
861 869
862 870
863 const char* AllocationSpaceName(AllocationSpace space); 871 const char* AllocationSpaceName(AllocationSpace space);
864 } // namespace internal 872 } // namespace internal
865 } // namespace v8 873 } // namespace v8
866 874
867 #endif // V8_HEAP_MARK_COMPACT_H_ 875 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698