[commit: ghc] master: Some polishing of the demand analyser. (8d34ae3)
git at git.haskell.org
git at git.haskell.org
Thu Jan 23 18:30:24 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/8d34ae393eb49121e51bf1f01d575928aece5cfe/ghc
>---------------------------------------------------------------
commit 8d34ae393eb49121e51bf1f01d575928aece5cfe
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Thu Jan 23 15:13:30 2014 +0000
Some polishing of the demand analyser.
I did some refactoring of the demand analyser, because I was smelling
some minor code smell. Most of my changes I had to undo, though,
adding notes and testcases on why the existing code was correct after
all.
Especially the semantics of the DmdResult is confusing, as it differs in
a DmdType and a StrictSig.
I got to imrpove the readability of the code for lubDmdType, though.
Also, dmdAnalRhs was a bit fishy in how it removed the demand on
further arguments of the body, but used the DmdResult. This would be
wrong if a body would return a demand type of "<L>m" (which currently
does not happen). This is now treated better in removeDmdTyArgs.
>---------------------------------------------------------------
8d34ae393eb49121e51bf1f01d575928aece5cfe
compiler/basicTypes/Demand.lhs | 138 +++++++++++++++++++++++++++-------------
compiler/stranal/DmdAnal.lhs | 15 +++--
2 files changed, 102 insertions(+), 51 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 8d34ae393eb49121e51bf1f01d575928aece5cfe
More information about the ghc-commits
mailing list