Added liveness analysis for protocols, and removed warnings about empty states.

This commit is contained in:
Eric Holk 2012-07-17 17:03:27 -07:00
parent c858eb0654
commit 7b8171ef2d
10 changed files with 130 additions and 19 deletions

View file

@ -253,6 +253,14 @@ impl methods for bitv {
fn each(f: fn(bool) -> bool) { each(self, f) }
fn each_storage(f: fn(&uint) -> bool) { each_storage(self, f) }
fn eq_vec(v: ~[uint]) -> bool { eq_vec(self, v) }
fn ones(f: fn(uint) -> bool) {
for uint::range(0, self.nbits) |i| {
if self.get(i) {
if !f(i) { break }
}
}
}
}
impl of to_str::to_str for bitv {