diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2009-05-20 11:52:42 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2009-05-20 11:52:42 +0000 |
commit | ed32f569e3b636e0f12efdbbd5bba9e05cc434ac (patch) | |
tree | 20b551901a72edf7733a6fe5287deab21ed9b83b /asmcomp/cmmgen.ml | |
parent | 7795eafa896b0c5b3066d5efec7ec49d69d44e4d (diff) | |
download | ocaml-ed32f569e3b636e0f12efdbbd5bba9e05cc434ac.tar.gz |
merge changes from ocaml3110 to ocaml3111rc0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/cmmgen.ml')
-rw-r--r-- | asmcomp/cmmgen.ml | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml index 83cb1f6e39..00742dcf99 100644 --- a/asmcomp/cmmgen.ml +++ b/asmcomp/cmmgen.ml @@ -1943,9 +1943,8 @@ module IntSet = Set.Make( end) let default_apply = IntSet.add 2 (IntSet.add 3 IntSet.empty) - (* These apply funs are always present in the main program. - TODO: add more, and do the same for send and curry funs - (maybe up to 10-15?). *) + (* These apply funs are always present in the main program because + the run-time system needs them (cf. asmrun/<arch>.S) . *) let generic_functions shared units = let (apply,send,curry) = @@ -1955,12 +1954,8 @@ let generic_functions shared units = List.fold_right IntSet.add ui.Compilenv.ui_send_fun send, List.fold_right IntSet.add ui.Compilenv.ui_curry_fun curry) (IntSet.empty,IntSet.empty,IntSet.empty) - units - in - let apply = - if shared then IntSet.diff apply default_apply - else IntSet.union apply default_apply - in + units in + let apply = if shared then apply else IntSet.union apply default_apply in let accu = IntSet.fold (fun n accu -> apply_function n :: accu) apply [] in let accu = IntSet.fold (fun n accu -> send_function n :: accu) send accu in IntSet.fold (fun n accu -> curry_function n @ accu) curry accu |