aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me/alias.ml
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-27 11:19:43 -0700
committerGraydon Hoare <[email protected]>2010-07-27 11:19:43 -0700
commit4d31cf1dc58794b8f72240eb19c48b392e9de7b2 (patch)
treea5b4c7eb4cc39dac8d1a86cc13b8526c4c7f730b /src/boot/me/alias.ml
parentSlight shaving on RA, no more optimizing today. It's fast enough for now. (diff)
downloadrust-4d31cf1dc58794b8f72240eb19c48b392e9de7b2.tar.xz
rust-4d31cf1dc58794b8f72240eb19c48b392e9de7b2.zip
Distill semantics of use-def maps to fewer and more-obvious words.
- Remove redundant uses of 'resolve' and 'referent' in semant. - Use defn, defn_id, lval, lval_base more consistently. - Make associated query functions more consistent. - Closes #127.
Diffstat (limited to 'src/boot/me/alias.ml')
-rw-r--r--src/boot/me/alias.ml11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/boot/me/alias.ml b/src/boot/me/alias.ml
index a038030e..94d34fb2 100644
--- a/src/boot/me/alias.ml
+++ b/src/boot/me/alias.ml
@@ -20,10 +20,9 @@ let alias_analysis_visitor
in
let alias 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
+ let defn_id = lval_base_defn_id cx lval in
+ if (defn_id_is_slot cx defn_id)
+ then alias_slot defn_id
in
let alias_atom at =
@@ -85,8 +84,8 @@ let alias_analysis_visitor
in
let visit_lval_pre lv =
- let slot_id = lval_to_referent cx (lval_base_id lv) in
- if (not (Stack.is_empty curr_stmt)) && (referent_is_slot cx slot_id)
+ let slot_id = lval_base_defn_id cx lv in
+ if (not (Stack.is_empty curr_stmt)) && (defn_id_is_slot cx slot_id)
then
begin
let slot_depth = get_slot_depth cx slot_id in