Skip to content

Commit 42d9f19

Browse files
committed
consolidate LabelCst and Label
1 parent f8e4596 commit 42d9f19

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

jscomp/core/lam_compile_external_call.ml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ let ocaml_to_js_eff
100100
| Optional ->
101101
Js_of_lam_option.get_default_undefined_from_optional raw_arg
102102
| Label | Empty -> raw_arg
103-
| LabelCst
104103
| EmptyCst
105104
-> assert false in
106105
match arg_type with
@@ -177,7 +176,7 @@ let assemble_args_no_splice call_loc ffi
177176
| [], _
178177
-> assert (args = []) ; empty_pair
179178
| { arg_label = EmptyCst ; arg_type = Arg_cst cst } :: labels, args
180-
| { arg_label = LabelCst ; arg_type = Arg_cst cst} :: labels, args ->
179+
| { arg_label = Label ; arg_type = Arg_cst cst} :: labels, args ->
181180
let accs, eff = aux labels args in
182181
Lam_compile_const.translate_arg_cst cst :: accs, eff
183182
| {arg_label = Empty | Label | Optional as arg_label ; arg_type } ::labels,
@@ -189,7 +188,7 @@ let assemble_args_no_splice call_loc ffi
189188
append_list acc accs, Ext_list.append new_eff eff
190189
| { arg_label = Empty | Label | Optional ; _ } :: _ , []
191190
-> assert false
192-
| {arg_label = EmptyCst | LabelCst ; _} :: _, _ -> assert false
191+
| {arg_label = EmptyCst ; _} :: _, _ -> assert false
193192
in
194193
let args, eff = aux arg_types args in
195194
args,
@@ -205,7 +204,7 @@ let assemble_args_has_splice call_loc ffi (arg_types : specs) (args : exprs)
205204
match labels, args with
206205
| [] , _ -> assert (args = []); empty_pair
207206
| { arg_label = EmptyCst ; arg_type = Arg_cst cst} :: labels , args
208-
| { arg_label = LabelCst ; arg_type = Arg_cst cst } :: labels , args ->
207+
| { arg_label = Label ; arg_type = Arg_cst cst } :: labels , args ->
209208
let accs, eff = aux labels args in
210209
Lam_compile_const.translate_arg_cst cst :: accs, eff
211210
| ({arg_label = Empty | Label | Optional as arg_label; arg_type }) ::labels,
@@ -222,7 +221,7 @@ let assemble_args_has_splice call_loc ffi (arg_types : specs) (args : exprs)
222221
end
223222
| { arg_label = Empty | Label | Optional ; _ } :: _ , []
224223
-> assert false
225-
| {arg_label = EmptyCst | LabelCst ;_ } :: _, _ -> assert false
224+
| {arg_label = EmptyCst ;_ } :: _, _ -> assert false
226225
in
227226
let args, eff = aux arg_types args in
228227
args,

jscomp/syntax/ast_external_process.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ let handle_attributes
907907
| Labelled s ->
908908
begin match refine_arg_type ~nolabel:false ty with
909909
| new_ty, (Arg_cst _ as arg_type) ->
910-
LabelCst , arg_type, arg_types
910+
Label , arg_type, arg_types
911911
| new_ty, arg_type ->
912912
Label , arg_type,
913913
{param_type with ty = new_ty} :: arg_types

jscomp/syntax/external_arg_spec.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ type cst =
3535

3636
type label_noname =
3737
| Label
38-
| LabelCst
3938
| Empty
4039
| EmptyCst
4140
| Optional

jscomp/syntax/external_arg_spec.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ type attr =
5353

5454
type label_noname =
5555
| Label
56-
| LabelCst
5756
| Empty
5857
| EmptyCst
5958
| Optional

0 commit comments

Comments
 (0)