OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 #include "src/bit-vector.h" | 5 #include "src/bit-vector.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/utils.h" |
8 | 9 |
9 namespace v8 { | 10 namespace v8 { |
10 namespace internal { | 11 namespace internal { |
11 | 12 |
12 #ifdef DEBUG | 13 #ifdef DEBUG |
13 void BitVector::Print() { | 14 void BitVector::Print() { |
14 bool first = true; | 15 bool first = true; |
15 PrintF("{"); | 16 PrintF("{"); |
16 for (int i = 0; i < length(); i++) { | 17 for (int i = 0; i < length(); i++) { |
17 if (Contains(i)) { | 18 if (Contains(i)) { |
(...skipping 30 matching lines...) Expand all Loading... |
48 count += base::bits::CountPopulation64(data); | 49 count += base::bits::CountPopulation64(data); |
49 } else { | 50 } else { |
50 count += base::bits::CountPopulation32(static_cast<uint32_t>(data)); | 51 count += base::bits::CountPopulation32(static_cast<uint32_t>(data)); |
51 } | 52 } |
52 } | 53 } |
53 return count; | 54 return count; |
54 } | 55 } |
55 | 56 |
56 } // namespace internal | 57 } // namespace internal |
57 } // namespace v8 | 58 } // namespace v8 |
OLD | NEW |