| Index: src/heap/spaces.h
|
| diff --git a/src/heap/spaces.h b/src/heap/spaces.h
|
| index 0272d59944149009fe3c01a6941052520772a1ec..140325941e093d632b4a211a98bda9ffe32e1d63 100644
|
| --- a/src/heap/spaces.h
|
| +++ b/src/heap/spaces.h
|
| @@ -105,21 +105,18 @@ class MarkBit {
|
| inline MarkBit(CellType* cell, CellType mask, bool data_only)
|
| : cell_(cell), mask_(mask), data_only_(data_only) {}
|
|
|
| - inline CellType* cell() { return cell_; }
|
| - inline CellType mask() { return mask_; }
|
| -
|
| #ifdef DEBUG
|
| bool operator==(const MarkBit& other) {
|
| return cell_ == other.cell_ && mask_ == other.mask_;
|
| }
|
| #endif
|
|
|
| - inline void Set() { *cell_ |= mask_; }
|
| - inline bool Get() { return (*cell_ & mask_) != 0; }
|
| - inline void Clear() { *cell_ &= ~mask_; }
|
| -
|
| inline bool data_only() { return data_only_; }
|
|
|
| + private:
|
| + inline CellType* cell() { return cell_; }
|
| + inline CellType mask() { return mask_; }
|
| +
|
| inline MarkBit Next() {
|
| CellType new_mask = mask_ << 1;
|
| if (new_mask == 0) {
|
| @@ -129,7 +126,10 @@ class MarkBit {
|
| }
|
| }
|
|
|
| - private:
|
| + inline void Set() { *cell_ |= mask_; }
|
| + inline bool Get() { return (*cell_ & mask_) != 0; }
|
| + inline void Clear() { *cell_ &= ~mask_; }
|
| +
|
| CellType* cell_;
|
| CellType mask_;
|
| // This boolean indicates that the object is in a data-only space with no
|
| @@ -137,6 +137,8 @@ class MarkBit {
|
| // It is expected that this field is inlined and turned into control flow
|
| // at the place where the MarkBit object is created.
|
| bool data_only_;
|
| +
|
| + friend class Marking;
|
| };
|
|
|
|
|
|
|