From 668f3a90a85edc8d4e1472af0eb530fa7c4bb2ed Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 13 Oct 2010 17:15:25 -0700 Subject: Move the friendly-names table to semant, reuse it in the name mangler. --- src/boot/me/resolve.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/boot/me/resolve.ml') diff --git a/src/boot/me/resolve.ml b/src/boot/me/resolve.ml index 78d372d5..8372b64a 100644 --- a/src/boot/me/resolve.ml +++ b/src/boot/me/resolve.ml @@ -877,6 +877,18 @@ let process_crate (* Post-resolve, we can establish a tag cache. *) cx.ctxt_tag_cache <- Some (Hashtbl.create 0); cx.ctxt_rebuild_cache <- Some (Hashtbl.create 0); + + (* Also index all the type names for future error messages. *) + Hashtbl.iter + begin + fun item_id ty -> + let item_names = cx.Semant.ctxt_all_item_names in + if Hashtbl.mem item_names item_id then + Hashtbl.add cx.Semant.ctxt_user_type_names ty + (Hashtbl.find item_names item_id) + end + cx.Semant.ctxt_all_type_items; + ;; (* -- cgit v1.2.3