aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-06-25 19:55:40 -0700
committerGraydon Hoare <[email protected]>2010-06-25 19:55:40 -0700
commit34dc7053ebfd440648f49dc83d2538ab5e7ceda5 (patch)
tree9567f18cfcf04b1a7e4bc17f64c7f5b3cb4424b0
parentRemove obsolete comment. (diff)
downloadrust-34dc7053ebfd440648f49dc83d2538ab5e7ceda5.tar.xz
rust-34dc7053ebfd440648f49dc83d2538ab5e7ceda5.zip
Fix over-conservatism in alias analysis.
-rw-r--r--src/boot/me/alias.ml11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/boot/me/alias.ml b/src/boot/me/alias.ml
index 7009fe10..25d4ed04 100644
--- a/src/boot/me/alias.ml
+++ b/src/boot/me/alias.ml
@@ -20,13 +20,10 @@ let alias_analysis_visitor
in
let alias lval =
- match lval with
- Ast.LVAL_base nb ->
- let referent = Hashtbl.find cx.ctxt_lval_to_referent nb.id in
- if (referent_is_slot cx referent)
- then alias_slot referent
- | _ -> err None "unhandled form of lval %a in alias analysis"
- Ast.sprintf_lval lval
+ let lv_id = lval_base_id lval in
+ let referent = Hashtbl.find cx.ctxt_lval_to_referent lv_id in
+ if (referent_is_slot cx referent)
+ then alias_slot referent
in
let alias_atom at =