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 25 matching lines...) Expand all Loading... |
36 } | 36 } |
37 | 37 |
38 inline void Set() { *cell_ |= mask_; } | 38 inline void Set() { *cell_ |= mask_; } |
39 inline bool Get() { return (*cell_ & mask_) != 0; } | 39 inline bool Get() { return (*cell_ & mask_) != 0; } |
40 inline void Clear() { *cell_ &= ~mask_; } | 40 inline void Clear() { *cell_ &= ~mask_; } |
41 | 41 |
42 CellType* cell_; | 42 CellType* cell_; |
43 CellType mask_; | 43 CellType mask_; |
44 | 44 |
45 friend class IncrementalMarking; | 45 friend class IncrementalMarking; |
| 46 friend class ConcurrentMarkingMarkbits; |
46 friend class Marking; | 47 friend class Marking; |
47 }; | 48 }; |
48 | 49 |
49 // Bitmap is a sequence of cells each containing fixed number of bits. | 50 // Bitmap is a sequence of cells each containing fixed number of bits. |
50 class Bitmap { | 51 class Bitmap { |
51 public: | 52 public: |
52 static const uint32_t kBitsPerCell = 32; | 53 static const uint32_t kBitsPerCell = 32; |
53 static const uint32_t kBitsPerCellLog2 = 5; | 54 static const uint32_t kBitsPerCellLog2 = 5; |
54 static const uint32_t kBitIndexMask = kBitsPerCell - 1; | 55 static const uint32_t kBitIndexMask = kBitsPerCell - 1; |
55 static const uint32_t kBytesPerCell = kBitsPerCell / kBitsPerByte; | 56 static const uint32_t kBytesPerCell = kBitsPerCell / kBitsPerByte; |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 355 } |
355 | 356 |
356 private: | 357 private: |
357 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking); | 358 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking); |
358 }; | 359 }; |
359 | 360 |
360 } // namespace internal | 361 } // namespace internal |
361 } // namespace v8 | 362 } // namespace v8 |
362 | 363 |
363 #endif // V8_MARKING_H_ | 364 #endif // V8_MARKING_H_ |
OLD | NEW |