OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |