diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2014-11-12 15:50:37 +0100 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2014-11-12 15:50:37 +0100 |
commit | e74d442cc7732cee262921f3dd8cd42a882f75de (patch) | |
tree | 0411fb0d7237105bf629ec50ba0719f07079d63b /kernel/environ.ml | |
parent | 21abd69648badb999ea22a77cdaad4630761d0e6 (diff) |
Cleaner interfaces for linking locations of native compiler.
Stop sharing those references across constants of the same
module, which was triggering some bugs when using native_compute
in interactive mode in a functor declaration.
Diffstat (limited to 'kernel/environ.ml')
-rw-r--r-- | kernel/environ.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/environ.ml b/kernel/environ.ml index a3a579ee0..45dfb22d3 100644 --- a/kernel/environ.ml +++ b/kernel/environ.ml @@ -207,18 +207,18 @@ let push_context_set ctx env = add_constraints (Univ.ContextSet.constraints ctx) let lookup_constant = lookup_constant -let no_link_info () = ref NotLinked +let no_link_info = NotLinked let add_constant_key kn cb linkinfo env = let new_constants = - Cmap_env.add kn (cb,(linkinfo, ref None)) env.env_globals.env_constants in + Cmap_env.add kn (cb,(ref linkinfo, ref None)) env.env_globals.env_constants in let new_globals = { env.env_globals with env_constants = new_constants } in { env with env_globals = new_globals } let add_constant kn cb env = - add_constant_key kn cb (no_link_info ()) env + add_constant_key kn cb no_link_info env let constraints_of cb u = let univs = cb.const_universes in @@ -366,7 +366,7 @@ let add_mind_key kn mind_key env = { env with env_globals = new_globals } let add_mind kn mib env = - let li = no_link_info () in add_mind_key kn (mib, li) env + let li = ref no_link_info in add_mind_key kn (mib, li) env (* Lookup of section variables *) |