| Index: runtime/vm/bit_vector.h
|
| ===================================================================
|
| --- runtime/vm/bit_vector.h (revision 12420)
|
| +++ runtime/vm/bit_vector.h (working copy)
|
| @@ -52,6 +52,11 @@
|
| Clear();
|
| }
|
|
|
| + void CopyFrom(const BitVector* other) {
|
| + Clear();
|
| + AddAll(other);
|
| + }
|
| +
|
| static intptr_t SizeFor(intptr_t length) {
|
| return 1 + ((length - 1) / kBitsPerWord);
|
| }
|
| @@ -66,13 +71,17 @@
|
| 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);
|
| + bool AddAll(const BitVector* from);
|
|
|
| // From the bitvector gen add those elements that are not in the
|
| // bitvector kill.
|
| bool KillAndAdd(BitVector* kill, BitVector* gen);
|
|
|
| + void Intersect(const BitVector& other);
|
| +
|
| bool Contains(int i) const {
|
| ASSERT(i >= 0 && i < length());
|
| uword block = data_[i / kBitsPerWord];
|
| @@ -85,8 +94,16 @@
|
| }
|
| }
|
|
|
| + void SetAll() {
|
| + 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_;
|
|
|