aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/typeops.ml
diff options
context:
space:
mode:
authorGravatar mdenes <mdenes@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-01-22 17:37:00 +0000
committerGravatar mdenes <mdenes@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-01-22 17:37:00 +0000
commit6b908b5185a55a27a82c2b0fce4713812adde156 (patch)
treec2857724d8b22ae3d7a91b3a683a57206caf9b54 /kernel/typeops.ml
parent62ce65dadb0afb8815b26069246832662846c7ec (diff)
New implementation of the conversion test, using normalization by evaluation to
native OCaml code. Warning: the "retroknowledge" mechanism has not been ported to the native compiler, because integers and persistent arrays will ultimately be defined as primitive constructions. Until then, computation on numbers may be faster using the VM, since it takes advantage of machine integers. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16136 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/typeops.ml')
-rw-r--r--kernel/typeops.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/typeops.ml b/kernel/typeops.ml
index 8509edaf9..e61168200 100644
--- a/kernel/typeops.ml
+++ b/kernel/typeops.ml
@@ -280,7 +280,11 @@ let judge_of_cast env cj k tj =
conv_leq false env cj.uj_type expected_type
| REVERTcast ->
cj.uj_val,
- conv_leq true env cj.uj_type expected_type in
+ conv_leq true env cj.uj_type expected_type
+ | NATIVEcast ->
+ mkCast (cj.uj_val, k, expected_type),
+ native_conv CUMUL env cj.uj_type expected_type
+ in
{ uj_val = c;
uj_type = expected_type },
cst