Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: src/data-flow.cc

Issue 502803002: Rename CountSetBits32 to CountPopulation32 for consistency. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/frames.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/data-flow.h" 5 #include "src/data-flow.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/scopes.h" 8 #include "src/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 27 matching lines...) Expand all
38 val = SkipZeroBytes(val); 38 val = SkipZeroBytes(val);
39 val = SkipZeroBits(val); 39 val = SkipZeroBits(val);
40 current_value_ = val >> 1; 40 current_value_ = val >> 1;
41 } 41 }
42 42
43 43
44 int BitVector::Count() const { 44 int BitVector::Count() const {
45 int count = 0; 45 int count = 0;
46 for (int i = 0; i < data_length_; i++) { 46 for (int i = 0; i < data_length_; i++) {
47 int data = data_[i]; 47 int data = data_[i];
48 if (data != 0) count += base::bits::CountSetBits32(data); 48 if (data != 0) count += base::bits::CountPopulation32(data);
49 } 49 }
50 return count; 50 return count;
51 } 51 }
52 52
53 } // namespace internal 53 } // namespace internal
54 } // namespace v8 54 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698