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

Unified Diff: runtime/vm/bit_vector.h

Issue 10657044: Fix a bug in liveness analysis code and add more comments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | runtime/vm/bit_vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bit_vector.h
diff --git a/runtime/vm/bit_vector.h b/runtime/vm/bit_vector.h
index cf692df85487f159ad1e48dca67d2f29d8775c80..81660b9246ee02ad285a6dc450f6b8f11196a7fa 100644
--- a/runtime/vm/bit_vector.h
+++ b/runtime/vm/bit_vector.h
@@ -64,32 +64,11 @@ class BitVector: public ZoneAllocated {
}
// Add all elements that are in the bitvector from.
- bool AddAll(BitVector* from) {
- ASSERT(data_length_ == from->data_length_);
- bool changed = false;
- for (intptr_t i = 0; i < data_length_; i++) {
- const uword before = data_[i];
- const uword after = data_[i] | from->data_[i];
- if (before != after) changed = true;
- data_[i] = after;
- }
- return changed;
- }
+ bool AddAll(BitVector* from);
// From the bitvector gen add those elements that are not in the
// bitvector kill.
- bool KillAndAdd(BitVector* kill, BitVector* gen) {
- ASSERT(data_length_ == kill->data_length_);
- ASSERT(data_length_ == gen->data_length_);
- bool changed = false;
- for (intptr_t i = 0; i < data_length_; i++) {
- const uword before = data_[i];
- const uword after = data_[i] | (gen->data_[i] & ~kill->data_[i]);
- if (before != after) changed = true;
- data_[i] = after;
- }
- return changed;
- }
+ bool KillAndAdd(BitVector* kill, BitVector* gen);
bool Contains(int i) const {
ASSERT(i >= 0 && i < length());
« no previous file with comments | « no previous file | runtime/vm/bit_vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698