summaryrefslogtreecommitdiff
path: root/library/declaremods.ml
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <gareuselesinge@debian.org>2015-11-13 11:31:34 +0100
committerGravatar Enrico Tassi <gareuselesinge@debian.org>2015-11-13 11:31:34 +0100
commit2280477a96e19ba5060de2d48dcc8fd7c8079d22 (patch)
tree074182834cb406d1304aec4233718564a9c06ba1 /library/declaremods.ml
parent0aa2544d04dbd4b6ee665b551ed165e4fb02d2fa (diff)
Imported Upstream version 8.5~beta3+dfsg
Diffstat (limited to 'library/declaremods.ml')
-rw-r--r--library/declaremods.ml18
1 files changed, 8 insertions, 10 deletions
diff --git a/library/declaremods.ml b/library/declaremods.ml
index cc7c4d7f..7f607a51 100644
--- a/library/declaremods.ml
+++ b/library/declaremods.ml
@@ -166,12 +166,14 @@ let consistency_checks exists dir dirinfo =
let globref =
try Nametab.locate_dir (qualid_of_dirpath dir)
with Not_found ->
- anomaly (pr_dirpath dir ++ str " should already exist!")
+ errorlabstrm "consistency_checks"
+ (pr_dirpath dir ++ str " should already exist!")
in
assert (eq_global_dir_reference globref dirinfo)
else
if Nametab.exists_dir dir then
- anomaly (pr_dirpath dir ++ str " already exists")
+ errorlabstrm "consistency_checks"
+ (pr_dirpath dir ++ str " already exists")
let compute_visibility exists i =
if exists then Nametab.Exactly i else Nametab.Until i
@@ -845,10 +847,6 @@ type library_objects = Lib.lib_objects * Lib.lib_objects
(** For the native compiler, we cache the library values *)
-type library_values = Nativecode.symbol array
-let library_values =
- Summary.ref (Dirmap.empty : library_values Dirmap.t) ~name:"LIBVALUES"
-
let register_library dir cenv (objs:library_objects) digest univ =
let mp = MPfile dir in
let () =
@@ -857,15 +855,15 @@ let register_library dir cenv (objs:library_objects) digest univ =
ignore(Global.lookup_module mp);
with Not_found ->
(* If not, let's do it now ... *)
- let mp', values = Global.import cenv univ digest in
+ let mp' = Global.import cenv univ digest in
if not (ModPath.equal mp mp') then
anomaly (Pp.str "Unexpected disk module name");
- library_values := Dirmap.add dir values !library_values
in
let sobjs,keepobjs = objs in
do_module false Lib.load_objects 1 dir mp ([],Objs sobjs) keepobjs
-let get_library_symbols_tbl dir = Dirmap.find dir !library_values
+let get_library_native_symbols dir =
+ Safe_typing.get_library_native_symbols (Global.safe_env ()) dir
let start_library dir =
let mp = Global.start_library dir in
@@ -950,7 +948,7 @@ type 'modast module_params =
let debug_print_modtab _ =
let pr_seg = function
| [] -> str "[]"
- | l -> str ("[." ^ string_of_int (List.length l) ^ ".]")
+ | l -> str "[." ++ int (List.length l) ++ str ".]"
in
let pr_modinfo mp (prefix,substobjs,keepobjs) s =
s ++ str (string_of_mp mp) ++ (spc ())