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

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

Issue 2737483002: [heap] Remove Marking::BlackToWhite and Marking::GreyToWhite. (Closed)
Patch Set: 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/incremental-marking.cc ('k') | test/unittests/heap/marking-unittest.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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 MarkWhite(MarkBit markbit)) { 301 INLINE(static void MarkWhite(MarkBit markbit)) {
302 markbit.Clear(); 302 markbit.Clear();
303 markbit.Next().Clear(); 303 markbit.Next().Clear();
304 } 304 }
305 305
306 INLINE(static void BlackToWhite(MarkBit markbit)) {
307 DCHECK(IsBlack(markbit));
308 markbit.Clear();
309 markbit.Next().Clear();
310 }
311
312 INLINE(static void GreyToWhite(MarkBit markbit)) {
313 DCHECK(IsGrey(markbit));
314 markbit.Clear();
315 }
316
317 INLINE(static void BlackToGrey(MarkBit markbit)) { 306 INLINE(static void BlackToGrey(MarkBit markbit)) {
318 DCHECK(IsBlack(markbit)); 307 DCHECK(IsBlack(markbit));
319 markbit.Next().Clear(); 308 markbit.Next().Clear();
320 } 309 }
321 310
322 INLINE(static void WhiteToGrey(MarkBit markbit)) { 311 INLINE(static void WhiteToGrey(MarkBit markbit)) {
323 DCHECK(IsWhite(markbit)); 312 DCHECK(IsWhite(markbit));
324 markbit.Set(); 313 markbit.Set();
325 } 314 }
326 315
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 354 }
366 355
367 private: 356 private:
368 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking); 357 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking);
369 }; 358 };
370 359
371 } // namespace internal 360 } // namespace internal
372 } // namespace v8 361 } // namespace v8
373 362
374 #endif // V8_MARKING_H_ 363 #endif // V8_MARKING_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | test/unittests/heap/marking-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698