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

Unified Diff: vm/bit_vector.h

Issue 10539108: First step to SSA construction: Phi insertion. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: addressed comments, fixed bug in BitVector::Contains Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | vm/bit_vector_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/bit_vector.h
===================================================================
--- vm/bit_vector.h (revision 8546)
+++ vm/bit_vector.h (working copy)
@@ -63,6 +63,12 @@
data_[i / kBitsPerWord] |= (static_cast<uword>(1) << (i % kBitsPerWord));
}
+ bool Contains(int i) const {
+ ASSERT(i >= 0 && i < length());
+ uword block = data_[i / kBitsPerWord];
+ return (block & (static_cast<uword>(1) << (i % kBitsPerWord))) != 0;
+ }
+
void Clear() {
for (intptr_t i = 0; i < data_length_; i++) {
data_[i] = 0;
« no previous file with comments | « no previous file | vm/bit_vector_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698