File tree 3 files changed +14
-4
lines changed
testsuite/tests/typing-layouts-float64
3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,9 @@ let rec is_tailcall = function
111
111
let preserve_tailcall_for_prim = function
112
112
Popaque _ | Psequor | Psequand
113
113
| Pobj_magic _
114
- | Prunstack | Pperform | Presume | Preperform ->
114
+ | Prunstack | Pperform | Presume | Preperform
115
+ | Pbox_float _ | Punbox_float
116
+ | Pbox_int _ | Punbox_int _ ->
115
117
true
116
118
| Pbytes_to_string | Pbytes_of_string
117
119
| Parray_to_iarray | Parray_of_iarray
@@ -127,7 +129,6 @@ let preserve_tailcall_for_prim = function
127
129
| Pdivint _ | Pmodint _ | Pandint | Porint | Pxorint | Plslint | Plsrint
128
130
| Pasrint | Pintcomp _ | Poffsetint _ | Poffsetref _ | Pintoffloat
129
131
| Pfloatofint _ | Pnegfloat _ | Pabsfloat _ | Paddfloat _ | Psubfloat _ | Pmulfloat _
130
- | Punbox_float | Pbox_float _ | Punbox_int _ | Pbox_int _
131
132
| Pdivfloat _ | Pfloatcomp _| Punboxed_float_comp _
132
133
| Pstringlength | Pstringrefu | Pstringrefs
133
134
| Pcompare_ints | Pcompare_floats | Pcompare_bints _
Original file line number Diff line number Diff line change @@ -1010,7 +1010,6 @@ let lambda_primitive_needs_event_after = function
1010
1010
collect the call stack. *)
1011
1011
| Pduprecord _ | Pccall _ | Pfloatofint _ | Pnegfloat _ | Pabsfloat _
1012
1012
| Paddfloat _ | Psubfloat _ | Pmulfloat _ | Pdivfloat _ | Pstringrefs | Pbytesrefs
1013
- | Pbox_float _ | Pbox_int _
1014
1013
| Pbytessets | Pmakearray (Pgenarray , _, _) | Pduparray _
1015
1014
| Parrayrefu (Pgenarray_ref _ | Pfloatarray_ref _)
1016
1015
| Parrayrefs _ | Parraysets _ | Pbintofint _ | Pcvtbint _ | Pnegbint _
@@ -1047,7 +1046,10 @@ let lambda_primitive_needs_event_after = function
1047
1046
| Patomic_exchange | Patomic_cas | Patomic_fetch_add | Patomic_load _
1048
1047
| Pintofbint _ | Pctconst _ | Pbswap16 | Pint_as_pointer _ | Popaque _
1049
1048
| Pdls_get
1050
- | Pobj_magic _ | Punbox_float | Punbox_int _ -> false
1049
+ | Pobj_magic _ | Punbox_float | Punbox_int _
1050
+ (* These don't allocate in bytecode; they're just identity functions: *)
1051
+ | Pbox_float _ | Pbox_int _
1052
+ -> false
1051
1053
1052
1054
(* Determine if a primitive should be surrounded by an "after" debug event *)
1053
1055
let primitive_needs_event_after = function
Original file line number Diff line number Diff line change
1
+ (* TEST
2
+ * bytecode
3
+ flags = "-g -extension layouts"
4
+ *)
5
+
6
+ let f1 f i = Stdlib__Float_u. to_float (f i)
7
+ let f2 f i = Stdlib__Float_u. to_float (f i) +. 0.
You can’t perform that action at this time.
0 commit comments