Project

General

Profile

Revision 5fccce23 src/compiler_stages.ml

View differences:

src/compiler_stages.ml
36 36
      else
37 37
	begin
38 38
	  Log.report ~level:1 (fun fmt -> fprintf fmt ".. loading compiled header file %s@," header_name);
39
	  Modules.check_dependency lusic destname;
39
	  Lusic.check_obsolete lusic destname;
40 40
	  let header = lusic.Lusic.contents in
41
	  let (declared_types_env, declared_clocks_env) = get_envs_from_top_decls header in
41
	  let (declared_types_env, declared_clocks_env) = Modules.get_envs_from_top_decls header in
42 42
	  check_compatibility
43 43
	    (prog, computed_types_env, computed_clocks_env)
44 44
	    (header, declared_types_env, declared_clocks_env)
......
56 56
  Log.report ~level:4 (fun fmt -> fprintf fmt ".. after automata expansion:@,  @[<v 2>@,%a@]@ " Printers.pp_prog prog);
57 57

  
58 58
  (* Importing source *)
59
  let _ = Modules.load ~is_header:false ISet.empty prog in
59
  let prog, dependencies, (typ_env, clk_env) = Modules.load ~is_header:false prog in
60 60

  
61
  (* Extracting dependencies (and updating Global.(type_env/clock_env) *)
62
  let dependencies = import_dependencies prog in
61
  (* Registering types and clocks for future checks *)
62
  Global.type_env := Env.overwrite !Global.type_env typ_env;
63
  Global.clock_env := Env.overwrite !Global.clock_env clk_env;
64
  
65
  (* (\* Extracting dependencies (and updating Global.(type_env/clock_env) *\)
66
   * let dependencies = import_dependencies prog in *)
63 67

  
64 68
  (* Sorting nodes *)
65 69
  let prog = SortProg.sort prog in

Also available in: Unified diff