@@ -1208,7 +1208,7 @@ let apply_function_sym arity result mode =
1208
1208
Compilenv. need_apply_fun arity result mode;
1209
1209
global_symbol (apply_function_name arity result mode)
1210
1210
1211
- let curry_function_sym function_kind arity result =
1211
+ let curry_function_sym_name function_kind arity result =
1212
1212
match function_kind with
1213
1213
| Lambda. Curried { nlocal } ->
1214
1214
Compilenv. need_curry_fun function_kind arity result;
@@ -1233,6 +1233,11 @@ let curry_function_sym function_kind arity result =
1233
1233
^
1234
1234
match result with [| Val |] -> " " | _ -> " _R" ^ machtype_identifier result)
1235
1235
1236
+ let curry_function_sym function_kind arity result =
1237
+ { sym_name = curry_function_sym_name function_kind arity result;
1238
+ sym_global = Global
1239
+ }
1240
+
1236
1241
(* Big arrays *)
1237
1242
1238
1243
let bigarray_elt_size_in_bytes : Lambda.bigarray_kind -> int = function
@@ -2809,7 +2814,7 @@ let final_curry_function nlocal arity result =
2809
2814
let narity = List. length arity in
2810
2815
let fun_name =
2811
2816
global_symbol
2812
- (curry_function_sym (Lambda. Curried { nlocal }) arity result
2817
+ (curry_function_sym_name (Lambda. Curried { nlocal }) arity result
2813
2818
^ " _"
2814
2819
^ Int. to_string (narity - 1 ))
2815
2820
in
@@ -2828,7 +2833,9 @@ let final_curry_function nlocal arity result =
2828
2833
}
2829
2834
2830
2835
let intermediate_curry_functions ~nlocal ~arity result =
2831
- let name1 = curry_function_sym (Lambda. Curried { nlocal }) arity result in
2836
+ let name1 =
2837
+ curry_function_sym_name (Lambda. Curried { nlocal }) arity result
2838
+ in
2832
2839
let narity = List. length arity in
2833
2840
let dbg = placeholder_dbg in
2834
2841
let rec loop accumulated_args remaining_args num =
@@ -3756,9 +3763,8 @@ let emit_constant_closure symb fundecls clos_vars cont =
3756
3763
in
3757
3764
(Cint (infix_header pos) :: closure_symbol f2)
3758
3765
@ Csymbol_address
3759
- (global_symbol
3760
- (curry_function_sym arity.function_kind params_machtypes
3761
- return_machtype))
3766
+ (curry_function_sym arity.function_kind params_machtypes
3767
+ return_machtype)
3762
3768
:: Cint (closure_info ~arity ~startenv: (startenv - pos) ~is_last )
3763
3769
:: Csymbol_address
3764
3770
{ sym_name = f2.label; sym_global = symb.sym_global }
@@ -3776,11 +3782,10 @@ let emit_constant_closure symb fundecls clos_vars cont =
3776
3782
:: emit_others 3 remainder
3777
3783
| arity ->
3778
3784
Csymbol_address
3779
- (global_symbol
3780
- (curry_function_sym arity.function_kind
3781
- (List. map machtype_of_layout_changing_tagged_int_to_val
3782
- arity.params_layout)
3783
- (machtype_of_layout_changing_tagged_int_to_val arity.return_layout)))
3785
+ (curry_function_sym arity.function_kind
3786
+ (List. map machtype_of_layout_changing_tagged_int_to_val
3787
+ arity.params_layout)
3788
+ (machtype_of_layout_changing_tagged_int_to_val arity.return_layout))
3784
3789
:: Cint (closure_info ~arity ~startenv ~is_last )
3785
3790
:: Csymbol_address { sym_name = f1.label; sym_global = symb.sym_global }
3786
3791
:: emit_others 4 remainder)
@@ -3844,7 +3849,7 @@ let unit ~dbg = Cconst_int (1, dbg)
3844
3849
3845
3850
let var v = Cvar v
3846
3851
3847
- let symbol_from_string ~dbg sym = Cconst_symbol (global_symbol sym, dbg)
3852
+ let symbol ~dbg sym = Cconst_symbol (sym, dbg)
3848
3853
3849
3854
let float ~dbg f = Cconst_float (f, dbg)
3850
3855
@@ -4136,7 +4141,7 @@ let gc_root_table syms =
4136
4141
let table_symbol = make_symbol ?compilation_unit:None " gc_roots" in
4137
4142
cdata
4138
4143
(define_symbol { sym_name = table_symbol; sym_global = Global }
4139
- @ List. map ( fun s -> symbol_address (global_symbol s)) syms
4144
+ @ List. map symbol_address syms
4140
4145
@ [cint 0n ])
4141
4146
4142
4147
let cmm_arith_size (e : Cmm.expression ) =
0 commit comments