Skip to content

Commit

Permalink
Fix function name change
Browse files Browse the repository at this point in the history
Co-authored-by: T6 <[email protected]>
  • Loading branch information
edusporto and tjjfvi committed Jun 10, 2024
1 parent e016d7c commit 23ad6dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,13 +571,13 @@ impl Book {
/// nodes in weird places. See HVM issue [#362](https://github.com/HigherOrderCO/HVM/issues/362)
/// for an example.
fn propagate_safety(&self, compiled_book: &mut hvm::Book, lookup: &BTreeMap<String, u32>) {
let rev_dependencies = self.direct_dependents();
let dependents = self.direct_dependents();
let mut stack: Vec<&str> = Vec::new();

for (name, _) in self.defs.iter() {
let def = &mut compiled_book.defs[lookup[name] as usize];
if !def.safe {
for next in rev_dependencies[name.as_str()].iter() {
for next in dependents[name.as_str()].iter() {
stack.push(next);
}
}
Expand All @@ -592,7 +592,7 @@ impl Book {

def.safe = false;

for &next in rev_dependencies[curr].iter() {
for &next in dependents[curr].iter() {
stack.push(next);
}
}
Expand Down

0 comments on commit 23ad6dc

Please sign in to comment.