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 =
2880
2880
Any )
2881
2881
2882
2882
let apply_or_call_caml_apply result arity mut clos args pos mode dbg =
2883
- match args with
2884
- | [arg ] ->
2883
+ match arity with
2884
+ | [_ ] ->
2885
2885
bind " fun" clos (fun clos ->
2886
2886
Cop
2887
2887
( 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],
2889
2889
dbg ))
2890
2890
| _ -> call_caml_apply result arity mut clos args pos mode dbg
2891
2891
@@ -4250,10 +4250,12 @@ let indirect_call ~dbg ty pos alloc_mode f args_type args =
4250
4250
might_split_call_caml_apply ty args_type Asttypes. Mutable f args pos
4251
4251
alloc_mode dbg
4252
4252
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
4254
4255
(* 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
+ | _ :: _ :: _ ->
4257
4259
(* Use a variable to avoid duplicating the cmm code of the closure [f]. *)
4258
4260
let v = Backend_var. create_local " *closure*" in
4259
4261
let v' = Backend_var.With_provenance. create v in
You can’t perform that action at this time.
0 commit comments