Change variable name to something more descriptive.

This commit is contained in:
Morgan Phillips
2016-07-25 01:05:15 -07:00
parent 91ced8df90
commit bb7ecc8753

View File

@@ -120,14 +120,14 @@ impl ControlFlowGraph {
Some(eb) => eb, Some(eb) => eb,
}; };
let mut seen = HashSet::new(); let mut seen = HashSet::new();
let mut stack_a = vec![entry_block]; let mut open_nodes = vec![entry_block];
let mut finished = BTreeMap::new(); let mut finished = BTreeMap::new();
while stack_a.len() > 0 { while open_nodes.len() > 0 {
let cur = stack_a.pop().unwrap(); let cur = open_nodes.pop().unwrap();
for child in &self.data[cur].successors { for child in &self.data[cur].successors {
if *child != cur && !seen.contains(&child) { if *child != cur && !seen.contains(&child) {
seen.insert(child); seen.insert(child);
stack_a.push(child.clone()); open_nodes.push(child.clone());
} }
} }
let index = finished.len(); let index = finished.len();