Chromium Code Reviews| Index: runtime/vm/bit_vector.h |
| =================================================================== |
| --- runtime/vm/bit_vector.h (revision 12420) |
| +++ runtime/vm/bit_vector.h (working copy) |
| @@ -66,6 +66,8 @@ |
| data_[i / kBitsPerWord] &= ~(static_cast<uword>(1) << (i % kBitsPerWord)); |
| } |
| + bool Equals(const BitVector& other) const; |
| + |
| // Add all elements that are in the bitvector from. |
| bool AddAll(BitVector* from); |
| @@ -73,6 +75,8 @@ |
| // bitvector kill. |
| bool KillAndAdd(BitVector* kill, BitVector* gen); |
| + bool Intersect(const BitVector& other); |
| + |
| bool Contains(int i) const { |
| ASSERT(i >= 0 && i < length()); |
| uword block = data_[i / kBitsPerWord]; |
| @@ -85,8 +89,16 @@ |
| } |
| } |
| + void SetAll() { |
|
Kevin Millikin (Google)
2012/09/17 12:09:47
There's a subtle interaction between Clear(), SetA
Florian Schneider
2012/09/17 14:20:59
Thanks. I opted for (2) and changed Equals accordi
|
| + for (intptr_t i = 0; i < data_length_; i++) { |
| + data_[i] = static_cast<uword>(-1); |
| + } |
| + } |
| + |
| intptr_t length() const { return length_; } |
| + void Print() const; |
| + |
| private: |
| intptr_t length_; |
| intptr_t data_length_; |