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

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

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" 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 | Annotate | Revision Log
« no previous file with comments | « src/contexts.cc ('k') | src/deoptimizer.h » ('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 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/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return true; 157 return true;
158 } 158 }
159 159
160 bool Equals(const BitVector& other) { 160 bool Equals(const BitVector& other) {
161 for (int i = 0; i < data_length_; i++) { 161 for (int i = 0; i < data_length_; i++) {
162 if (data_[i] != other.data_[i]) return false; 162 if (data_[i] != other.data_[i]) return false;
163 } 163 }
164 return true; 164 return true;
165 } 165 }
166 166
167 int Count() const {
168 int count = 0;
169 for (int i = 0; i < data_length_; i++) {
170 int data = data_[i];
171 if (data != 0) count += CompilerIntrinsics::CountSetBits(data);
172 }
173 return count;
174 }
175
167 int length() const { return length_; } 176 int length() const { return length_; }
168 177
169 #ifdef DEBUG 178 #ifdef DEBUG
170 void Print(); 179 void Print();
171 #endif 180 #endif
172 181
173 private: 182 private:
174 int length_; 183 int length_;
175 int data_length_; 184 int data_length_;
176 uint32_t* data_; 185 uint32_t* data_;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 239 }
231 240
232 BitVector* bits_; 241 BitVector* bits_;
233 }; 242 };
234 243
235 244
236 } } // namespace v8::internal 245 } } // namespace v8::internal
237 246
238 247
239 #endif // V8_DATAFLOW_H_ 248 #endif // V8_DATAFLOW_H_
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698