aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-11-28 01:49:52 +0100
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-12-02 02:26:18 +0100
commit4554a860ffdcb30bf5711bd52f443484f9f950d9 (patch)
tree395170d967938af22d8792ae4e488ad230ad6547 /kernel
parent0048cbe810c82a775558c14cd7fcae644e205c51 (diff)
[kernel] Patch allowing to disable VM reduction.
The patch has three parts: - Introduction of a configure flag `-bytecode-compiler (yes|no)` (due to static initialization this is a configure-time option) - Installing the hooks that register the VM with the pretyper and the kernel conditionally on the flag. - Replacing the normalization function in `Redexpr` by compute if the VM is disabled. We also rename `Coq_config.no_native_compiler` to `native_compiler` and `Flags.native_compiler` to `output_native_objects` [see #4607].
Diffstat (limited to 'kernel')
-rw-r--r--kernel/nativeconv.ml2
-rw-r--r--kernel/safe_typing.ml2
-rw-r--r--kernel/vconv.ml2
3 files changed, 3 insertions, 3 deletions
diff --git a/kernel/nativeconv.ml b/kernel/nativeconv.ml
index a62a079da..9f9102f7d 100644
--- a/kernel/nativeconv.ml
+++ b/kernel/nativeconv.ml
@@ -154,7 +154,7 @@ let warn_no_native_compiler =
(* Wrapper for [native_conv] above *)
let native_conv cv_pb sigma env t1 t2 =
- if Coq_config.no_native_compiler then begin
+ if not Coq_config.native_compiler then begin
warn_no_native_compiler ();
vm_conv cv_pb env t1 t2
end
diff --git a/kernel/safe_typing.ml b/kernel/safe_typing.ml
index 0e41bfc3c..5150ad411 100644
--- a/kernel/safe_typing.ml
+++ b/kernel/safe_typing.ml
@@ -858,7 +858,7 @@ let export ?except senv dir =
}
in
let ast, symbols =
- if !Flags.native_compiler then
+ if !Flags.output_native_objects then
Nativelibrary.dump_library mp dir senv.env str
else [], Nativecode.empty_symbols
in
diff --git a/kernel/vconv.ml b/kernel/vconv.ml
index 578a89371..3ef297b1f 100644
--- a/kernel/vconv.ml
+++ b/kernel/vconv.ml
@@ -204,4 +204,4 @@ let vm_conv cv_pb env t1 t2 =
let univs = (univs, checked_universes) in
let _ = vm_conv_gen cv_pb env univs t1 t2 in ()
-let _ = Reduction.set_vm_conv vm_conv
+let _ = if Coq_config.bytecode_compiler then Reduction.set_vm_conv vm_conv