[commit: ghc] master: Fix a nasty bug in exprIsExpandable (9be18ea)
git at git.haskell.org
git at git.haskell.org
Fri Jan 20 14:39:25 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9be18ea4e5cbc53ce7769a30275332d68a4ab6b9/ghc
>---------------------------------------------------------------
commit 9be18ea4e5cbc53ce7769a30275332d68a4ab6b9
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Jan 20 11:02:36 2017 +0000
Fix a nasty bug in exprIsExpandable
This bug has been lurking for ages: Trac #13155
The important semantic change is to ensure that exprIsExpandable
returns False for primop calls. Previously exprIsExpandable used
exprIsCheap' which always used primOpIsCheap.
I took the opportunity to combine the code for exprIsCheap' (two
variants: exprIsCheap and exprIsExpandable) with that for
exprIsWorkFree. Result is simpler, tighter, easier to understand.
And correct (at least wrt this bug)!
>---------------------------------------------------------------
9be18ea4e5cbc53ce7769a30275332d68a4ab6b9
compiler/coreSyn/CoreArity.hs | 4 +-
compiler/coreSyn/CoreUtils.hs | 270 +++++++++++----------
testsuite/tests/simplCore/should_compile/Makefile | 4 +
testsuite/tests/simplCore/should_compile/T13155.hs | 18 ++
.../should_compile/T13155.stdout} | 0
testsuite/tests/simplCore/should_compile/all.T | 1 +
6 files changed, 165 insertions(+), 132 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 9be18ea4e5cbc53ce7769a30275332d68a4ab6b9
More information about the ghc-commits
mailing list