Skip to content

Commit 40ce3f4

Browse files
committed
Remove unused code
1 parent 6187989 commit 40ce3f4

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

jscomp/core/lam_compile_env.ml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,19 +224,6 @@ let get_package_path_from_cmj
224224
let add = Lam_module_ident.Hash_set.add
225225

226226

227-
228-
(* let is_pure_module (id : Lam_module_ident.t) =
229-
match id.kind with
230-
| Runtime -> true
231-
| External _ -> false
232-
| Ml ->
233-
match Lam_module_ident.Hash.find_opt cached_tbl id with
234-
| Some (Visit {cmj_table = {pure}}) -> pure
235-
| Some _ -> assert false
236-
| None -> *)
237-
238-
239-
240227
(* Conservative interface *)
241228
let is_pure_module (id : Lam_module_ident.t) =
242229
id.kind = Runtime ||

jscomp/core/lam_compile_env.mli

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ val query_external_id_info :
9696
string ->
9797
ident_info
9898

99-
val query_and_add_if_not_exist :
100-
Lam_module_ident.t ->
101-
found:(bool -> 'b) ->
102-
'b
10399

104100
val is_pure_module : Lam_module_ident.t -> bool
105101

jscomp/core/lam_stats_export.ml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,9 @@ let get_dependent_module_effect
107107
(external_ids : Lam_module_ident.t list) =
108108
if maybe_pure = None then
109109
let non_pure_module =
110-
Ext_list.find_first_not external_ids
111-
(fun id ->
112-
id.kind = Runtime ||
113-
Lam_compile_env.query_and_add_if_not_exist id
114-
~found:(fun pure -> pure)
115-
) in
110+
Ext_list.find_first_not external_ids
111+
Lam_compile_env.is_pure_module
112+
in
116113
Ext_option.map non_pure_module (fun x -> Lam_module_ident.name x)
117114
else
118115
maybe_pure

0 commit comments

Comments
 (0)