|
@@ -395,6 +395,14 @@ let check_module sctx ctx m p =
|
|
|
end;
|
|
|
state
|
|
|
|
|
|
+let handle_cache_bound_objects com cbol =
|
|
|
+ List.iter (function
|
|
|
+ | Resource(name,data) ->
|
|
|
+ Hashtbl.replace com.resources name data
|
|
|
+ | IncludeFile(file,position) ->
|
|
|
+ com.include_files <- (file,position) :: com.include_files
|
|
|
+ ) cbol
|
|
|
+
|
|
|
(* Adds module [m] and all its dependencies (recursively) from the cache to the current compilation
|
|
|
context. *)
|
|
|
let add_modules sctx ctx m p =
|
|
@@ -404,7 +412,7 @@ let add_modules sctx ctx m p =
|
|
|
(match m0.m_extra.m_kind, m.m_extra.m_kind with
|
|
|
| MCode, MMacro | MMacro, MCode ->
|
|
|
(* this was just a dependency to check : do not add to the context *)
|
|
|
- PMap.iter (Hashtbl.replace com.resources) m.m_extra.m_binded_res;
|
|
|
+ handle_cache_bound_objects com m.m_extra.m_cache_bound_objects;
|
|
|
| _ ->
|
|
|
m.m_extra.m_added <- ctx.com.compilation_step;
|
|
|
ServerMessage.reusing com tabs m;
|
|
@@ -412,7 +420,7 @@ let add_modules sctx ctx m p =
|
|
|
(t_infos t).mt_restore()
|
|
|
) m.m_types;
|
|
|
TypeloadModule.ModuleLevel.add_module ctx m p;
|
|
|
- PMap.iter (Hashtbl.replace com.resources) m.m_extra.m_binded_res;
|
|
|
+ handle_cache_bound_objects com m.m_extra.m_cache_bound_objects;
|
|
|
PMap.iter (fun _ (sign,mpath) ->
|
|
|
let m2 = (com.cs#get_context sign)#find_module mpath in
|
|
|
add_modules (tabs ^ " ") m0 m2
|