summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2012-10-16 13:40:36 +0000
committerAlain Frisch <alain@frisch.fr>2012-10-16 13:40:36 +0000
commit5e8adcd8dff69aa0675f1bdb30b8fbe336713d26 (patch)
tree45b9c2124f550b621c37c71355516d9cd422dd08
parent7224745796fe819b8c7729fdb41ac3e5cb5a16d0 (diff)
#5784: -dclambda option is ignored.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13017 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--Changes1
-rw-r--r--asmcomp/asmgen.ml4
-rw-r--r--asmcomp/printclambda.ml3
3 files changed, 7 insertions, 1 deletions
diff --git a/Changes b/Changes
index 61a2d7b3f..19536e822 100644
--- a/Changes
+++ b/Changes
@@ -26,6 +26,7 @@ Bug fixes:
- PR#5747: 'unused open' warning not given when compiling with -annot
- PR#5758: Compiler bug when matching on floats
- PR#5763: ocamlbuild does not give correct flags when running menhir
+- PR#5784: -dclambda option is ignored
- PR#5787: Bad behavior of 'Unused ...' warnings in the toplevel
Internals:
diff --git a/asmcomp/asmgen.ml b/asmcomp/asmgen.ml
index 62d466ed9..448980740 100644
--- a/asmcomp/asmgen.ml
+++ b/asmcomp/asmgen.ml
@@ -35,6 +35,9 @@ let pass_dump_linear_if ppf flag message phrase =
if !flag then fprintf ppf "*** %s@.%a@." message Printlinear.fundecl phrase;
phrase
+let clambda_dump_if ppf ulambda =
+ if !dump_clambda then Printclambda.clambda ppf ulambda; ulambda
+
let rec regalloc ppf round fd =
if round > 50 then
fatal_error(fd.Mach.fun_name ^
@@ -102,6 +105,7 @@ let compile_implementation ?toplevel prefixname ppf (size, lam) =
Emitaux.output_channel := oc;
Emit.begin_assembly();
Closure.intro size lam
+ ++ clambda_dump_if ppf
++ Cmmgen.compunit size
++ List.iter (compile_phrase ppf) ++ (fun () -> ());
(match toplevel with None -> () | Some f -> compile_genfuns ppf f);
diff --git a/asmcomp/printclambda.ml b/asmcomp/printclambda.ml
index fdb048d7f..8d3fc044a 100644
--- a/asmcomp/printclambda.ml
+++ b/asmcomp/printclambda.ml
@@ -128,4 +128,5 @@ and sequence ppf ulam = match ulam with
fprintf ppf "%a@ %a" sequence l1 sequence l2
| _ -> lam ppf ulam
-let clambda = lam
+let clambda ppf ulam =
+ fprintf ppf "%a@." lam ulam