Skip to content

Commit 5106317

Browse files
authored
flambda-backend: Minor fix for "lazy" compilation in Matching with Flambda 2 (ocaml#110)
1 parent dba922b commit 5106317

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lambda/matching.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,9 @@ let inline_lazy_force arg loc =
19041904
ap_specialised = Default_specialise;
19051905
ap_probe=None;
19061906
}
1907-
else if !Clflags.native_code then
1907+
else if !Clflags.native_code && not (Clflags.is_flambda2 ()) then
1908+
(* CR vlaviron: Find a way for Flambda 2 to avoid both the call to
1909+
caml_obj_tag and the switch on arbitrary tags *)
19081910
(* Lswitch generates compact and efficient native code *)
19091911
inline_lazy_force_switch arg loc
19101912
else

0 commit comments

Comments
 (0)