Remove IdxSet::reset_to_empty

This commit is contained in:
varkor 2018-03-06 00:58:01 +00:00
parent c9334404f0
commit 6701d9020f
2 changed files with 4 additions and 9 deletions

View file

@ -231,11 +231,6 @@ impl<T: Idx> IdxSet<T> {
each_bit(self, max_bits, f)
}
/// Removes all elements from this set.
pub fn reset_to_empty(&mut self) {
for word in self.words_mut() { *word = 0; }
}
pub fn elems(&self, universe_size: usize) -> Elems<T> {
Elems { i: 0, set: self, universe_size: universe_size }
}

View file

@ -147,8 +147,8 @@ impl<BD> FlowsAtLocation for FlowAtLocation<BD>
}
fn reconstruct_statement_effect(&mut self, loc: Location) {
self.stmt_gen.reset_to_empty();
self.stmt_kill.reset_to_empty();
self.stmt_gen.clear();
self.stmt_kill.clear();
{
let mut sets = BlockSets {
on_entry: &mut self.curr_state,
@ -172,8 +172,8 @@ impl<BD> FlowsAtLocation for FlowAtLocation<BD>
}
fn reconstruct_terminator_effect(&mut self, loc: Location) {
self.stmt_gen.reset_to_empty();
self.stmt_kill.reset_to_empty();
self.stmt_gen.clear();
self.stmt_kill.clear();
{
let mut sets = BlockSets {
on_entry: &mut self.curr_state,