aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/nativelibrary.ml
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2014-04-09 15:36:10 -0400
committerGravatar Maxime Dénès <mail@maximedenes.fr>2014-04-09 15:36:10 -0400
commit286ab375eb8a56de0becd7600ca249c91667e1c7 (patch)
treea71a8fb8dc4b6fd86b95caf40936e1b8ea38c0b3 /kernel/nativelibrary.ml
parentd6f0694465ba46e07d895124e6ecb676e23ee8e8 (diff)
Fix exponential behavior in native compiler with retroknowledge.
Diffstat (limited to 'kernel/nativelibrary.ml')
-rw-r--r--kernel/nativelibrary.ml29
1 files changed, 24 insertions, 5 deletions
diff --git a/kernel/nativelibrary.ml b/kernel/nativelibrary.ml
index 6418ac450..6749dbfdb 100644
--- a/kernel/nativelibrary.ml
+++ b/kernel/nativelibrary.ml
@@ -27,14 +27,33 @@ let rec translate_mod prefix mp env mod_expr acc =
and translate_field prefix mp env acc (l,x) =
match x with
| SFBconst cb ->
- let con = make_con mp empty_dirpath l in
- compile_constant_field (pre_env env) prefix con acc cb
+ let con = make_con mp empty_dirpath l in
+ (if !Flags.debug then
+ let msg = Printf.sprintf "Compiling constant %s..." (Constant.to_string con) in
+ Pp.msg_debug (Pp.str msg));
+ compile_constant_field (pre_env env) prefix con acc cb
| SFBmind mb ->
- compile_mind_field prefix mp l acc mb
+ (if !Flags.debug then
+ let id = mb.mind_packets.(0).mind_typename in
+ let msg = Printf.sprintf "Compiling inductive %s..." (Id.to_string id) in
+ Pp.msg_debug (Pp.str msg));
+ compile_mind_field prefix mp l acc mb
| SFBmodule md ->
- translate_mod prefix md.mod_mp env md.mod_type acc
+ let mp = md.mod_mp in
+ (if !Flags.debug then
+ let msg =
+ Printf.sprintf "Compiling module %s..." (ModPath.to_string mp)
+ in
+ Pp.msg_debug (Pp.str msg));
+ translate_mod prefix mp env md.mod_type acc
| SFBmodtype mdtyp ->
- translate_mod prefix mdtyp.typ_mp env mdtyp.typ_expr acc
+ let mp = mdtyp.typ_mp in
+ (if !Flags.debug then
+ let msg =
+ Printf.sprintf "Compiling module type %s..." (ModPath.to_string mp)
+ in
+ Pp.msg_debug (Pp.str msg));
+ translate_mod prefix mp env mdtyp.typ_expr acc
let dump_library mp dp env mod_expr =
if !Flags.debug then Pp.msg_debug (Pp.str "Compiling library...");