Skip to content

Commit

Permalink
Remove IdxSet::reset_to_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Mar 6, 2018
1 parent c933440 commit 6701d90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions src/librustc_data_structures/indexed_set.rs
Expand Up @@ -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 }
}
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_mir/dataflow/at_location.rs
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 6701d90

Please sign in to comment.