From 5f7adad4af7d526aed3a97f8b24b2d9811f9fea7 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Tue, 23 Jun 2015 18:02:30 +0200 Subject: 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. --- lib/flags.ml | 4 ++++ lib/flags.mli | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3