summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorMax Bolingbroke <batterseapower@hotmail.com>2011-07-28 23:57:55 +0100
committerMax Bolingbroke <batterseapower@hotmail.com>2011-07-28 23:57:55 +0100
commitd2068cc2b6aed19a1755c6641271a08f65452b82 (patch)
tree6d6073aff75b8102a9c29496eff0fdb54ecba41d /compiler/codeGen
parent046755fd4beb0a5f734e7f6ebbdb031066cfed73 (diff)
downloadhaskell-d2068cc2b6aed19a1755c6641271a08f65452b82.tar.gz
Eliminate localiseLabel
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/ClosureInfo.lhs9
-rw-r--r--compiler/codeGen/StgCmmClosure.hs9
2 files changed, 8 insertions, 10 deletions
diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs
index 5db8b125f7..60f1bda7f5 100644
--- a/compiler/codeGen/ClosureInfo.lhs
+++ b/compiler/codeGen/ClosureInfo.lhs
@@ -80,8 +80,6 @@ import FastString
import Outputable
import Constants
import DynFlags
-
-import Control.Arrow ((***))
\end{code}
@@ -936,7 +934,7 @@ labelsFromCI :: ClosureInfo -> (CLabel, CLabel) -- (Info, Entry)
labelsFromCI cl@(ClosureInfo { closureName = name,
closureLFInfo = lf_info,
closureInfLcl = is_lcl })
- = (if is_lcl then (localiseLabel *** localiseLabel) else id) $ case lf_info of
+ = case lf_info of
LFBlackHole -> (mkCAFBlackHoleInfoTableLabel, mkCAFBlackHoleEntryLabel)
LFThunk _ _ upd_flag (SelectorThunk offset) _ ->
@@ -945,11 +943,12 @@ labelsFromCI cl@(ClosureInfo { closureName = name,
LFThunk _ _ upd_flag (ApThunk arity) _ ->
bothL (mkApInfoTableLabel, mkApEntryLabel) upd_flag arity
- LFThunk{} -> bothL (mkInfoTableLabel, mkEntryLabel) name $ clHasCafRefs cl
+ LFThunk{} -> bothL std_mk_lbls name $ clHasCafRefs cl
- LFReEntrant _ _ _ _ -> bothL (mkInfoTableLabel, mkEntryLabel) name $ clHasCafRefs cl
+ LFReEntrant _ _ _ _ -> bothL std_mk_lbls name $ clHasCafRefs cl
_ -> panic "labelsFromCI"
+ where std_mk_lbls = if is_lcl then (mkLocalInfoTableLabel, mkLocalEntryLabel) else (mkInfoTableLabel, mkEntryLabel)
labelsFromCI cl@(ConInfo { closureCon = con,
closureSMRep = rep })
diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs
index cbcdaab058..2492bafc6c 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -90,8 +90,6 @@ import Outputable
import Constants
import DynFlags
-import Control.Arrow ((***))
-
-----------------------------------------------------------------------------
-- Representations
-----------------------------------------------------------------------------
@@ -1003,7 +1001,7 @@ labelsFromCI :: ClosureInfo -> (CLabel, CLabel) -- (Info, Entry)
labelsFromCI cl@(ClosureInfo { closureName = name,
closureLFInfo = lf_info,
closureInfLcl = is_lcl })
- = (if is_lcl then (localiseLabel *** localiseLabel) else id) $ case lf_info of
+ = case lf_info of
LFBlackHole -> (mkCAFBlackHoleInfoTableLabel, mkCAFBlackHoleEntryLabel)
LFThunk _ _ upd_flag (SelectorThunk offset) _ ->
@@ -1012,11 +1010,12 @@ labelsFromCI cl@(ClosureInfo { closureName = name,
LFThunk _ _ upd_flag (ApThunk arity) _ ->
bothL (mkApInfoTableLabel, mkApEntryLabel) upd_flag arity
- LFThunk{} -> bothL (mkInfoTableLabel, mkEntryLabel) name $ clHasCafRefs cl
+ LFThunk{} -> bothL std_mk_lbls name $ clHasCafRefs cl
- LFReEntrant _ _ _ _ -> bothL (mkInfoTableLabel, mkEntryLabel) name $ clHasCafRefs cl
+ LFReEntrant _ _ _ _ -> bothL std_mk_lbls name $ clHasCafRefs cl
_other -> panic "labelsFromCI"
+ where std_mk_lbls = if is_lcl then (mkLocalInfoTableLabel, mkLocalEntryLabel) else (mkInfoTableLabel, mkEntryLabel)
labelsFromCI cl@(ConInfo { closureCon = con, closureSMRep = rep })
| isStaticRep rep = bothL (mkStaticInfoTableLabel, mkStaticConEntryLabel) name $ clHasCafRefs cl