| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_DATAFLOW_H_ | 5 #ifndef V8_DATAFLOW_H_ |
| 6 #define V8_DATAFLOW_H_ | 6 #define V8_DATAFLOW_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/zone/zone.h" | 9 #include "src/zone/zone.h" |
| 10 | 10 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| 162 bool IsEmpty() const { | 162 bool IsEmpty() const { |
| 163 for (int i = 0; i < data_length_; i++) { | 163 for (int i = 0; i < data_length_; i++) { |
| 164 if (data_[i] != 0) return false; | 164 if (data_[i] != 0) return false; |
| 165 } | 165 } |
| 166 return true; | 166 return true; |
| 167 } | 167 } |
| 168 | 168 |
| 169 bool Equals(const BitVector& other) { | 169 bool Equals(const BitVector& other) const { |
| 170 for (int i = 0; i < data_length_; i++) { | 170 for (int i = 0; i < data_length_; i++) { |
| 171 if (data_[i] != other.data_[i]) return false; | 171 if (data_[i] != other.data_[i]) return false; |
| 172 } | 172 } |
| 173 return true; | 173 return true; |
| 174 } | 174 } |
| 175 | 175 |
| 176 int Count() const; | 176 int Count() const; |
| 177 | 177 |
| 178 int length() const { return length_; } | 178 int length() const { return length_; } |
| 179 | 179 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 bits_ = new_bits; | 245 bits_ = new_bits; |
| 246 } | 246 } |
| 247 | 247 |
| 248 BitVector* bits_; | 248 BitVector* bits_; |
| 249 }; | 249 }; |
| 250 | 250 |
| 251 } // namespace internal | 251 } // namespace internal |
| 252 } // namespace v8 | 252 } // namespace v8 |
| 253 | 253 |
| 254 #endif // V8_DATAFLOW_H_ | 254 #endif // V8_DATAFLOW_H_ |
| OLD | NEW |