@@ -932,8 +932,7 @@ and apply_cont env e =
932
932
let args = Apply_cont_expr. args e in
933
933
if Continuation. is_exn k then
934
934
apply_cont_exn env e k args
935
- else if Continuation. equal (Env. return_cont env) k
936
- && Apply_cont_expr. trap_action e = None then
935
+ else if Continuation. equal (Env. return_cont env) k then
937
936
apply_cont_ret env e k args
938
937
else
939
938
apply_cont_regular env e k args
@@ -1435,8 +1434,6 @@ let function_flags () =
1435
1434
let function_decl offsets used_closure_vars fun_name _ d =
1436
1435
Profile. record_call ~accumulate: true fun_name (fun () ->
1437
1436
let fun_dbg = Function_declaration. dbg d in
1438
- let result_arity = Function_declaration. result_arity d in
1439
- let ret_machtype = machtype_of_return_arity result_arity in
1440
1437
let p = Function_declaration. params_and_body d in
1441
1438
Function_params_and_body. pattern_match p
1442
1439
~f: (fun ~return_continuation :k k_exn vars ~body ~my_closure ->
@@ -1446,22 +1443,9 @@ let function_decl offsets used_closure_vars fun_name _ d =
1446
1443
(* Init the env and create a jump id for the ret closure
1447
1444
in case a trap action is attached to one of tis call *)
1448
1445
let env = Env. mk offsets k k_exn used_closure_vars in
1449
- let id, env = Env. add_jump_cont env [ret_machtype] k in
1450
- let fun_handle_var = Backend_var. create_local " *fun_res*" in
1451
- let fun_handler = C. var fun_handle_var in
1452
- let fun_handle_vars = [
1453
- Backend_var.With_provenance. create fun_handle_var,
1454
- ret_machtype
1455
- ] in
1456
- (* translate the arg list and body, inserting a catch for the
1457
- return continuation. *)
1446
+ (* translate the arg list and body *)
1458
1447
let env, fun_args = var_list env args in
1459
- let fun_body =
1460
- C. ccatch
1461
- ~rec_flag: false
1462
- ~body: (expr env body)
1463
- ~handlers: [C. handler id fun_handle_vars fun_handler]
1464
- in
1448
+ let fun_body = expr env body in
1465
1449
let fun_flags = function_flags () in
1466
1450
C. fundecl fun_name fun_args fun_body fun_flags fun_dbg
1467
1451
with Misc. Fatal_error ->
0 commit comments