#include <bit_vector.h>
Definition at line 18 of file bit_vector.h.
◆ Iterator()
dart::BitVector::Iterator::Iterator |
( |
BitVector * |
target | ) |
|
|
inlineexplicit |
Definition at line 20 of file bit_vector.h.
22 bit_index_(-1),
23 word_index_(0),
24 current_word_(
target->data_[0]) {
27 }
◆ ~Iterator()
dart::BitVector::Iterator::~Iterator |
( |
| ) |
|
|
inline |
◆ Advance()
void dart::BitVector::Iterator::Advance |
( |
| ) |
|
Definition at line 11 of file bit_vector.cc.
11 {
12 ++bit_index_;
13
14 if (current_word_ == 0) {
15 do {
16 ++word_index_;
18 current_word_ = target_->data_[word_index_];
19 } while (current_word_ == 0);
21 }
22
23 while ((current_word_ & 0xff) == 0) {
24 current_word_ >>= 8;
25 bit_index_ += 8;
26 }
27
28 while ((current_word_ & 0x1) == 0) {
29 current_word_ >>= 1;
30 ++bit_index_;
31 }
32 current_word_ = current_word_ >> 1;
33}
constexpr intptr_t kBitsPerWord
◆ Current()
intptr_t dart::BitVector::Iterator::Current |
( |
| ) |
const |
|
inline |
Definition at line 33 of file bit_vector.h.
33 {
35 return bit_index_;
36 }
◆ Done()
bool dart::BitVector::Iterator::Done |
( |
| ) |
const |
|
inline |
Definition at line 30 of file bit_vector.h.
30{ return word_index_ >= target_->data_length_; }
◆ BitVector
The documentation for this class was generated from the following files: