Skip to content

Commit 615629b

Browse files
committed
remove loc which is unused
1 parent 81085f4 commit 615629b

File tree

5 files changed

+12
-18
lines changed

5 files changed

+12
-18
lines changed

jscomp/core/lam_convert.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
701701

702702
| "#fn_mk" -> Pjs_fn_make (Ext_pervasives.nat_of_string_exn p.prim_native_name)
703703
| "#fn_method" -> Pjs_fn_method
704-
| "#unsafe_downgrade" -> Pjs_unsafe_downgrade {name = Ext_string.empty; loc ; setter = false}
704+
| "#unsafe_downgrade" -> Pjs_unsafe_downgrade {name = Ext_string.empty; setter = false}
705705
| _ -> Location.raise_errorf ~loc
706706
"@{<error>Error:@} internal error, using unrecognized primitive %s" s
707707
in
@@ -819,7 +819,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
819819
| Lsend (kind, _,b,ls, _loc) ->
820820
(* Format.fprintf Format.err_formatter "%a@." Printlambda.lambda b ; *)
821821
(match convert_aux b with
822-
| Lprim {primitive = Pjs_unsafe_downgrade {loc}; args}
822+
| Lprim {primitive = Pjs_unsafe_downgrade _; args;loc}
823823
->
824824
begin match kind, ls with
825825
| Public (Some name), [] ->
@@ -830,7 +830,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
830830
(String.sub name 0
831831
(String.length name - Literals.setter_suffix_len))
832832
else Lam_methname.translate name in
833-
prim ~primitive:(Pjs_unsafe_downgrade {name = property;loc; setter})
833+
prim ~primitive:(Pjs_unsafe_downgrade {name = property; setter})
834834
~args loc
835835
| _ -> assert false
836836
end

jscomp/core/lam_primitive.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ type t =
115115
{
116116
name : string ;
117117
setter : bool;
118-
loc : Location.t;
119118
}
120119
| Pinit_mod
121120
| Pupdate_mod
@@ -280,7 +279,7 @@ let eq_primitive_approx ( lhs : t) (rhs : t) =
280279
| Pasrint64 -> rhs = Pasrint64
281280
| Pint64comp ( comparison) -> (match rhs with Pint64comp(comparison1) -> Lam_compat.eq_comparison comparison comparison1 | _ -> false)
282281
| Pctconst compile_time_constant -> (match rhs with Pctconst compile_time_constant1 -> Lam_compat.eq_compile_time_constant compile_time_constant compile_time_constant1 | _ -> false)
283-
| Pjs_unsafe_downgrade {name; loc=_; setter } -> (match rhs with Pjs_unsafe_downgrade rhs -> name = rhs.name && setter = rhs.setter | _ -> false)
282+
| Pjs_unsafe_downgrade {name; setter } -> (match rhs with Pjs_unsafe_downgrade rhs -> name = rhs.name && setter = rhs.setter | _ -> false)
284283
| Pjs_fn_make i -> (match rhs with Pjs_fn_make i1 -> i = i1 | _ -> false)
285284
| Pvoid_run -> rhs = Pvoid_run
286285
| Pfull_apply -> rhs = Pfull_apply

jscomp/core/lam_primitive.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ type t =
112112
{
113113
name : string ;
114114
setter : bool;
115-
loc : Location.t;
116115
}
117116
| Pinit_mod
118117
| Pupdate_mod

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95427,7 +95427,6 @@ type t =
9542795427
{
9542895428
name : string ;
9542995429
setter : bool;
95430-
loc : Location.t;
9543195430
}
9543295431
| Pinit_mod
9543395432
| Pupdate_mod
@@ -95580,7 +95579,6 @@ type t =
9558095579
{
9558195580
name : string ;
9558295581
setter : bool;
95583-
loc : Location.t;
9558495582
}
9558595583
| Pinit_mod
9558695584
| Pupdate_mod
@@ -95745,7 +95743,7 @@ let eq_primitive_approx ( lhs : t) (rhs : t) =
9574595743
| Pasrint64 -> rhs = Pasrint64
9574695744
| Pint64comp ( comparison) -> (match rhs with Pint64comp(comparison1) -> Lam_compat.eq_comparison comparison comparison1 | _ -> false)
9574795745
| Pctconst compile_time_constant -> (match rhs with Pctconst compile_time_constant1 -> Lam_compat.eq_compile_time_constant compile_time_constant compile_time_constant1 | _ -> false)
95748-
| Pjs_unsafe_downgrade {name; loc=_; setter } -> (match rhs with Pjs_unsafe_downgrade rhs -> name = rhs.name && setter = rhs.setter | _ -> false)
95746+
| Pjs_unsafe_downgrade {name; setter } -> (match rhs with Pjs_unsafe_downgrade rhs -> name = rhs.name && setter = rhs.setter | _ -> false)
9574995747
| Pjs_fn_make i -> (match rhs with Pjs_fn_make i1 -> i = i1 | _ -> false)
9575095748
| Pvoid_run -> rhs = Pvoid_run
9575195749
| Pfull_apply -> rhs = Pfull_apply
@@ -395027,7 +395025,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
395027395025

395028395026
| "#fn_mk" -> Pjs_fn_make (Ext_pervasives.nat_of_string_exn p.prim_native_name)
395029395027
| "#fn_method" -> Pjs_fn_method
395030-
| "#unsafe_downgrade" -> Pjs_unsafe_downgrade {name = Ext_string.empty; loc ; setter = false}
395028+
| "#unsafe_downgrade" -> Pjs_unsafe_downgrade {name = Ext_string.empty; setter = false}
395031395029
| _ -> Location.raise_errorf ~loc
395032395030
"@{<error>Error:@} internal error, using unrecognized primitive %s" s
395033395031
in
@@ -395145,7 +395143,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
395145395143
| Lsend (kind, _,b,ls, _loc) ->
395146395144
(* Format.fprintf Format.err_formatter "%a@." Printlambda.lambda b ; *)
395147395145
(match convert_aux b with
395148-
| Lprim {primitive = Pjs_unsafe_downgrade {loc}; args}
395146+
| Lprim {primitive = Pjs_unsafe_downgrade _; args;loc}
395149395147
->
395150395148
begin match kind, ls with
395151395149
| Public (Some name), [] ->
@@ -395156,7 +395154,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
395156395154
(String.sub name 0
395157395155
(String.length name - Literals.setter_suffix_len))
395158395156
else Lam_methname.translate name in
395159-
prim ~primitive:(Pjs_unsafe_downgrade {name = property;loc; setter})
395157+
prim ~primitive:(Pjs_unsafe_downgrade {name = property; setter})
395160395158
~args loc
395161395159
| _ -> assert false
395162395160
end

lib/4.06.1/whole_compiler.ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370794,7 +370794,6 @@ type t =
370794370794
{
370795370795
name : string ;
370796370796
setter : bool;
370797-
loc : Location.t;
370798370797
}
370799370798
| Pinit_mod
370800370799
| Pupdate_mod
@@ -370947,7 +370946,6 @@ type t =
370947370946
{
370948370947
name : string ;
370949370948
setter : bool;
370950-
loc : Location.t;
370951370949
}
370952370950
| Pinit_mod
370953370951
| Pupdate_mod
@@ -371112,7 +371110,7 @@ let eq_primitive_approx ( lhs : t) (rhs : t) =
371112371110
| Pasrint64 -> rhs = Pasrint64
371113371111
| Pint64comp ( comparison) -> (match rhs with Pint64comp(comparison1) -> Lam_compat.eq_comparison comparison comparison1 | _ -> false)
371114371112
| Pctconst compile_time_constant -> (match rhs with Pctconst compile_time_constant1 -> Lam_compat.eq_compile_time_constant compile_time_constant compile_time_constant1 | _ -> false)
371115-
| Pjs_unsafe_downgrade {name; loc=_; setter } -> (match rhs with Pjs_unsafe_downgrade rhs -> name = rhs.name && setter = rhs.setter | _ -> false)
371113+
| Pjs_unsafe_downgrade {name; setter } -> (match rhs with Pjs_unsafe_downgrade rhs -> name = rhs.name && setter = rhs.setter | _ -> false)
371116371114
| Pjs_fn_make i -> (match rhs with Pjs_fn_make i1 -> i = i1 | _ -> false)
371117371115
| Pvoid_run -> rhs = Pvoid_run
371118371116
| Pfull_apply -> rhs = Pfull_apply
@@ -398097,7 +398095,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
398097398095

398098398096
| "#fn_mk" -> Pjs_fn_make (Ext_pervasives.nat_of_string_exn p.prim_native_name)
398099398097
| "#fn_method" -> Pjs_fn_method
398100-
| "#unsafe_downgrade" -> Pjs_unsafe_downgrade {name = Ext_string.empty; loc ; setter = false}
398098+
| "#unsafe_downgrade" -> Pjs_unsafe_downgrade {name = Ext_string.empty; setter = false}
398101398099
| _ -> Location.raise_errorf ~loc
398102398100
"@{<error>Error:@} internal error, using unrecognized primitive %s" s
398103398101
in
@@ -398215,7 +398213,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
398215398213
| Lsend (kind, _,b,ls, _loc) ->
398216398214
(* Format.fprintf Format.err_formatter "%a@." Printlambda.lambda b ; *)
398217398215
(match convert_aux b with
398218-
| Lprim {primitive = Pjs_unsafe_downgrade {loc}; args}
398216+
| Lprim {primitive = Pjs_unsafe_downgrade _; args;loc}
398219398217
->
398220398218
begin match kind, ls with
398221398219
| Public (Some name), [] ->
@@ -398226,7 +398224,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
398226398224
(String.sub name 0
398227398225
(String.length name - Literals.setter_suffix_len))
398228398226
else Lam_methname.translate name in
398229-
prim ~primitive:(Pjs_unsafe_downgrade {name = property;loc; setter})
398227+
prim ~primitive:(Pjs_unsafe_downgrade {name = property; setter})
398230398228
~args loc
398231398229
| _ -> assert false
398232398230
end

0 commit comments

Comments
 (0)