Skip to content

Commit

Permalink
fix alias analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
glyh committed Oct 24, 2024
1 parent d10ea5d commit de93444
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cps/alias_analysis.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ fn alias_analysis(c : Cps, optimized : Ref[Bool]) -> Cps {
}
Fix(f, args, body, rest) => Fix(f, args, rec(body), rec(rest))
If(cond, _then, _else) => If(cond, rec(_then), rec(_else))
IfEq(lhs, rhs, _then, _else) => IfEq(lhs, rhs, rec(_then), rec(_else))
IfLe(lhs, rhs, _then, _else) => IfLe(lhs, rhs, rec(_then), rec(_else))
Prim(op, vs, bind, rest) => Prim(op, vs, bind, rec(rest))
c => c
MakeArray(_) | Exit | App(_) => c
}
}

0 comments on commit de93444

Please sign in to comment.