14 std::numeric_limits<MarkBit::CellType>::max();
19 if (start_index >= end_index)
return false;
28 if (start_cell_index != end_cell_index) {
29 matching_mask = ~(start_index_mask - 1);
30 if ((
cells()[start_cell_index] & matching_mask) != matching_mask) {
33 for (
unsigned int i = start_cell_index + 1;
i < end_cell_index;
i++) {
34 if (
cells()[
i] != kAllBitsSetInCellValue)
return false;
36 matching_mask = end_index_mask | (end_index_mask - 1);
37 return ((
cells()[end_cell_index] & matching_mask) == matching_mask);
39 matching_mask = end_index_mask | (end_index_mask - start_index_mask);
40 return (
cells()[end_cell_index] & matching_mask) == matching_mask;
46 if (start_index >= end_index)
return true;
55 if (start_cell_index != end_cell_index) {
56 matching_mask = ~(start_index_mask - 1);
57 if ((
cells()[start_cell_index] & matching_mask))
return false;
58 for (
size_t i = start_cell_index + 1;
i < end_cell_index;
i++) {
59 if (
cells()[
i])
return false;
61 matching_mask = end_index_mask | (end_index_mask - 1);
62 return !(
cells()[end_cell_index] & matching_mask);
64 matching_mask = end_index_mask | (end_index_mask - start_index_mask);
65 return !(
cells()[end_cell_index] & matching_mask);
79class CellPrinter final {
81 CellPrinter() =
default;
84 if (cell == seq_type) {
104 if (seq_length > 0) {
105 PrintF(
"%zu: %dx%zu\n", seq_start, seq_type == 0 ? 0 : 1,
112 return cell == 0 || cell == kAllBitsSetInCellValue;
static V8_ALLOW_UNUSED MarkBit FromForTesting(Address)
static constexpr size_t kCellsCount
bool AllBitsSetInRange(MarkBitIndex start_index, MarkBitIndex end_index) const
static V8_INLINE MarkBit MarkBitFromAddress(Address address)
V8_INLINE CellType * cells()
static V8_INLINE constexpr CellIndex IndexToCell(MarkBitIndex index)
static constexpr uint32_t kBitsPerCell
bool AllBitsClearInRange(MarkBitIndex start_index, MarkBitIndex end_index) const
static V8_INLINE constexpr CellType IndexInCellMask(MarkBitIndex index)
V8_INLINE constexpr StorageType ptr() const
MarkBit::CellType seq_type
void PrintF(const char *format,...)
void Print(Tagged< Object > obj)