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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 MarkGrey(MarkBit markbit)) { markbit.Set(); } |
| 307 |
| 308 INLINE(static void MarkBlack(MarkBit markbit)) { |
| 309 markbit.Set(); |
| 310 markbit.Next().Set(); |
| 311 } |
| 312 |
306 INLINE(static void BlackToGrey(MarkBit markbit)) { | 313 INLINE(static void BlackToGrey(MarkBit markbit)) { |
307 DCHECK(IsBlack(markbit)); | 314 DCHECK(IsBlack(markbit)); |
308 markbit.Next().Clear(); | 315 markbit.Next().Clear(); |
309 } | 316 } |
310 | 317 |
311 INLINE(static void WhiteToGrey(MarkBit markbit)) { | 318 INLINE(static void WhiteToGrey(MarkBit markbit)) { |
312 DCHECK(IsWhite(markbit)); | 319 DCHECK(IsWhite(markbit)); |
313 markbit.Set(); | 320 markbit.Set(); |
314 } | 321 } |
315 | 322 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 361 } |
355 | 362 |
356 private: | 363 private: |
357 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking); | 364 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking); |
358 }; | 365 }; |
359 | 366 |
360 } // namespace internal | 367 } // namespace internal |
361 } // namespace v8 | 368 } // namespace v8 |
362 | 369 |
363 #endif // V8_MARKING_H_ | 370 #endif // V8_MARKING_H_ |
OLD | NEW |