Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: asmcomp/asmlink.ml
- ===================================================================
- RCS file: /caml/ocaml/asmcomp/asmlink.ml,v
- retrieving revision 1.65
- diff -c -r1.65 asmlink.ml
- *** asmcomp/asmlink.ml 26 May 2004 11:10:27 -0000 1.65
- --- asmcomp/asmlink.ml 13 Dec 2005 17:58:12 -0000
- ***************
- *** 163,168 ****
- --- 163,186 ----
- let compare = compare
- end)
- + module StringMap = Map.Make(String)
- +
- + let check_unique l =
- + let seen = ref StringMap.empty in
- + List.iter
- + (fun (info,file_name,_) ->
- + List.iter
- + (fun n ->
- + try
- + let other = StringMap.find n !seen in
- + raise (Error (Multiple_definition (n,other,file_name)))
- + with Not_found ->
- + seen := StringMap.add n file_name !seen
- + )
- + info.ui_defines
- + )
- + l
- +
- let make_startup_file ppf filename units_list =
- let compile_phrase p = Asmgen.compile_phrase ppf p in
- let oc = open_out filename in
- ***************
- *** 170,175 ****
- --- 188,194 ----
- Location.input_name := "caml_startup"; (* set name of "current" input *)
- Compilenv.reset "_startup"; (* set the name of the "current" compunit *)
- Emit.begin_assembly();
- + check_unique units_list;
- let name_list =
- List.flatten (List.map (fun (info,_,_) -> info.ui_defines) units_list) in
- compile_phrase (Cmmgen.entry_point name_list);
Add Comment
Please, Sign In to add comment