Skip to content

Commit 5dd9c92

Browse files
committed
tweak names to query_external_id_info
1 parent bfd2553 commit 5dd9c92

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

jscomp/core/lam_arity_analysis.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ let rec get_arity (meta : Lam_stats.t) (lam : Lam.t) : Lam_arity.t =
4646
| Llet(_,_,_, l ) -> get_arity meta l
4747
| Lprim {primitive = Pfield (_, Fld_module fld_name);
4848
args = [ Lglobal_module id ]; _} ->
49-
begin match (Lam_compile_env.cached_find_ml_id_pos id fld_name).arity with
49+
begin match (Lam_compile_env.query_external_id_info id fld_name).arity with
5050
| Single x -> x
5151
| Submodule _ -> Lam_arity.na
5252
end
5353
| Lprim {primitive = Pfield (m,_);
5454
args = [ Lprim{primitive = Pfield(n,Fld_module fld_name);
5555
args = [ Lglobal_module id]} ]
5656
; _} ->
57-
begin match (Lam_compile_env.cached_find_ml_id_pos id fld_name ).arity with
57+
begin match (Lam_compile_env.query_external_id_info id fld_name ).arity with
5858
| Submodule subs -> subs.(m) (* TODO: shall we store it as array?*)
5959
| Single _ -> Lam_arity.na
6060
end

jscomp/core/lam_compile.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ let rec
127127
(id : Ident.t)
128128
pos
129129
: Js_output.t =
130-
match Lam_compile_env.cached_find_ml_id_pos id pos with
130+
match Lam_compile_env.query_external_id_info id pos with
131131
| { closed_lambda = Some lam}
132132
when Lam_util.not_function lam
133133
->
@@ -171,7 +171,7 @@ and compile_external_field_apply
171171
(lambda_cxt : Lam_compile_context.t): Js_output.t =
172172

173173
let ident_info =
174-
Lam_compile_env.cached_find_ml_id_pos id pos in
174+
Lam_compile_env.query_external_id_info id pos in
175175
let args_code, args =
176176
let dummy = [], [] in
177177
if args_lambda = [] then dummy

jscomp/core/lam_compile_env.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ let add_js_module
119119

120120

121121

122-
let cached_find_ml_id_pos (module_id : Ident.t) name : ident_info =
122+
let query_external_id_info (module_id : Ident.t) (name : string) : ident_info =
123123
let oid = Lam_module_ident.of_ml module_id in
124124
let cmj_table =
125125
match Lam_module_ident.Hash.find_opt cached_tbl oid with

jscomp/core/lam_compile_env.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ val add_js_module :
8888
pay attention to for those modules are actually used or not
8989
*)
9090
(**
91-
[cached_find_ml_id_pos id pos env found]
91+
[query_external_id_info id pos env found]
9292
will raise if not found
9393
*)
94-
val cached_find_ml_id_pos :
94+
val query_external_id_info :
9595
Ident.t ->
9696
string ->
9797
ident_info

jscomp/core/lam_pass_remove_alias.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ let simplify_alias
155155
_} as l1;
156156
args; loc ; status} ->
157157
begin
158-
match Lam_compile_env.cached_find_ml_id_pos ident fld_name with
158+
match Lam_compile_env.query_external_id_info ident fld_name with
159159
| {closed_lambda=Some Lfunction{params; body; _} }
160160
(** be more cautious when do cross module inlining *)
161161
when

lib/4.02.3/unstable/js_compiler.ml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96544,10 +96544,10 @@ val add_js_module :
9654496544
pay attention to for those modules are actually used or not
9654596545
*)
9654696546
(**
96547-
[cached_find_ml_id_pos id pos env found]
96547+
[query_external_id_info id pos env found]
9654896548
will raise if not found
9654996549
*)
96550-
val cached_find_ml_id_pos :
96550+
val query_external_id_info :
9655196551
Ident.t ->
9655296552
string ->
9655396553
ident_info
@@ -96699,7 +96699,7 @@ let add_js_module
9669996699

9670096700

9670196701

96702-
let cached_find_ml_id_pos (module_id : Ident.t) name : ident_info =
96702+
let query_external_id_info (module_id : Ident.t) (name : string) : ident_info =
9670396703
let oid = Lam_module_ident.of_ml module_id in
9670496704
let cmj_table =
9670596705
match Lam_module_ident.Hash.find_opt cached_tbl oid with
@@ -101111,15 +101111,15 @@ let rec get_arity (meta : Lam_stats.t) (lam : Lam.t) : Lam_arity.t =
101111101111
| Llet(_,_,_, l ) -> get_arity meta l
101112101112
| Lprim {primitive = Pfield (_, Fld_module fld_name);
101113101113
args = [ Lglobal_module id ]; _} ->
101114-
begin match (Lam_compile_env.cached_find_ml_id_pos id fld_name).arity with
101114+
begin match (Lam_compile_env.query_external_id_info id fld_name).arity with
101115101115
| Single x -> x
101116101116
| Submodule _ -> Lam_arity.na
101117101117
end
101118101118
| Lprim {primitive = Pfield (m,_);
101119101119
args = [ Lprim{primitive = Pfield(n,Fld_module fld_name);
101120101120
args = [ Lglobal_module id]} ]
101121101121
; _} ->
101122-
begin match (Lam_compile_env.cached_find_ml_id_pos id fld_name ).arity with
101122+
begin match (Lam_compile_env.query_external_id_info id fld_name ).arity with
101123101123
| Submodule subs -> subs.(m) (* TODO: shall we store it as array?*)
101124101124
| Single _ -> Lam_arity.na
101125101125
end
@@ -110737,7 +110737,7 @@ let rec
110737110737
(id : Ident.t)
110738110738
pos
110739110739
: Js_output.t =
110740-
match Lam_compile_env.cached_find_ml_id_pos id pos with
110740+
match Lam_compile_env.query_external_id_info id pos with
110741110741
| { closed_lambda = Some lam}
110742110742
when Lam_util.not_function lam
110743110743
->
@@ -110781,7 +110781,7 @@ and compile_external_field_apply
110781110781
(lambda_cxt : Lam_compile_context.t): Js_output.t =
110782110782

110783110783
let ident_info =
110784-
Lam_compile_env.cached_find_ml_id_pos id pos in
110784+
Lam_compile_env.query_external_id_info id pos in
110785110785
let args_code, args =
110786110786
let dummy = [], [] in
110787110787
if args_lambda = [] then dummy
@@ -115773,7 +115773,7 @@ let simplify_alias
115773115773
_} as l1;
115774115774
args; loc ; status} ->
115775115775
begin
115776-
match Lam_compile_env.cached_find_ml_id_pos ident fld_name with
115776+
match Lam_compile_env.query_external_id_info ident fld_name with
115777115777
| {closed_lambda=Some Lfunction{params; body; _} }
115778115778
(** be more cautious when do cross module inlining *)
115779115779
when

lib/4.02.3/whole_compiler.ml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84065,10 +84065,10 @@ val add_js_module :
8406584065
pay attention to for those modules are actually used or not
8406684066
*)
8406784067
(**
84068-
[cached_find_ml_id_pos id pos env found]
84068+
[query_external_id_info id pos env found]
8406984069
will raise if not found
8407084070
*)
84071-
val cached_find_ml_id_pos :
84071+
val query_external_id_info :
8407284072
Ident.t ->
8407384073
string ->
8407484074
ident_info
@@ -84220,7 +84220,7 @@ let add_js_module
8422084220

8422184221

8422284222

84223-
let cached_find_ml_id_pos (module_id : Ident.t) name : ident_info =
84223+
let query_external_id_info (module_id : Ident.t) (name : string) : ident_info =
8422484224
let oid = Lam_module_ident.of_ml module_id in
8422584225
let cmj_table =
8422684226
match Lam_module_ident.Hash.find_opt cached_tbl oid with
@@ -91740,15 +91740,15 @@ let rec get_arity (meta : Lam_stats.t) (lam : Lam.t) : Lam_arity.t =
9174091740
| Llet(_,_,_, l ) -> get_arity meta l
9174191741
| Lprim {primitive = Pfield (_, Fld_module fld_name);
9174291742
args = [ Lglobal_module id ]; _} ->
91743-
begin match (Lam_compile_env.cached_find_ml_id_pos id fld_name).arity with
91743+
begin match (Lam_compile_env.query_external_id_info id fld_name).arity with
9174491744
| Single x -> x
9174591745
| Submodule _ -> Lam_arity.na
9174691746
end
9174791747
| Lprim {primitive = Pfield (m,_);
9174891748
args = [ Lprim{primitive = Pfield(n,Fld_module fld_name);
9174991749
args = [ Lglobal_module id]} ]
9175091750
; _} ->
91751-
begin match (Lam_compile_env.cached_find_ml_id_pos id fld_name ).arity with
91751+
begin match (Lam_compile_env.query_external_id_info id fld_name ).arity with
9175291752
| Submodule subs -> subs.(m) (* TODO: shall we store it as array?*)
9175391753
| Single _ -> Lam_arity.na
9175491754
end
@@ -101851,7 +101851,7 @@ let rec
101851101851
(id : Ident.t)
101852101852
pos
101853101853
: Js_output.t =
101854-
match Lam_compile_env.cached_find_ml_id_pos id pos with
101854+
match Lam_compile_env.query_external_id_info id pos with
101855101855
| { closed_lambda = Some lam}
101856101856
when Lam_util.not_function lam
101857101857
->
@@ -101895,7 +101895,7 @@ and compile_external_field_apply
101895101895
(lambda_cxt : Lam_compile_context.t): Js_output.t =
101896101896

101897101897
let ident_info =
101898-
Lam_compile_env.cached_find_ml_id_pos id pos in
101898+
Lam_compile_env.query_external_id_info id pos in
101899101899
let args_code, args =
101900101900
let dummy = [], [] in
101901101901
if args_lambda = [] then dummy
@@ -113482,7 +113482,7 @@ let simplify_alias
113482113482
_} as l1;
113483113483
args; loc ; status} ->
113484113484
begin
113485-
match Lam_compile_env.cached_find_ml_id_pos ident fld_name with
113485+
match Lam_compile_env.query_external_id_info ident fld_name with
113486113486
| {closed_lambda=Some Lfunction{params; body; _} }
113487113487
(** be more cautious when do cross module inlining *)
113488113488
when

0 commit comments

Comments
 (0)