Skip to content

Commit

Permalink
Renamed non_unique to alias, which is the terminology Rust uses f…
Browse files Browse the repository at this point in the history
…or this more often and is more succinct.
  • Loading branch information
kkysen committed Aug 10, 2022
1 parent 3a86483 commit a3aba65
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pdg/src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct NodeInfo {
flows_to_load: Option<NodeId>,
flows_to_pos_offset: Option<NodeId>,
flows_to_neg_offset: Option<NodeId>,
non_unique: Option<NodeId>,
aliases: Option<NodeId>,
}

impl Display for NodeInfo {
Expand All @@ -28,7 +28,7 @@ impl Display for NodeInfo {
("load", self.flows_to_load),
("+offset", self.flows_to_neg_offset),
("-offset", self.flows_to_neg_offset),
("non unique by", self.non_unique),
("alias", self.aliases),
].into_iter()
.filter_map(|(name,node)| Some((name,node?)))
.format_with(", ", |(name, node), f| f(&format_args!("{name} {node}")));
Expand Down Expand Up @@ -172,7 +172,7 @@ pub fn augment_with_info(pdg: &mut Graphs) {
let mut idx_flow_to_load = HashMap::new();
let mut idx_flow_to_pos_offset = HashMap::new();
let mut idx_flow_to_neg_offset = HashMap::new();
let mut idx_non_unique = HashMap::new();
let mut idx_aliases = HashMap::new();
for (idx, _) in g.nodes.iter_enumerated() {
if let Some(descmutidx) = check_flows_to_node_kind(g, &idx, node_does_mutation) {
idx_flow_to_store.insert(idx, descmutidx);
Expand All @@ -187,7 +187,7 @@ pub fn augment_with_info(pdg: &mut Graphs) {
idx_flow_to_neg_offset.insert(idx, descnegoidx);
}
if let Some(non_unique_idx) = check_whether_rules_obeyed(g, &idx) {
idx_non_unique.insert(idx, non_unique_idx);
idx_aliases.insert(idx, non_unique_idx);
}
}
for (idx, node) in g.nodes.iter_enumerated_mut() {
Expand All @@ -196,7 +196,7 @@ pub fn augment_with_info(pdg: &mut Graphs) {
flows_to_load: idx_flow_to_load.remove(&idx),
flows_to_pos_offset: idx_flow_to_pos_offset.remove(&idx),
flows_to_neg_offset: idx_flow_to_pos_offset.remove(&idx),
non_unique: idx_non_unique.remove(&idx),
aliases: idx_aliases.remove(&idx),
})
}
}
Expand Down

0 comments on commit a3aba65

Please sign in to comment.