aboutsummaryrefslogtreecommitdiff
path: root/kernel/cPrimitives.ml
diff options
context:
space:
mode:
authorPierre Roux2018-08-28 14:31:37 +0200
committerPierre Roux2019-11-01 10:20:31 +0100
commit79605dabb10e889ae998bf72c8483f095277e693 (patch)
treefd2cf05ce8e4a2748700c7d1458a574f91dbab97 /kernel/cPrimitives.ml
parentdda50a88aab0fa0cfb74c8973b5a4353fe5c8447 (diff)
Change return type of primitive float comparison
Replace `option comparison` with `float_comparison` (:= `FEq | FLt | FGt | FNotComparable`) as suggested by Guillaume Melquiond to avoid boxing and an extra match when using primitive float comparison.
Diffstat (limited to 'kernel/cPrimitives.ml')
-rw-r--r--kernel/cPrimitives.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/cPrimitives.ml b/kernel/cPrimitives.ml
index 3154ee8c75..d5ed2c1a06 100644
--- a/kernel/cPrimitives.ml
+++ b/kernel/cPrimitives.ml
@@ -135,7 +135,7 @@ type 'a prim_ind =
| PIT_carry : prim_type prim_ind
| PIT_pair : (prim_type * prim_type) prim_ind
| PIT_cmp : unit prim_ind
- | PIT_option : unit prim_ind
+ | PIT_f_cmp : unit prim_ind
type prim_ind_ex = PIE : 'a prim_ind -> prim_ind_ex
@@ -165,7 +165,7 @@ let types =
| Float64ofInt63 -> [int_ty; float_ty]
| Float64normfr_mantissa -> [float_ty; int_ty]
| Float64frshiftexp -> [float_ty; PITT_ind (PIT_pair, (PT_float64, PT_int63))]
- | Float64compare -> [float_ty; float_ty; PITT_ind (PIT_option, ())]
+ | Float64compare -> [float_ty; float_ty; PITT_ind (PIT_f_cmp, ())]
| Float64add | Float64sub | Float64mul
| Float64div -> [float_ty; float_ty; float_ty]
| Float64ldshiftexp -> [float_ty; int_ty; float_ty]
@@ -197,7 +197,7 @@ let prim_ind_to_string (type a) (p : a prim_ind) = match p with
| PIT_carry -> "carry"
| PIT_pair -> "pair"
| PIT_cmp -> "cmp"
- | PIT_option -> "option"
+ | PIT_f_cmp -> "f_cmp"
let prim_type_to_string = function
| PT_int63 -> "int63_type"