diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2014-04-06 14:59:59 -0400 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2014-04-09 01:05:48 -0400 |
commit | b0f3857eca168ee5d843e86b7678ac3d5375b07c (patch) | |
tree | 9e4f0916dbbe6e4826fb6dc4376d1e5d449e7183 /kernel/environ.ml | |
parent | aa3b8b7b24e809b379fcc86f2b21ae4380b211d5 (diff) |
Full support for int31 values in native compiler.
Diffstat (limited to 'kernel/environ.ml')
-rw-r--r-- | kernel/environ.ml | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/environ.ml b/kernel/environ.ml index 4ce42c919..5a40b1c2a 100644 --- a/kernel/environ.ml +++ b/kernel/environ.ml @@ -481,6 +481,12 @@ let register = add_vm_compiling_info retroknowledge v (Cbytegen.op_compilation n op kn) in + let add_int31_before_match rk v = + let rk = add_vm_before_match_info rk v Cbytegen.int31_escape_before_match in + let rk = add_native_before_match_info rk v Nativelambda.before_match_int31 in + rk + in + fun env field value -> (* subfunction which shortens the (very often use) registration of binary operators to the reactive retroknowledge. *) @@ -522,9 +528,8 @@ fun env field value -> | _ -> anomaly ~label:"Environ.register" (Pp.str "should be an inductive type") in add_int31_decompilation_from_type - (add_vm_before_match_info - (retroknowledge add_int31c env i31c) - value Cbytegen.int31_escape_before_match) + (add_int31_before_match + (retroknowledge add_int31c env i31c) value) | KInt31 (_, Int31Plus) -> add_int31_binop_from_const Cbytecodes.Kaddint31 | KInt31 (_, Int31PlusC) -> add_int31_binop_from_const Cbytecodes.Kaddcint31 | KInt31 (_, Int31PlusCarryC) -> add_int31_binop_from_const Cbytecodes.Kaddcarrycint31 |