diff options
author | Max Bolingbroke <batterseapower@hotmail.com> | 2011-07-28 23:37:55 +0100 |
---|---|---|
committer | Max Bolingbroke <batterseapower@hotmail.com> | 2011-07-28 23:37:55 +0100 |
commit | f778dae938d6d92d90c00be6b230fe1208834081 (patch) | |
tree | 58b6a2edc69a2127d0e3c86ccaec1b0e29b29d68 /compiler/codeGen/StgCmmClosure.hs | |
parent | 81c6183dca435a0f03ec3342f8c116d5f9de2ea6 (diff) | |
download | haskell-f778dae938d6d92d90c00be6b230fe1208834081.tar.gz |
Put the info CLabel in CmmInfoTable rather than a localness flag, tidy up some info<->entry conversions
Diffstat (limited to 'compiler/codeGen/StgCmmClosure.hs')
-rw-r--r-- | compiler/codeGen/StgCmmClosure.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs index 7c4f8bc8b8..7a6f0bbc45 100644 --- a/compiler/codeGen/StgCmmClosure.hs +++ b/compiler/codeGen/StgCmmClosure.hs @@ -35,7 +35,7 @@ module StgCmmClosure ( closureGoodStuffSize, closurePtrsSize, slopSize, - closureName, infoTableLabelFromCI, + closureName, infoTableLabelFromCI, entryLabelFromCI, closureLabelFromCI, closureTypeInfo, closureLFInfo, isLFThunk,closureSMRep, closureUpdReqd, @@ -56,7 +56,7 @@ module StgCmmClosure ( isToplevClosure, closureValDescr, closureTypeDescr, -- profiling - closureInfoLocal, isStaticClosure, + isStaticClosure, cafBlackHoleClosureInfo, staticClosureNeedsLink, clHasCafRefs @@ -938,10 +938,6 @@ staticClosureNeedsLink (ConInfo { closureSMRep = sm_rep, closureCon = con }) GenericRep _ _ _ ConstrNoCaf -> False _other -> True -closureInfoLocal :: ClosureInfo -> Bool -closureInfoLocal ClosureInfo{ closureInfLcl = lcl } = lcl -closureInfoLocal ConInfo{} = False - isStaticClosure :: ClosureInfo -> Bool isStaticClosure cl_info = isStaticRep (closureSMRep cl_info) @@ -998,8 +994,9 @@ isToplevClosure _ = False infoTableLabelFromCI :: ClosureInfo -> CLabel infoTableLabelFromCI cl@(ClosureInfo { closureName = name, - closureLFInfo = lf_info }) - = case lf_info of + closureLFInfo = lf_info, + closureInfLcl = is_lcl }) + = (if is_lcl then localiseLabel else id) $ case lf_info of LFBlackHole info -> info LFThunk _ _ upd_flag (SelectorThunk offset) _ -> @@ -1020,6 +1017,9 @@ infoTableLabelFromCI cl@(ConInfo { closureCon = con, closureSMRep = rep }) where name = dataConName con +entryLabelFromCI :: ClosureInfo -> CLabel +entryLabelFromCI = infoLblToEntryLbl . infoTableLabelFromCI + -- ClosureInfo for a closure (as opposed to a constructor) is always local closureLabelFromCI :: ClosureInfo -> CLabel closureLabelFromCI cl@(ClosureInfo { closureName = nm }) = |