Index: src/data-flow.cc |
diff --git a/src/data-flow.cc b/src/data-flow.cc |
index bd92ea0531511b0b970a32e6fa4dddb73c42a085..d292a04a5da3466b2dcf9afc4121ce7e159edd8f 100644 |
--- a/src/data-flow.cc |
+++ b/src/data-flow.cc |
@@ -28,12 +28,12 @@ void BitVector::Print() { |
void BitVector::Iterator::Advance() { |
current_++; |
- uint32_t val = current_value_; |
+ uintptr_t val = current_value_; |
while (val == 0) { |
current_index_++; |
if (Done()) return; |
val = target_->data_[current_index_]; |
- current_ = current_index_ << 5; |
+ current_ = current_index_ << kDataBitShift; |
} |
val = SkipZeroBytes(val); |
val = SkipZeroBits(val); |
@@ -44,8 +44,14 @@ void BitVector::Iterator::Advance() { |
int BitVector::Count() const { |
int count = 0; |
for (int i = 0; i < data_length_; i++) { |
- int data = data_[i]; |
- if (data != 0) count += base::bits::CountPopulation32(data); |
+ uintptr_t data = data_[i]; |
+ if (data != 0) { |
+ if (sizeof(data) == 8) { |
+ count += base::bits::CountPopulation64(data); |
Sven Panne
2014/10/31 10:18:54
Not really related to your CL, but I think we shou
|
+ } else { |
+ count += base::bits::CountPopulation32(data); |
+ } |
+ } |
} |
return count; |
} |