File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -2880,12 +2880,12 @@ let maybe_reset_current_region ~dbg ~body_tail ~body_nontail old_region =
28802880 Any )
28812881
28822882let apply_or_call_caml_apply result arity mut clos args pos mode dbg =
2883- match args with
2884- | [arg ] ->
2883+ match arity with
2884+ | [_ ] ->
28852885 bind " fun" clos (fun clos ->
28862886 Cop
28872887 ( Capply (Extended_machtype. to_machtype result, pos),
2888- [ get_field_codepointer mut clos 0 dbg; arg; clos],
2888+ ( get_field_codepointer mut clos 0 dbg :: args) @ [ clos],
28892889 dbg ))
28902890 | _ -> call_caml_apply result arity mut clos args pos mode dbg
28912891
@@ -4250,10 +4250,12 @@ let indirect_call ~dbg ty pos alloc_mode f args_type args =
42504250 might_split_call_caml_apply ty args_type Asttypes. Mutable f args pos
42514251 alloc_mode dbg
42524252
4253- let indirect_full_call ~dbg ty pos alloc_mode f args_type = function
4253+ let indirect_full_call ~dbg ty pos alloc_mode f args_type args =
4254+ match args_type with
42544255 (* the single-argument case is already optimized by indirect_call *)
4255- | [_] as args -> indirect_call ~dbg ty pos alloc_mode f args_type args
4256- | args ->
4256+ | [_] -> indirect_call ~dbg ty pos alloc_mode f args_type args
4257+ | [] -> Misc. fatal_error " indirect_full_call: args_type was empty"
4258+ | _ :: _ :: _ ->
42574259 (* Use a variable to avoid duplicating the cmm code of the closure [f]. *)
42584260 let v = Backend_var. create_local " *closure*" in
42594261 let v' = Backend_var.With_provenance. create v in
You can’t perform that action at this time.
0 commit comments