|
@@ -1804,6 +1804,36 @@ let detect_usage com =
|
|
|
) !usage in
|
|
|
raise (Typecore.DisplayPosition usage)
|
|
|
|
|
|
+let update_cache_dependencies com =
|
|
|
+ let rec check_t m t = match follow t with
|
|
|
+ | TInst(c,tl) ->
|
|
|
+ add_dependency m c.cl_module;
|
|
|
+ List.iter (check_t m) tl;
|
|
|
+ | TEnum(en,tl) ->
|
|
|
+ add_dependency m en.e_module;
|
|
|
+ List.iter (check_t m) tl;
|
|
|
+ | TAbstract(a,tl) ->
|
|
|
+ add_dependency m a.a_module;
|
|
|
+ List.iter (check_t m) tl;
|
|
|
+ | TFun(targs,tret) ->
|
|
|
+ List.iter (fun (_,_,t) -> check_t m t) targs;
|
|
|
+ check_t m tret;
|
|
|
+ | TAnon an ->
|
|
|
+ PMap.iter (fun _ cf -> check_field m cf) an.a_fields
|
|
|
+ | _ ->
|
|
|
+ ()
|
|
|
+ and check_field m cf =
|
|
|
+ check_t m cf.cf_type
|
|
|
+ in
|
|
|
+ List.iter (fun t -> match t with
|
|
|
+ | TClassDecl c ->
|
|
|
+ List.iter (check_field c.cl_module) c.cl_ordered_statics;
|
|
|
+ List.iter (check_field c.cl_module) c.cl_ordered_fields;
|
|
|
+ (match c.cl_constructor with None -> () | Some cf -> check_field c.cl_module cf);
|
|
|
+ | _ ->
|
|
|
+ ()
|
|
|
+ ) com.types
|
|
|
+
|
|
|
(* -------------------------------------------------------------------------- *)
|
|
|
(* POST PROCESS *)
|
|
|
|