Rename tezos_protocol_registerer.ml

This commit is contained in:
Grégoire Henry 2017-10-27 19:54:28 +02:00 committed by Benjamin Canou
parent 0afb67dd10
commit 2e477ebb26
8 changed files with 12 additions and 11 deletions

View File

@ -57,7 +57,7 @@ ${COMPILER_OBJS}: SOURCE_DIRECTORIES=${COMPILER_SOURCE_DIRECTORIES}
${COMPILER_OBJS}: TARGET="(compiler.cmxa)"
${COMPILER_OBJS}: OPENED_MODULES=${COMPILER_OPENED_MODULES}
compiler/tezos_protocol_registerer.cmi: EXTRA_OCAMLFLAGS = -opaque
compiler/registerer.cmi: EXTRA_OCAMLFLAGS = -opaque
.INTERMEDIATE: compiler/tezos_compiler_embedded_cmis.ml
compiler/tezos_compiler_embedded_cmis.cmx: compiler/tezos_compiler_embedded_cmis.cmi

View File

@ -152,20 +152,20 @@ $(shell ocamlfind query stdlib)/camlinternalFormatBasics.cmi: \
COMPILER_EMBEDDED_CMIS := \
$(shell ocamlfind query stdlib)/camlinternalFormatBasics.cmi \
${PACKED_SIGS_V1}.cmi \
compiler/tezos_protocol_registerer.cmi
compiler/registerer.cmi
COMPILER_IMPLS := \
compiler_main.ml \
COMPILER_LIB_INTFS := \
compiler/tezos_compiler_embedded_cmis.mli \
compiler/tezos_protocol_registerer.mli \
compiler/registerer.mli \
compiler/packer.mli \
compiler/tezos_compiler.mli \
COMPILER_LIB_IMPLS := \
compiler/tezos_compiler_embedded_cmis.ml \
compiler/tezos_protocol_registerer.ml \
compiler/registerer.ml \
compiler/packer.ml \
compiler/tezos_compiler.ml \

View File

@ -25,3 +25,4 @@ let get_exn hash = VersionTable.find versions hash
let get hash =
try Some (get_exn hash)
with Not_found -> None

View File

@ -115,7 +115,7 @@ let tezos_protocol_env =
let register_env =
let open Tezos_compiler_embedded_cmis in
[
"Tezos_protocol_registerer", tezos_protocol_registerer_cmi ;
"registerer", registerer_cmi ;
]
@ -319,7 +319,7 @@ let main () =
create_file register_file
(Printf.sprintf
"module Name = struct let name = %S end\n\
\ let () = Tezos_protocol_registerer.register Name.name (module %s.Make)"
\ let () = Registerer.register Name.name (module %s.Make)"
(Protocol_hash.to_b58check hash)
functor_unit) ;
let register_object = compile_ml ~for_pack register_file in

View File

@ -9,4 +9,4 @@
val camlinternalFormatBasics_cmi: string
val tezos_protocol_environment_sigs_v1_cmi: string
val tezos_protocol_registerer_cmi: string
val registerer_cmi: string

View File

@ -586,7 +586,7 @@ module Registred_protocol = struct
end
let build_v1 hash =
let (module F) = Tezos_protocol_registerer.get_exn hash in
let (module F) = Registerer.get_exn hash in
let module Name = struct
let name = Protocol_hash.to_b58check hash
end in
@ -605,7 +605,7 @@ module Registred_protocol = struct
VersionTable.create 20
let mem hash =
VersionTable.mem versions hash || Tezos_protocol_registerer.mem hash
VersionTable.mem versions hash || Registerer.mem hash
let get_exn hash =
try VersionTable.find versions hash

View File

@ -101,11 +101,11 @@ let do_compile hash p =
Lwt.return false
let compile hash p =
if Tezos_protocol_registerer.mem hash then
if Registerer.mem hash then
Lwt.return true
else begin
do_compile hash p >>= fun success ->
let loaded = Tezos_protocol_registerer.mem hash in
let loaded = Registerer.mem hash in
if success && not loaded then
log_error "Internal error while compiling %a" Protocol_hash.pp hash;
Lwt.return loaded