aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/cbytecodes.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-01-15 18:45:27 +0530
committerGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-01-15 18:59:00 +0530
commit8309a98096facfba448c9d8d298ba3903145831a (patch)
tree38a09851cb687921193b4368a93eed34ccd55a58 /kernel/cbytecodes.ml
parent58153a5bc59bbde6534425d66a2fe5d9943eb44b (diff)
Correct restriction of vm_compute when handling universe polymorphic
definitions. Instead of failing with an anomaly when trying to do conversion or computation with the vm's, consider polymorphic constants as being opaque and keep instances around. This way the code is still correct but (obviously) incomplete for polymorphic definitions and we avoid introducing an anomaly. The patch does nothing clever, it only keeps around instances with constants/inductives and compile constant bodies only for non-polymorphic definitions.
Diffstat (limited to 'kernel/cbytecodes.ml')
-rw-r--r--kernel/cbytecodes.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/cbytecodes.ml b/kernel/cbytecodes.ml
index 473a14c24..ae679027d 100644
--- a/kernel/cbytecodes.ml
+++ b/kernel/cbytecodes.ml
@@ -27,7 +27,7 @@ let cofix_evaluated_tag = 6
type structured_constant =
| Const_sorts of sorts
- | Const_ind of inductive
+ | Const_ind of pinductive
| Const_b0 of tag
| Const_bn of tag * structured_constant array
@@ -67,7 +67,7 @@ type instruction =
(* nb fv, init, lbl types, lbl bodies *)
| Kclosurecofix of int * int * Label.t array * Label.t array
(* nb fv, init, lbl types, lbl bodies *)
- | Kgetglobal of constant
+ | Kgetglobal of pconstant
| Kconst of structured_constant
| Kmakeblock of int * tag (* size, tag *)
| Kmakeprod
@@ -185,7 +185,7 @@ let rec instruction ppf = function
Array.iter (fun lbl -> fprintf ppf " %i" lbl) lblt;
print_string " bodies = ";
Array.iter (fun lbl -> fprintf ppf " %i" lbl) lblb;
- | Kgetglobal id -> fprintf ppf "\tgetglobal %s" (Names.string_of_con id)
+ | Kgetglobal (id,u) -> fprintf ppf "\tgetglobal %s" (Names.string_of_con id)
| Kconst cst ->
fprintf ppf "\tconst"
| Kmakeblock(n, m) ->