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

Unified Diff: runtime/vm/bit_vector.h

Issue 10914314: Simple redundant load elimination. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | runtime/vm/bit_vector.cc » ('j') | runtime/vm/bit_vector.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bit_vector.h
===================================================================
--- runtime/vm/bit_vector.h (revision 12420)
+++ runtime/vm/bit_vector.h (working copy)
@@ -66,6 +66,8 @@
data_[i / kBitsPerWord] &= ~(static_cast<uword>(1) << (i % kBitsPerWord));
}
+ bool Equals(const BitVector& other) const;
+
// Add all elements that are in the bitvector from.
bool AddAll(BitVector* from);
@@ -73,6 +75,8 @@
// bitvector kill.
bool KillAndAdd(BitVector* kill, BitVector* gen);
+ bool Intersect(const BitVector& other);
+
bool Contains(int i) const {
ASSERT(i >= 0 && i < length());
uword block = data_[i / kBitsPerWord];
@@ -85,8 +89,16 @@
}
}
+ void SetAll() {
Kevin Millikin (Google) 2012/09/17 12:09:47 There's a subtle interaction between Clear(), SetA
Florian Schneider 2012/09/17 14:20:59 Thanks. I opted for (2) and changed Equals accordi
+ for (intptr_t i = 0; i < data_length_; i++) {
+ data_[i] = static_cast<uword>(-1);
+ }
+ }
+
intptr_t length() const { return length_; }
+ void Print() const;
+
private:
intptr_t length_;
intptr_t data_length_;
« no previous file with comments | « no previous file | runtime/vm/bit_vector.cc » ('j') | runtime/vm/bit_vector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698