diff options
| author | letouzey | 2002-12-18 13:08:02 +0000 |
|---|---|---|
| committer | letouzey | 2002-12-18 13:08:02 +0000 |
| commit | 2964b1ed999b6c1022a897e58acb09933495fdcb (patch) | |
| tree | 81327f0b9a916f6f8167da7df4f4038a5213a939 | |
| parent | 6754338f5629938f30901e29c10acfaa58ca9174 (diff) | |
stupide inlining des construsteurs
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3454 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | contrib/extraction/mlutil.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/extraction/mlutil.ml b/contrib/extraction/mlutil.ml index 07bf98aeea..172dce2ddb 100644 --- a/contrib/extraction/mlutil.ml +++ b/contrib/extraction/mlutil.ml @@ -1068,7 +1068,7 @@ let is_not_strict t = variable (i.e. a variable that may not be evaluated). *) let inline_test t = - not (is_fix t) && (is_constr t || (ml_size t < 12 && is_not_strict t)) + not (is_fix t) && (ml_size t < 12 && is_not_strict t) let manual_inline_list = let mp = MPfile (dirpath_of_string "Coq.Init.Wf") in @@ -1087,11 +1087,16 @@ let manual_inline = function we are free to act (AutoInline is set) \end{itemize} *) +let inline_test' r t = + let b = inline_test t in + if b then msgnl (Printer.pr_global r); + b + let inline r t = not (to_keep r) (* The user DOES want to keep it *) && (to_inline r (* The user DOES want to inline it *) || (auto_inline () && lang () <> Haskell - && (is_recursor r || manual_inline r || inline_test t))) + && (is_recursor r || manual_inline r || inline_test' r t))) (*S Optimization. *) |
