aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/nativeconv.ml
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2013-12-30 10:40:39 -0500
committerGravatar Maxime Dénès <mail@maximedenes.fr>2013-12-30 10:40:39 -0500
commitea47086be3b724968053525e8fa795b9cdd77800 (patch)
treeb888ca03e686b4c44984eb72632cdf35f260efce /kernel/nativeconv.ml
parentf2087508a325bd4dae8be54ea3c6111f6b652775 (diff)
Support for evars and metas in native compiler.
Experimental. Turned out to be much harder to implement than I thought. The main issue is that the reification in the native compiler and the VM is not quite untyped. Indeed, type annotations for lambdas have to be reconstructed. Hence, when reifying an application u = t a1 ... an, the type of t has to be known or reconstructed. It is always possible to do so in plain CIC, when u is in normal form and its type is known. However, with partial terms this may no longer be the case, as in: ?1 a1 ... an. So we also compile and evaluate the type of evars and metas. This still has to be tested more extensively, but the correction of the kernel native conversion (on terms without evars or metas) should not be impacted. Much of this could be reused for the VM.
Diffstat (limited to 'kernel/nativeconv.ml')
-rw-r--r--kernel/nativeconv.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/nativeconv.ml b/kernel/nativeconv.ml
index 14b55e91a..3435e1d75 100644
--- a/kernel/nativeconv.ml
+++ b/kernel/nativeconv.ml
@@ -127,7 +127,7 @@ and conv_fix lvl t1 f1 t2 f2 cu =
else aux (i+1) (conv_val CONV flvl fi1 fi2 cu) in
aux 0 cu
-let native_conv pb env t1 t2 =
+let native_conv pb sigma env t1 t2 =
if !Flags.no_native_compiler then begin
let msg = "Native compiler is disabled, "^
"falling back to VM conversion test." in
@@ -137,7 +137,7 @@ let native_conv pb env t1 t2 =
else
let env = Environ.pre_env env in
let ml_filename, prefix = get_ml_filename () in
- let code, upds = mk_conv_code env prefix t1 t2 in
+ let code, upds = mk_conv_code env sigma prefix t1 t2 in
match compile ml_filename code with
| (0,fn) ->
begin