aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaxime Dénès2015-06-23 18:02:30 +0200
committerMaxime Dénès2015-06-23 18:04:11 +0200
commit5f7adad4af7d526aed3a97f8b24b2d9811f9fea7 (patch)
treed64fd513d3233715ad4d9c14b6e65672e60e1030 /lib
parentb28bafb1d2003558c916c75d36784f94e9aa1684 (diff)
Add a Set Dump Bytecode command for debugging purposes.
Prints the VM bytecode produced by compilation of a constant or a call to vm_compute.
Diffstat (limited to 'lib')
-rw-r--r--lib/flags.ml4
-rw-r--r--lib/flags.mli9
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/flags.ml b/lib/flags.ml
index 009caa9dee..ab4ac03f80 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -215,3 +215,7 @@ let native_compiler = ref false
let print_mod_uid = ref false
let tactic_context_compat = ref false
+
+let dump_bytecode = ref false
+let set_dump_bytecode = (:=) dump_bytecode
+let get_dump_bytecode () = !dump_bytecode
diff --git a/lib/flags.mli b/lib/flags.mli
index 544e2a72ae..8e37136560 100644
--- a/lib/flags.mli
+++ b/lib/flags.mli
@@ -130,12 +130,17 @@ val set_inline_level : int -> unit
val get_inline_level : unit -> int
val default_inline_level : int
-(* Native code compilation for conversion and normalization *)
+(** Native code compilation for conversion and normalization *)
val native_compiler : bool ref
-(* Print the mod uid associated to a vo file by the native compiler *)
+(** Print the mod uid associated to a vo file by the native compiler *)
val print_mod_uid : bool ref
val tactic_context_compat : bool ref
(** Set to [true] to trigger the compatibility bugged context matching (old
context vs. appcontext) is set. *)
+
+(** Dump the bytecode after compilation (for debugging purposes) *)
+val dump_bytecode : bool ref
+val set_dump_bytecode : bool -> unit
+val get_dump_bytecode : unit -> bool