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

Side by Side Diff: src/heap/marking.h

Issue 2720133005: [heap] Remove Marking::MarkBlack and some minor cleanups. (Closed)
Patch Set: fix failures 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 | « src/heap/mark-compact.cc ('k') | 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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_MARKING_H 5 #ifndef V8_MARKING_H
6 #define V8_MARKING_H 6 #define V8_MARKING_H
7 7
8 #include "src/utils.h" 8 #include "src/utils.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // Grey markbits: 10 291 // Grey markbits: 10
292 static const char* kGreyBitPattern; 292 static const char* kGreyBitPattern;
293 INLINE(static bool IsGrey(MarkBit mark_bit)) { 293 INLINE(static bool IsGrey(MarkBit mark_bit)) {
294 return mark_bit.Get() && !mark_bit.Next().Get(); 294 return mark_bit.Get() && !mark_bit.Next().Get();
295 } 295 }
296 296
297 // IsBlackOrGrey assumes that the first bit is set for black or grey 297 // IsBlackOrGrey assumes that the first bit is set for black or grey
298 // objects. 298 // objects.
299 INLINE(static bool IsBlackOrGrey(MarkBit mark_bit)) { return mark_bit.Get(); } 299 INLINE(static bool IsBlackOrGrey(MarkBit mark_bit)) { return mark_bit.Get(); }
300 300
301 INLINE(static void MarkBlack(MarkBit mark_bit)) { 301 INLINE(static void MarkWhite(MarkBit markbit)) {
302 mark_bit.Set(); 302 markbit.Clear();
303 mark_bit.Next().Set(); 303 markbit.Next().Clear();
304 }
305
306 INLINE(static void MarkWhite(MarkBit mark_bit)) {
307 mark_bit.Clear();
308 mark_bit.Next().Clear();
309 } 304 }
310 305
311 INLINE(static void BlackToWhite(MarkBit markbit)) { 306 INLINE(static void BlackToWhite(MarkBit markbit)) {
312 DCHECK(IsBlack(markbit)); 307 DCHECK(IsBlack(markbit));
313 markbit.Clear(); 308 markbit.Clear();
314 markbit.Next().Clear(); 309 markbit.Next().Clear();
315 } 310 }
316 311
317 INLINE(static void GreyToWhite(MarkBit markbit)) { 312 INLINE(static void GreyToWhite(MarkBit markbit)) {
318 DCHECK(IsGrey(markbit)); 313 DCHECK(IsGrey(markbit));
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 371 }
377 372
378 private: 373 private:
379 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking); 374 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking);
380 }; 375 };
381 376
382 } // namespace internal 377 } // namespace internal
383 } // namespace v8 378 } // namespace v8
384 379
385 #endif // V8_MARKING_H_ 380 #endif // V8_MARKING_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698