summaryrefslogtreecommitdiff
path: root/compiler/codeGen/ClosureInfo.lhs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-06-07 15:45:32 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-06-07 16:59:02 +0100
commit21a53a1cd5a9784aca7b78cc972f917e71938124 (patch)
tree47bc730293502ddfef578182bf47ba6fe2d45b04 /compiler/codeGen/ClosureInfo.lhs
parent20ba7f1a7a7b05acd81124f1567a3a103bcd0d1b (diff)
downloadhaskell-21a53a1cd5a9784aca7b78cc972f917e71938124.tar.gz
Fix for earger blackholing of thunks with no free variables (#6146)
A thunk with no free variables was not getting blackholed when -feager-blackholing was on, but we were nevertheless pushing the stg_bh_upd_frame version of the update frame that expects to see a black hole. I fixed this twice for good measure: - we now call blackHoleOnEntry when pushing the update frame to check whether the closure was actually blackholed, and so that we use the same predicate in both places - we now black hole thunks even if they have no free variables. These only occur when optimisation is off, but presumably if you say -feager-blackholing then that's what you want to happen.
Diffstat (limited to 'compiler/codeGen/ClosureInfo.lhs')
-rw-r--r--compiler/codeGen/ClosureInfo.lhs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs
index b3a365b201..ac60677bbd 100644
--- a/compiler/codeGen/ClosureInfo.lhs
+++ b/compiler/codeGen/ClosureInfo.lhs
@@ -731,7 +731,7 @@ blackHoleOnEntry cl_info
= case closureLFInfo cl_info of
LFReEntrant _ _ _ _ -> False
LFLetNoEscape _ -> False
- LFThunk _ no_fvs _updatable _ _ -> not no_fvs -- to plug space-leaks.
+ LFThunk _ _no_fvs _updatable _ _ -> True
_other -> panic "blackHoleOnEntry" -- Should never happen
isKnownFun :: LambdaFormInfo -> Bool