summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2007-06-01 15:28:48 +0000
committerAlain Frisch <alain@frisch.fr>2007-06-01 15:28:48 +0000
commit7631e5a5a3e95c5e1ce68d08b34b6237735a98e5 (patch)
treea7669a976a97bad47a68fb9d57d97b9a8d368983
parentecf86b7b44ee5b8f676c1b9ff0b00971523e4123 (diff)
downloadocaml-7631e5a5a3e95c5e1ce68d08b34b6237735a98e5.tar.gz
Cleanup
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/natdynlink@8306 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--asmcomp/asmlink.ml21
-rw-r--r--asmcomp/asmpackager.ml2
-rw-r--r--asmcomp/compilenv.ml5
-rw-r--r--asmcomp/compilenv.mli3
-rw-r--r--driver/optcompile.ml4
5 files changed, 2 insertions, 33 deletions
diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml
index 48504edf87..3cbf14752c 100644
--- a/asmcomp/asmlink.ml
+++ b/asmcomp/asmlink.ml
@@ -239,20 +239,6 @@ let generic_functions ppf shared units_list =
module StringSet = Set.Make(String)
-let all_primitives units main =
- let prims =
- List.fold_right
- (fun ui -> List.fold_right StringSet.add ui.ui_primitives)
- units StringSet.empty in
-
- let prims =
- if main
- then prims
- else
- Array.fold_right StringSet.remove Runtimedef.builtin_primitives prims in
-
- StringSet.elements prims
-
let make_startup_file ppf filename units_list =
let compile_phrase p = Asmgen.compile_phrase ppf p in
let oc = open_out filename in
@@ -284,16 +270,14 @@ let make_startup_file ppf filename units_list =
compile_phrase
(Cmmgen.frame_table("_startup" :: "_system" :: name_list));
- Compilenv.extra_exports := all_primitives units true;
Emit.end_assembly();
close_out oc
-let make_shared_startup_file ppf units filename genfuns prims =
+let make_shared_startup_file ppf units filename genfuns =
let oc = open_out filename in
Emitaux.output_channel := oc;
Location.input_name := "caml_startup";
Compilenv.reset "_shared_startup";
- Compilenv.extra_exports := prims;
Emit.begin_assembly();
genfuns();
Asmgen.compile_phrase ppf (Cmmgen.plugin_header units);
@@ -356,13 +340,12 @@ let link_shared ppf objfiles output_name =
!Clflags.ccobjs in
let need,genfuns = generic_functions ppf true units in
- let prims = all_primitives units false in
let startup =
if !Clflags.keep_startup_file
then output_name ^ ".startup" ^ ext_asm
else Filename.temp_file "camlstartup" ext_asm in
make_shared_startup_file ppf
- (List.map (fun (ui,_,crc) -> (ui,crc)) units_tolink) startup genfuns prims;
+ (List.map (fun (ui,_,crc) -> (ui,crc)) units_tolink) startup genfuns;
let startup_obj = output_name ^ ".startup" ^ ext_obj in
if Proc.assemble_file startup startup_obj <> 0
then raise(Error(Assembler_error startup));
diff --git a/asmcomp/asmpackager.ml b/asmcomp/asmpackager.ml
index 64e736698f..71713e81c5 100644
--- a/asmcomp/asmpackager.ml
+++ b/asmcomp/asmpackager.ml
@@ -145,8 +145,6 @@ let build_package_cmx members cmxfile =
union(List.map (fun info -> info.ui_apply_fun) units);
ui_send_fun =
union(List.map (fun info -> info.ui_send_fun) units);
- ui_primitives =
- union(List.map (fun info -> info.ui_primitives) units);
ui_force_link =
List.exists (fun info -> info.ui_force_link) units;
} in
diff --git a/asmcomp/compilenv.ml b/asmcomp/compilenv.ml
index d1ae11ecd8..e0f999c208 100644
--- a/asmcomp/compilenv.ml
+++ b/asmcomp/compilenv.ml
@@ -45,7 +45,6 @@ type unit_infos =
mutable ui_curry_fun: int list; (* Currying functions needed *)
mutable ui_apply_fun: int list; (* Apply functions needed *)
mutable ui_send_fun: int list; (* Send functions needed *)
- mutable ui_primitives: string list; (* C primitives defined *)
mutable ui_force_link: bool } (* Always linked *)
(* Each .a library has a matching .cmxa file that provides the following
@@ -69,7 +68,6 @@ let current_unit =
ui_curry_fun = [];
ui_apply_fun = [];
ui_send_fun = [];
- ui_primitives = [];
ui_force_link = false }
let symbolname_for_pack pack name =
@@ -97,7 +95,6 @@ let reset ?packname name =
current_unit.ui_curry_fun <- [];
current_unit.ui_apply_fun <- [];
current_unit.ui_send_fun <- [];
- current_unit.ui_primitives <- [];
current_unit.ui_force_link <- false
let current_unit_infos () =
@@ -244,5 +241,3 @@ let report_error ppf = function
| Illegal_renaming(modname, filename) ->
fprintf ppf "%s@ contains the description for unit@ %s" filename modname
-
-let extra_exports = ref []
diff --git a/asmcomp/compilenv.mli b/asmcomp/compilenv.mli
index 2984f9f218..762123b012 100644
--- a/asmcomp/compilenv.mli
+++ b/asmcomp/compilenv.mli
@@ -36,7 +36,6 @@ type unit_infos =
mutable ui_curry_fun: int list; (* Currying functions needed *)
mutable ui_apply_fun: int list; (* Apply functions needed *)
mutable ui_send_fun: int list; (* Send functions needed *)
- mutable ui_primitives: string list; (* C primitives defined *)
mutable ui_force_link: bool } (* Always linked *)
(* Each .a library has a matching .cmxa file that provides the following
@@ -108,6 +107,4 @@ exception Error of error
val report_error: Format.formatter -> error -> unit
-(* References used to communicate with emit.ml under Windows *)
-val extra_exports: string list ref
diff --git a/driver/optcompile.ml b/driver/optcompile.ml
index 94952a4b96..e9a4449e76 100644
--- a/driver/optcompile.ml
+++ b/driver/optcompile.ml
@@ -103,10 +103,6 @@ let implementation ppf sourcefile outputprefix =
+++ print_if ppf Clflags.dump_lambda Printlambda.lambda
++ Asmgen.compile_implementation outputprefix ppf;
- let prims = List.filter (fun s -> s.[0] <> '%')
- !Translmod.nprimitive_declarations in
- (Compilenv.current_unit_infos()).Compilenv.ui_primitives <- prims;
-
Compilenv.save_unit_info (outputprefix ^ ".cmx");
end;
Warnings.check_fatal ();