diff --git a/src/compiler/hxb/hxbWriter.ml b/src/compiler/hxb/hxbWriter.ml index b8f146a46b3..aacb1eae578 100644 --- a/src/compiler/hxb/hxbWriter.ml +++ b/src/compiler/hxb/hxbWriter.ml @@ -415,9 +415,6 @@ type hxb_writer = { docs : StringPool.t; mutable chunk : Chunk.t; - mutable minimal : bool; - mutable deps : module_def list; - classes : (path,tclass) Pool.t; enums : (path,tenum) Pool.t; typedefs : (path,tdef) Pool.t; @@ -869,28 +866,20 @@ module HxbWriter = struct (* References *) - let maybe_add_sig_dep writer m = - if m.m_path <> writer.current_module.m_path && not (List.exists (fun m' -> m'.m_path = m.m_path) writer.deps) then - writer.deps <- m :: writer.deps - let write_class_ref writer (c : tclass) = let i = Pool.get_or_add writer.classes c.cl_path c in - maybe_add_sig_dep writer c.cl_module; Chunk.write_uleb128 writer.chunk i let write_enum_ref writer (en : tenum) = let i = Pool.get_or_add writer.enums en.e_path en in - maybe_add_sig_dep writer en.e_module; Chunk.write_uleb128 writer.chunk i let write_typedef_ref writer (td : tdef) = let i = Pool.get_or_add writer.typedefs td.t_path td in - maybe_add_sig_dep writer td.t_module; Chunk.write_uleb128 writer.chunk i let write_abstract_ref writer (a : tabstract) = let i = Pool.get_or_add writer.abstracts a.a_path a in - maybe_add_sig_dep writer a.a_module; Chunk.write_uleb128 writer.chunk i let write_tmono_ref writer (mono : tmono) = @@ -1795,9 +1784,6 @@ module HxbWriter = struct maybe_write_documentation writer cf.cf_doc; write_field_kind writer cf.cf_kind; let expr_chunk = match cf.cf_expr with - | _ when writer.minimal -> - Chunk.write_u8 writer.chunk 0; - None | None -> Chunk.write_u8 writer.chunk 0; None @@ -2282,12 +2268,6 @@ module HxbWriter = struct l end -let get_dependencies writer = - List.fold_left (fun deps mdep -> - 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 - PMap.add mdep.m_id dep deps; - ) PMap.empty writer.deps - let create config string_pool warn anon_id = let cp,has_own_string_pool = match string_pool with | None -> @@ -2303,8 +2283,6 @@ let create config string_pool warn anon_id = chunks = DynArray.create (); cp = cp; has_own_string_pool; - deps = []; - minimal = false; docs = StringPool.create (); chunk = Obj.magic (); classes = Pool.create ();