borrowck::mir
: alpha-renamed DropFlagState variant names.
This commit is contained in:
parent
9fcbe2a2f9
commit
011c37d59e
@ -827,11 +827,11 @@ fn update_bits(sets: &mut BlockSets, path: MovePathIndex,
|
||||
state: super::DropFlagState)
|
||||
{
|
||||
match state {
|
||||
DropFlagState::Dead => {
|
||||
DropFlagState::Absent => {
|
||||
sets.gen_set.clear_bit(path.idx());
|
||||
sets.kill_set.set_bit(path.idx());
|
||||
}
|
||||
DropFlagState::Live => {
|
||||
DropFlagState::Present => {
|
||||
sets.gen_set.set_bit(path.idx());
|
||||
sets.kill_set.clear_bit(path.idx());
|
||||
}
|
||||
@ -844,11 +844,11 @@ fn update_bits(sets: &mut BlockSets, path: MovePathIndex,
|
||||
state: super::DropFlagState)
|
||||
{
|
||||
match state {
|
||||
DropFlagState::Dead => {
|
||||
DropFlagState::Absent => {
|
||||
sets.gen_set.set_bit(path.idx());
|
||||
sets.kill_set.clear_bit(path.idx());
|
||||
}
|
||||
DropFlagState::Live => {
|
||||
DropFlagState::Present => {
|
||||
sets.gen_set.clear_bit(path.idx());
|
||||
sets.kill_set.set_bit(path.idx());
|
||||
}
|
||||
@ -861,11 +861,11 @@ fn update_bits(sets: &mut BlockSets, path: MovePathIndex,
|
||||
state: super::DropFlagState)
|
||||
{
|
||||
match state {
|
||||
DropFlagState::Dead => {
|
||||
DropFlagState::Absent => {
|
||||
sets.gen_set.clear_bit(path.idx());
|
||||
sets.kill_set.set_bit(path.idx());
|
||||
}
|
||||
DropFlagState::Live => {
|
||||
DropFlagState::Present => {
|
||||
sets.gen_set.set_bit(path.idx());
|
||||
sets.kill_set.clear_bit(path.idx());
|
||||
}
|
||||
@ -889,7 +889,7 @@ fn start_block_effect(&self, ctxt: &Self::Ctxt, sets: &mut BlockSets)
|
||||
super::drop_flag_effects_for_function_entry(
|
||||
ctxt.0, ctxt.1, &ctxt.2,
|
||||
|path, s| {
|
||||
assert!(s == DropFlagState::Live);
|
||||
assert!(s == DropFlagState::Present);
|
||||
sets.on_entry.set_bit(path.idx());
|
||||
});
|
||||
}
|
||||
@ -956,7 +956,7 @@ fn start_block_effect(&self, ctxt: &Self::Ctxt, sets: &mut BlockSets) {
|
||||
super::drop_flag_effects_for_function_entry(
|
||||
ctxt.0, ctxt.1, &ctxt.2,
|
||||
|path, s| {
|
||||
assert!(s == DropFlagState::Live);
|
||||
assert!(s == DropFlagState::Present);
|
||||
sets.on_entry.clear_bit(path.idx());
|
||||
});
|
||||
}
|
||||
@ -1022,7 +1022,7 @@ fn start_block_effect(&self, ctxt: &Self::Ctxt, sets: &mut BlockSets) {
|
||||
super::drop_flag_effects_for_function_entry(
|
||||
ctxt.0, ctxt.1, &ctxt.2,
|
||||
|path, s| {
|
||||
assert!(s == DropFlagState::Live);
|
||||
assert!(s == DropFlagState::Present);
|
||||
sets.on_entry.set_bit(path.idx());
|
||||
});
|
||||
}
|
||||
|
@ -195,8 +195,8 @@ fn process_terminator(&mut self, bb: BasicBlock, term: &Option<Terminator<'tcx>>
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||
enum DropFlagState {
|
||||
Live,
|
||||
Dead
|
||||
Present, // i.e. initialized
|
||||
Absent, // i.e. deinitialized or "moved"
|
||||
}
|
||||
|
||||
fn on_all_children_bits<'a, 'tcx, F>(
|
||||
@ -266,7 +266,7 @@ fn drop_flag_effects_for_function_entry<'a, 'tcx, F>(
|
||||
let move_path_index = move_data.rev_lookup.find(&lvalue);
|
||||
on_all_children_bits(tcx, mir, move_data,
|
||||
move_path_index,
|
||||
|moi| callback(moi, DropFlagState::Live));
|
||||
|moi| callback(moi, DropFlagState::Present));
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ fn drop_flag_effects_for_location<'a, 'tcx, F>(
|
||||
|
||||
on_all_children_bits(tcx, mir, move_data,
|
||||
path,
|
||||
|moi| callback(moi, DropFlagState::Dead))
|
||||
|moi| callback(moi, DropFlagState::Absent))
|
||||
}
|
||||
|
||||
let bb = mir.basic_block_data(loc.block);
|
||||
@ -306,7 +306,7 @@ fn drop_flag_effects_for_location<'a, 'tcx, F>(
|
||||
debug!("drop_flag_effects: assignment {:?}", stmt);
|
||||
on_all_children_bits(tcx, mir, move_data,
|
||||
move_data.rev_lookup.find(lvalue),
|
||||
|moi| callback(moi, DropFlagState::Live))
|
||||
|moi| callback(moi, DropFlagState::Present))
|
||||
}
|
||||
},
|
||||
None => {
|
||||
|
Loading…
Reference in New Issue
Block a user