Commits

camlspotter  committed 4c2ec88

clear_cache

  • Participants
  • Parent commits 29202eb
  • Branches dev

Comments (0)

Files changed (2)

   open Typedtree
   open Asttypes
 
+  (* CR jfuruse: cache never cleaned! *)
   let cache_module_expr = Module_expr.Table.create 31
   let cache_structure_item = Structure_item.Table.create 31
 
+  let clear_cache () = 
+    Module_expr.Table.clear cache_module_expr;
+    Structure_item.Table.clear cache_structure_item
+
   module T = struct
     let kident_of_sigitem = function
       | Sig_value (id, _)         -> Kind.Value, id
   val structure : Typedtree.structure -> module_expr
   val signature : Typedtree.signature -> module_expr
 
+  val clear_cache : unit -> unit
+
   open Format
   val format_module_expr : formatter -> module_expr -> unit
   val format_structure : formatter -> structure -> unit