[commit: ghc] master: Remove the LFBlackHole constructor (980badd)

git at git.haskell.org git at git.haskell.org
Fri Dec 6 04:41:29 UTC 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/980badd133d0e8694bfe2fad7c123da0e51c3250/ghc

>---------------------------------------------------------------

commit 980badd133d0e8694bfe2fad7c123da0e51c3250
Author: Patrick Palka <patrick at parcs.ath.cx>
Date:   Thu Dec 5 11:19:25 2013 -0500

    Remove the LFBlackHole constructor
    
    After commit 55c703b8fdb0, this code is no longer used anywhere.


>---------------------------------------------------------------

980badd133d0e8694bfe2fad7c123da0e51c3250
 compiler/codeGen/StgCmmClosure.hs |   27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs
index 037ba97..af9c7b8 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -23,7 +23,6 @@ module StgCmmClosure (
         StandardFormInfo,        -- ...ditto...
         mkLFThunk, mkLFReEntrant, mkConLFInfo, mkSelectorLFInfo,
         mkApLFInfo, mkLFImported, mkLFArgument, mkLFLetNoEscape,
-        mkLFBlackHole,
         lfDynTag,
         maybeIsLFCon, isLFThunk, isLFReEntrant, lfUpdatable,
 
@@ -180,13 +179,6 @@ data LambdaFormInfo
 
   | LFLetNoEscape       -- See LetNoEscape module for precise description
 
-  | LFBlackHole                -- Used for the closures allocated to hold the result
-                        -- of a CAF.  We want the target of the update frame to
-                        -- be in the heap, so we make a black hole to hold it.
-
-                        -- XXX we can very nearly get rid of this, but
-                        -- allocDynClosure needs a LambdaFormInfo
-
 
 -------------------------
 -- StandardFormInfo tells whether this thunk has one of
@@ -294,10 +286,6 @@ mkLFImported id
   where
     arity = idRepArity id
 
-------------
-mkLFBlackHole :: LambdaFormInfo
-mkLFBlackHole = LFBlackHole
-
 -----------------------------------------------------
 --                Dynamic pointer tagging
 -----------------------------------------------------
@@ -361,10 +349,6 @@ maybeIsLFCon _ = Nothing
 ------------
 isLFThunk :: LambdaFormInfo -> Bool
 isLFThunk (LFThunk {})  = True
-isLFThunk LFBlackHole   = True
-        -- return True for a blackhole: this function is used to determine
-        -- whether to use the thunk header in SMP mode, and a blackhole
-        -- must have one.
 isLFThunk _ = False
 
 isLFReEntrant :: LambdaFormInfo -> Bool
@@ -439,7 +423,6 @@ nodeMustPointToIt _ (LFCon _) = True
 
 nodeMustPointToIt _ (LFUnknown _)   = True
 nodeMustPointToIt _ LFUnLifted      = False
-nodeMustPointToIt _ LFBlackHole     = True    -- BH entry may require Node to point
 nodeMustPointToIt _ LFLetNoEscape   = False
 
 {- Note [GC recovery]
@@ -579,11 +562,6 @@ getCallMethod _ name _ (LFUnknown False) n_args _cg_loc _self_loop_info
   = ASSERT2( n_args == 0, ppr name <+> ppr n_args )
     EnterIt -- Not a function
 
-getCallMethod _ _name _ LFBlackHole _n_args _cg_loc _self_loop_info
-  = SlowCall    -- Presumably the black hole has by now
-                -- been updated, but we don't know with
-                -- what, so we slow call it
-
 getCallMethod _ _name _ LFLetNoEscape _n_args (LneLoc blk_id lne_regs) _self_loop_info
   = JumpToIt blk_id lne_regs
 
@@ -787,9 +765,6 @@ closureUpdReqd ClosureInfo{ closureLFInfo = lf_info } = lfUpdatable lf_info
 
 lfUpdatable :: LambdaFormInfo -> Bool
 lfUpdatable (LFThunk _ _ upd _ _)  = upd
-lfUpdatable LFBlackHole            = True
-        -- Black-hole closures are allocated to receive the results of an
-        -- alg case with a named default... so they need to be updated.
 lfUpdatable _ = False
 
 closureSingleEntry :: ClosureInfo -> Bool
@@ -836,8 +811,6 @@ closureLocalEntryLabel dflags
 mkClosureInfoTableLabel :: Id -> LambdaFormInfo -> CLabel
 mkClosureInfoTableLabel id lf_info
   = case lf_info of
-        LFBlackHole -> mkCAFBlackHoleInfoTableLabel
-
         LFThunk _ _ upd_flag (SelectorThunk offset) _
                       -> mkSelectorInfoLabel upd_flag offset
 



More information about the ghc-commits mailing list