@@ -575,19 +575,7 @@ let dissect_letrec ~bindings ~body =
575
575
id, Lprim (Pccall desc, [size], Loc_unknown ))
576
576
letrec.blocks
577
577
in
578
- let real_body = body in
579
- let bound_ids_freshening =
580
- List. map (fun (bound_id , _ ) -> bound_id, Ident. rename bound_id) bindings
581
- |> Ident.Map. of_list
582
- in
583
- let cont = next_raise_count () in
584
- let body =
585
- if not letrec.needs_region
586
- then body
587
- else
588
- let args = List. map (fun (bound_id , _ ) -> Lvar bound_id) bindings in
589
- Lstaticraise (cont, args)
590
- in
578
+ let body = if not letrec.needs_region then body else Lexclave body in
591
579
let effects_then_body = lsequence (letrec.effects, body) in
592
580
let functions =
593
581
match letrec.functions with
@@ -617,19 +605,7 @@ let dissect_letrec ~bindings ~body =
617
605
body ))
618
606
with_preallocations letrec.consts
619
607
in
620
- let substituted = Lambda. rename letrec.substitution with_constants in
621
- let body_layout = Lambda. layout_top in
622
- if not letrec.needs_region
623
- then substituted
624
- else
625
- Lstaticcatch
626
- ( Lregion (Lambda. rename bound_ids_freshening substituted, body_layout),
627
- ( cont,
628
- List. map
629
- (fun (bound_id , _ ) -> bound_id, Lambda. layout_letrec)
630
- bindings ),
631
- real_body,
632
- body_layout )
608
+ Lambda. rename letrec.substitution with_constants
633
609
634
610
type dissected =
635
611
| Dissected of Lambda .lambda
0 commit comments