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

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

Issue 2728113002: [heap] Remove Marking::AnyToGrey and change its callers to use simple marking functions. (Closed)
Patch Set: fixed comment 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.h ('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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 DCHECK(IsWhite(markbit)); 329 DCHECK(IsWhite(markbit));
330 markbit.Set(); 330 markbit.Set();
331 markbit.Next().Set(); 331 markbit.Next().Set();
332 } 332 }
333 333
334 INLINE(static void GreyToBlack(MarkBit markbit)) { 334 INLINE(static void GreyToBlack(MarkBit markbit)) {
335 DCHECK(IsGrey(markbit)); 335 DCHECK(IsGrey(markbit));
336 markbit.Next().Set(); 336 markbit.Next().Set();
337 } 337 }
338 338
339 INLINE(static void AnyToGrey(MarkBit markbit)) {
340 markbit.Set();
341 markbit.Next().Clear();
342 }
343
344 enum ObjectColor { 339 enum ObjectColor {
345 BLACK_OBJECT, 340 BLACK_OBJECT,
346 WHITE_OBJECT, 341 WHITE_OBJECT,
347 GREY_OBJECT, 342 GREY_OBJECT,
348 IMPOSSIBLE_COLOR 343 IMPOSSIBLE_COLOR
349 }; 344 };
350 345
351 static const char* ColorName(ObjectColor color) { 346 static const char* ColorName(ObjectColor color) {
352 switch (color) { 347 switch (color) {
353 case BLACK_OBJECT: 348 case BLACK_OBJECT:
(...skipping 17 matching lines...) Expand all
371 } 366 }
372 367
373 private: 368 private:
374 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking); 369 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking);
375 }; 370 };
376 371
377 } // namespace internal 372 } // namespace internal
378 } // namespace v8 373 } // namespace v8
379 374
380 #endif // V8_MARKING_H_ 375 #endif // V8_MARKING_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.h ('k') | test/unittests/heap/marking-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698