Skip to content

Commit e4b0e03

Browse files
committed
Remove now useless code
1 parent 478563d commit e4b0e03

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/compiler/hxb/hxbWriter.ml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ type hxb_writer = {
416416
mutable chunk : Chunk.t;
417417

418418
mutable minimal : bool;
419-
mutable deps : module_def list;
420419

421420
classes : (path,tclass) Pool.t;
422421
enums : (path,tenum) Pool.t;
@@ -869,28 +868,20 @@ module HxbWriter = struct
869868

870869
(* References *)
871870

872-
let maybe_add_sig_dep writer m =
873-
if m.m_path <> writer.current_module.m_path && not (List.exists (fun m' -> m'.m_path = m.m_path) writer.deps) then
874-
writer.deps <- m :: writer.deps
875-
876871
let write_class_ref writer (c : tclass) =
877872
let i = Pool.get_or_add writer.classes c.cl_path c in
878-
maybe_add_sig_dep writer c.cl_module;
879873
Chunk.write_uleb128 writer.chunk i
880874

881875
let write_enum_ref writer (en : tenum) =
882876
let i = Pool.get_or_add writer.enums en.e_path en in
883-
maybe_add_sig_dep writer en.e_module;
884877
Chunk.write_uleb128 writer.chunk i
885878

886879
let write_typedef_ref writer (td : tdef) =
887880
let i = Pool.get_or_add writer.typedefs td.t_path td in
888-
maybe_add_sig_dep writer td.t_module;
889881
Chunk.write_uleb128 writer.chunk i
890882

891883
let write_abstract_ref writer (a : tabstract) =
892884
let i = Pool.get_or_add writer.abstracts a.a_path a in
893-
maybe_add_sig_dep writer a.a_module;
894885
Chunk.write_uleb128 writer.chunk i
895886

896887
let write_tmono_ref writer (mono : tmono) =
@@ -2282,12 +2273,6 @@ module HxbWriter = struct
22822273
l
22832274
end
22842275

2285-
let get_dependencies writer =
2286-
List.fold_left (fun deps mdep ->
2287-
let dep = {md_sign = mdep.m_extra.m_sign; md_path = mdep.m_path; md_kind = mdep.m_extra.m_kind; md_origin = MDepFromTyping} in
2288-
PMap.add mdep.m_id dep deps;
2289-
) PMap.empty writer.deps
2290-
22912276
let create config string_pool warn anon_id =
22922277
let cp,has_own_string_pool = match string_pool with
22932278
| None ->
@@ -2303,7 +2288,6 @@ let create config string_pool warn anon_id =
23032288
chunks = DynArray.create ();
23042289
cp = cp;
23052290
has_own_string_pool;
2306-
deps = [];
23072291
minimal = false;
23082292
docs = StringPool.create ();
23092293
chunk = Obj.magic ();

0 commit comments

Comments
 (0)