diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | asmcomp/cmmgen.ml | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -48,6 +48,7 @@ Compilers: - PR#6203: Constant exception constructor no longer allocate - PR#6311: Improve signature mismatch error messages - PR#6345: Better compilation of optional arguments with default values +- PR#6260: Unnecessary boxing in let (patch by vbrankov) Runtime system: - Fixed a major performance problem on large heaps (~1GB) by making heap diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml index 1ffb1ec7f..b71238487 100644 --- a/asmcomp/cmmgen.ml +++ b/asmcomp/cmmgen.ml @@ -1150,7 +1150,7 @@ type unboxed_number_kind = | Boxed_float | Boxed_integer of boxed_integer -let is_unboxed_number = function +let rec is_unboxed_number = function Uconst(Uconst_ref(_, Uconst_float _)) -> Boxed_float | Uprim(p, _, _) -> @@ -1192,6 +1192,7 @@ let is_unboxed_number = function | Pbbswap bi -> Boxed_integer bi | _ -> No_unboxing end + | Ulet (_, _, e) | Usequence (_, e) -> is_unboxed_number e | _ -> No_unboxing let subst_boxed_number unbox_fn boxed_id unboxed_id box_chunk box_offset exp = |