Skip to content

Commit 607b290

Browse files
committed
Don't forget to add a new region when a region is needed
This still need a layout
1 parent 38c4962 commit 607b290

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

middle_end/flambda2/from_lambda/dissect_letrec.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,11 @@ let dissect_letrec ~bindings ~body =
605605
body ))
606606
with_preallocations letrec.consts
607607
in
608-
Lambda.rename letrec.substitution with_constants
608+
let substituted = Lambda.rename letrec.substitution with_constants in
609+
let body_layout = Lambda.layout_top in
610+
if letrec.needs_region
611+
then Lregion (substituted, body_layout)
612+
else substituted
609613

610614
type dissected =
611615
| Dissected of Lambda.lambda

0 commit comments

Comments
 (0)