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

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: 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/flow_graph_builder.h » ('j') | vm/flow_graph_builder.cc » ('J')
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 / sizeof(uword)];
+ return (block & (1U << (i % sizeof(uword)))) != 0;
srdjan 2012/06/12 17:34:37 Please add a test
Florian Schneider 2012/06/13 10:53:40 Done. Good point. I fixed a bug here as well.
+ }
+
void Clear() {
for (intptr_t i = 0; i < data_length_; i++) {
data_[i] = 0;
« no previous file with comments | « no previous file | vm/flow_graph_builder.h » ('j') | vm/flow_graph_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698