Skip to content

Commit e7c20a0

Browse files
committed
snapshot
1 parent 40ce3f4 commit e7c20a0

File tree

2 files changed

+10
-52
lines changed

2 files changed

+10
-52
lines changed

lib/4.02.3/unstable/js_compiler.ml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -96402,10 +96402,6 @@ val query_external_id_info :
9640296402
string ->
9640396403
ident_info
9640496404

96405-
val query_and_add_if_not_exist :
96406-
Lam_module_ident.t ->
96407-
'a t ->
96408-
found:(bool -> 'b) -> 'b
9640996405

9641096406
val is_pure_module : Lam_module_ident.t -> bool
9641196407

@@ -96591,7 +96587,7 @@ type _ t =
9659196587
let query_and_add_if_not_exist
9659296588
(type u)
9659396589
(oid : Lam_module_ident.t)
96594-
(env : u t) ~(found: bool -> _) =
96590+
~(found: bool -> _) =
9659596591
match Lam_module_ident.Hash.find_opt cached_tbl oid with
9659696592
| None ->
9659796593
begin match oid.kind with
@@ -96654,23 +96650,10 @@ let get_package_path_from_cmj
9665496650
let add = Lam_module_ident.Hash_set.add
9665596651

9665696652

96657-
96658-
(* let is_pure_module (id : Lam_module_ident.t) =
96659-
match id.kind with
96660-
| Runtime -> true
96661-
| External _ -> false
96662-
| Ml ->
96663-
match Lam_module_ident.Hash.find_opt cached_tbl id with
96664-
| Some (Visit {cmj_table = {pure}}) -> pure
96665-
| Some _ -> assert false
96666-
| None -> *)
96667-
96668-
96669-
9667096653
(* Conservative interface *)
9667196654
let is_pure_module (id : Lam_module_ident.t) =
9667296655
id.kind = Runtime ||
96673-
query_and_add_if_not_exist id No_env
96656+
query_and_add_if_not_exist id
9667496657
~found:(fun x -> x)
9667596658

9667696659
let get_required_modules
@@ -115889,13 +115872,9 @@ let get_dependent_module_effect
115889115872
(external_ids : Lam_module_ident.t list) =
115890115873
if maybe_pure = None then
115891115874
let non_pure_module =
115892-
Ext_list.find_first_not external_ids
115893-
(fun id ->
115894-
id.kind = Runtime ||
115895-
Lam_compile_env.query_and_add_if_not_exist id
115896-
(Has_env meta.env )
115897-
~found:(fun pure -> pure)
115898-
) in
115875+
Ext_list.find_first_not external_ids
115876+
Lam_compile_env.is_pure_module
115877+
in
115899115878
Ext_option.map non_pure_module (fun x -> Lam_module_ident.name x)
115900115879
else
115901115880
maybe_pure

lib/4.02.3/whole_compiler.ml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -83787,10 +83787,6 @@ val query_external_id_info :
8378783787
string ->
8378883788
ident_info
8378983789

83790-
val query_and_add_if_not_exist :
83791-
Lam_module_ident.t ->
83792-
'a t ->
83793-
found:(bool -> 'b) -> 'b
8379483790

8379583791
val is_pure_module : Lam_module_ident.t -> bool
8379683792

@@ -83976,7 +83972,7 @@ type _ t =
8397683972
let query_and_add_if_not_exist
8397783973
(type u)
8397883974
(oid : Lam_module_ident.t)
83979-
(env : u t) ~(found: bool -> _) =
83975+
~(found: bool -> _) =
8398083976
match Lam_module_ident.Hash.find_opt cached_tbl oid with
8398183977
| None ->
8398283978
begin match oid.kind with
@@ -84039,23 +84035,10 @@ let get_package_path_from_cmj
8403984035
let add = Lam_module_ident.Hash_set.add
8404084036

8404184037

84042-
84043-
(* let is_pure_module (id : Lam_module_ident.t) =
84044-
match id.kind with
84045-
| Runtime -> true
84046-
| External _ -> false
84047-
| Ml ->
84048-
match Lam_module_ident.Hash.find_opt cached_tbl id with
84049-
| Some (Visit {cmj_table = {pure}}) -> pure
84050-
| Some _ -> assert false
84051-
| None -> *)
84052-
84053-
84054-
8405584038
(* Conservative interface *)
8405684039
let is_pure_module (id : Lam_module_ident.t) =
8405784040
id.kind = Runtime ||
84058-
query_and_add_if_not_exist id No_env
84041+
query_and_add_if_not_exist id
8405984042
~found:(fun x -> x)
8406084043

8406184044
let get_required_modules
@@ -113598,13 +113581,9 @@ let get_dependent_module_effect
113598113581
(external_ids : Lam_module_ident.t list) =
113599113582
if maybe_pure = None then
113600113583
let non_pure_module =
113601-
Ext_list.find_first_not external_ids
113602-
(fun id ->
113603-
id.kind = Runtime ||
113604-
Lam_compile_env.query_and_add_if_not_exist id
113605-
(Has_env meta.env )
113606-
~found:(fun pure -> pure)
113607-
) in
113584+
Ext_list.find_first_not external_ids
113585+
Lam_compile_env.is_pure_module
113586+
in
113608113587
Ext_option.map non_pure_module (fun x -> Lam_module_ident.name x)
113609113588
else
113610113589
maybe_pure

0 commit comments

Comments
 (0)