File tree Expand file tree Collapse file tree 9 files changed +19
-17
lines changed
Expand file tree Collapse file tree 9 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ module S = Js_stmt_make
4040*)
4141
4242(* TODO: check stackoverflow *)
43- let assemble_obj_args (labels : External_arg_spec.t list ) (args : J.expression list )
43+ let assemble_obj_args (labels : External_arg_spec.obj_params ) (args : J.expression list )
4444 : J.block * J.expression =
45- let rec aux (labels : External_arg_spec.t list ) args
45+ let rec aux (labels : External_arg_spec.obj_params ) args
4646 : (Js_op.property_name * E.t ) list * J.expression list * _ =
4747 match labels, args with
4848 | [] , [] -> [] , [] , []
@@ -101,7 +101,7 @@ let assemble_obj_args (labels : External_arg_spec.t list) (args : J.expression
101101 | x ::xs -> E. seq (E. fuse_to_seq x xs) (E. obj map)
102102 end ) ::
103103 (Ext_list. flat_map assignment (fun
104- ((xlabel : External_arg_spec.t ), (arg : J.expression )) ->
104+ ((xlabel : External_arg_spec.obj_param ), (arg : J.expression )) ->
105105 match xlabel with
106106 | {arg_label = Optional {name = label } } ->
107107 (* Need make sure whether assignment is effectful or not
Original file line number Diff line number Diff line change 3838 *)
3939
4040val assemble_obj_args :
41- External_arg_spec .t list ->
41+ External_arg_spec .obj_params ->
4242 J .expression list ->
4343 J .block * J .expression
4444(* It returns a block in cases we need set the property dynamically: we need
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ type t =
4949 { prim_name : string ;
5050 arg_types : External_arg_spec .params ;
5151 ffi : External_ffi_types .external_spec }
52- | Pjs_object_create of External_arg_spec .t list
52+ | Pjs_object_create of External_arg_spec .obj_params
5353 (* Exceptions *)
5454 | Praise
5555 (* Boolean operations *)
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ type t =
4848 { prim_name : string ;
4949 arg_types : External_arg_spec .params ;
5050 ffi : External_ffi_types .external_spec }
51- | Pjs_object_create of External_arg_spec. t list
51+ | Pjs_object_create of External_arg_spec. obj_params
5252
5353 | Praise
5454 | Psequand | Psequor | Pnot
Original file line number Diff line number Diff line change @@ -963,7 +963,7 @@ let handle_attributes_as_string
963963
964964let pval_prim_of_labels (labels : string Asttypes.loc list ) =
965965 let arg_kinds =
966- Ext_list. fold_right labels ([] : External_arg_spec.t list )
966+ Ext_list. fold_right labels ([] : External_arg_spec.obj_params )
967967 (fun {loc ; txt } arg_kinds
968968 ->
969969 let arg_label =
Original file line number Diff line number Diff line change @@ -57,20 +57,20 @@ type attr =
5757 | Ignore
5858 | Unwrap
5959
60- type t_noname = {
60+ type param = {
6161 arg_type : attr ;
6262 arg_label : label_noname
6363}
6464
65- type t =
65+ type obj_param =
6666 {
6767 arg_type : attr ;
6868 arg_label : label
6969 }
7070
7171
72-
73- type params = t_noname list
72+ type obj_params = obj_param list
73+ type params = param list
7474
7575exception Error of Location. t * Ext_json_parse. error
7676
Original file line number Diff line number Diff line change @@ -56,17 +56,19 @@ type label_noname =
5656 | Arg_empty
5757 | Arg_optional
5858
59- type t =
59+ type obj_param =
6060 {
6161 arg_type : attr ;
6262 arg_label :label
6363 }
6464
65- type t_noname = {
65+ type param = {
6666 arg_type : attr ;
6767 arg_label : label_noname
6868}
69- type params = t_noname list
69+
70+ type obj_params = obj_param list
71+ type params = param list
7072
7173val cst_json : Location .t -> string -> cst
7274val cst_int : int -> cst
@@ -76,4 +78,4 @@ val empty_label : label
7678val empty_lit : cst -> label
7779val label : string -> cst option -> label
7880val optional : string -> label
79- val empty_kind : attr -> t
81+ val empty_kind : attr -> obj_param
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ type t =
126126 [return] means return value is unit or not,
127127 [true] means is [unit]
128128 *)
129- | Ffi_obj_create of External_arg_spec .t list
129+ | Ffi_obj_create of External_arg_spec .obj_params
130130 | Ffi_inline_const of Lam_constant .t
131131 | Ffi_normal
132132 (* When it's normal, it is handled as normal c functional ffi call *)
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ type t =
105105 External_arg_spec .params *
106106 return_wrapper *
107107 external_spec
108- | Ffi_obj_create of External_arg_spec .t list
108+ | Ffi_obj_create of External_arg_spec .obj_params
109109 | Ffi_inline_const of Lam_constant .t
110110 | Ffi_normal
111111 (* When it's normal, it is handled as normal c functional ffi call *)
You can’t perform that action at this time.
0 commit comments