Chromium Code Reviews| Index: src/incremental-marking.h |
| =================================================================== |
| --- src/incremental-marking.h (revision 7619) |
| +++ src/incremental-marking.h (working copy) |
| @@ -129,24 +129,32 @@ |
| } |
| // Impossible markbits: 01 |
| + static const char* kImpossibleBitPattern; |
|
Vyacheslav Egorov (Chromium)
2011/04/16 17:50:36
Why have this strings? They are used only in asser
Erik Corry
2011/04/23 17:00:11
Yes they are for assertions because I suspect we m
|
| static inline bool IsImpossible(MarkBit mark_bit) { |
| + ASSERT(strcmp(kImpossibleBitPattern, "01") == 0); |
| return !mark_bit.Get() && mark_bit.Next().Get(); |
| } |
| // Black markbits: 10 - this is required by the sweeper. |
| + static const char* kBlackBitPattern; |
| static inline bool IsBlack(MarkBit mark_bit) { |
| + ASSERT(strcmp(kBlackBitPattern, "10") == 0); |
| ASSERT(!IsImpossible(mark_bit)); |
| return mark_bit.Get() && !mark_bit.Next().Get(); |
| } |
| // White markbits: 00 - this is required by the mark bit clearer. |
| + static const char* kWhiteBitPattern; |
| static inline bool IsWhite(MarkBit mark_bit) { |
| + ASSERT(strcmp(kWhiteBitPattern, "00") == 0); |
| ASSERT(!IsImpossible(mark_bit)); |
| return !mark_bit.Get(); |
| } |
| // Grey markbits: 11 |
| + static const char* kGreyBitPattern; |
| static inline bool IsGrey(MarkBit mark_bit) { |
| + ASSERT(strcmp(kGreyBitPattern, "11") == 0); |
| ASSERT(!IsImpossible(mark_bit)); |
| return mark_bit.Get() && mark_bit.Next().Get(); |
| } |