diff options
| author | Maxime Dénès | 2018-07-19 23:49:54 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2018-07-20 18:43:37 +0200 |
| commit | 6a9d0dc7b5c9a6a1c10c0c94eba5e72543080399 (patch) | |
| tree | 8082d271ce55805c66b9047cc442107c082c6dd0 /library/lib.ml | |
| parent | d8cd9ba6d56d32eb8aa383bca9198a18517e82d3 (diff) | |
Remove ClosedModule from libstack
Seems unused and probably holds a lot of pointers.
Diffstat (limited to 'library/lib.ml')
| -rw-r--r-- | library/lib.ml | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/library/lib.ml b/library/lib.ml index a20de55bf6..5e9d2baa1d 100644 --- a/library/lib.ml +++ b/library/lib.ml @@ -26,7 +26,6 @@ type node = | Leaf of obj | CompilingLibrary of object_prefix | OpenedModule of is_type * export * object_prefix * Summary.frozen - | ClosedModule of library_segment | OpenedSection of object_prefix * Summary.frozen | ClosedSection of library_segment @@ -74,9 +73,6 @@ let classify_segment seg = | Anticipate o' -> clean (substl, keepl, o'::anticipl) stk) | (_,ClosedSection _) :: stk -> clean acc stk - (* LEM; TODO: Understand what this does and see if what I do is the - correct thing for ClosedMod(ule|type) *) - | (_,ClosedModule _) :: stk -> clean acc stk | (_,OpenedSection _) :: _ -> user_err Pp.(str "there are still opened sections") | (_,OpenedModule (ty,_,_,_)) :: _ -> user_err ~hdr:"Lib.classify_segment" @@ -307,7 +303,6 @@ let end_mod is_type = in let (after,mark,before) = split_lib_at_opening oname in lib_state := { !lib_state with lib_stk = before }; - add_entry oname (ClosedModule (List.rev (mark::after))); let prefix = !lib_state.path_prefix in recalc_path_prefix (); (oname, prefix, fs, after) @@ -555,7 +550,7 @@ let discharge_item ((sp,_ as oname),e) = match e with | Leaf lobj -> Option.map (fun o -> (basename sp,o)) (discharge_object (oname,lobj)) - | ClosedSection _ | ClosedModule _ -> None + | ClosedSection _ -> None | OpenedSection _ | OpenedModule _ | CompilingLibrary _ -> anomaly (Pp.str "discharge_item.") @@ -589,7 +584,6 @@ let freeze ~marshallable = | n, (CompilingLibrary _ as x) -> Some (n,x) | n, OpenedModule (it,e,op,_) -> Some(n,OpenedModule(it,e,op,Summary.empty_frozen)) - | n, ClosedModule _ -> Some (n,ClosedModule []) | n, OpenedSection (op, _) -> Some(n,OpenedSection(op,Summary.empty_frozen)) | n, ClosedSection _ -> Some (n,ClosedSection [])) |
