Skip to content

Commit

Permalink
Merge the Linked and LinkedInteractive constructors.
Browse files Browse the repository at this point in the history
There was not any difference between those after the cleanup patches that
come before.
  • Loading branch information
ppedrot committed Nov 12, 2020
1 parent c12471f commit 9cf4248
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion kernel/environ.ml
Expand Up @@ -43,7 +43,6 @@ type key = int CEphemeron.key option ref

type link_info =
| Linked of string
| LinkedInteractive of string
| NotLinked

type constant_key = Opaqueproof.opaque constant_body * (link_info ref * key)
Expand Down
1 change: 0 additions & 1 deletion kernel/environ.mli
Expand Up @@ -37,7 +37,6 @@ val dummy_lazy_val : unit -> lazy_val
(** Linking information for the native compiler *)
type link_info =
| Linked of string
| LinkedInteractive of string
| NotLinked

type key = int CEphemeron.key option ref
Expand Down
6 changes: 1 addition & 5 deletions kernel/nativecode.ml
Expand Up @@ -1981,9 +1981,6 @@ let register_native_file s =
let is_code_loaded name =
match !name with
| NotLinked -> false
| LinkedInteractive s ->
if (is_loaded_native_file s) then true
else (name := NotLinked; false)
| Linked s ->
if is_loaded_native_file s then true
else (name := NotLinked; false)
Expand Down Expand Up @@ -2192,8 +2189,7 @@ let mk_library_header (symbols : Nativevalues.symbols) =
[Glet(Ginternal "symbols_tbl", MLglobal (Ginternal symbols))]

let update_location r =
let v = LinkedInteractive r.upd_prefix in
r.upd_info := v
r.upd_info := Linked r.upd_prefix

let update_locations (ind_updates,const_updates) =
Mindmap_env.iter (fun _ -> update_location) ind_updates;
Expand Down
2 changes: 0 additions & 2 deletions kernel/nativelambda.ml
Expand Up @@ -111,14 +111,12 @@ let get_mind_prefix env mind =
match !name with
| NotLinked -> ""
| Linked s -> s
| LinkedInteractive s -> s

let get_const_prefix env c =
let _,(nameref,_) = lookup_constant_key c env in
match !nameref with
| NotLinked -> ""
| Linked s -> s
| LinkedInteractive s -> s

(* A generic map function *)

Expand Down

0 comments on commit 9cf4248

Please sign in to comment.