summaryrefslogtreecommitdiff
path: root/ghc/compiler/codeGen
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/compiler/codeGen')
-rw-r--r--ghc/compiler/codeGen/CgCase.lhs9
-rw-r--r--ghc/compiler/codeGen/CodeGen.lhs12
2 files changed, 10 insertions, 11 deletions
diff --git a/ghc/compiler/codeGen/CgCase.lhs b/ghc/compiler/codeGen/CgCase.lhs
index b1c0b36a67..1fccb1f488 100644
--- a/ghc/compiler/codeGen/CgCase.lhs
+++ b/ghc/compiler/codeGen/CgCase.lhs
@@ -1,7 +1,7 @@
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
-% $Id: CgCase.lhs,v 1.21 1998/12/22 18:03:27 simonm Exp $
+% $Id: CgCase.lhs,v 1.22 1999/01/27 14:51:31 simonpj Exp $
%
%********************************************************
%* *
@@ -546,7 +546,12 @@ Tag is held in a temporary.
\begin{code}
cgInlineAlts bndr (StgAlgAlts ty alts deflt)
- = cgAlgAlts NoGC uniq AbsCNop{-restore_cc-} False{-no semi-tagging-}
+ = -- bind the default binder (it covers all the alternatives)
+ (if (isDeadBinder bndr)
+ then nopC
+ else bindNewToReg bndr node mkLFArgument) `thenC`
+
+ cgAlgAlts NoGC uniq AbsCNop{-restore_cc-} False{-no semi-tagging-}
False{-not poly case-} alts deflt
False{-don't emit yield-} `thenFC` \ (tagged_alts, deflt_c) ->
diff --git a/ghc/compiler/codeGen/CodeGen.lhs b/ghc/compiler/codeGen/CodeGen.lhs
index 142ee9c1fc..6bd024d70e 100644
--- a/ghc/compiler/codeGen/CodeGen.lhs
+++ b/ghc/compiler/codeGen/CodeGen.lhs
@@ -36,7 +36,7 @@ import CmdLineOpts ( opt_SccProfilingOn, opt_EnsureSplittableC,
import CostCentre ( CostCentre, CostCentreStack )
import FiniteMap ( FiniteMap )
import Id ( Id, idName )
-import Name ( Module, moduleCString, moduleString )
+import Name ( Module, moduleString )
import PrimRep ( getPrimRepSize, PrimRep(..) )
import Type ( Type )
import TyCon ( TyCon )
@@ -93,12 +93,6 @@ codeGen mod_name (local_CCs, extern_CCs, singleton_CCSs)
mkAbstractCs [ cost_centre_stuff, module_code ]
where
- -----------------
- grp_name = case opt_SccGroup of
- Just xx -> _PK_ xx
- Nothing -> _PK_ (moduleString mod_name) -- default: module name
-
- -----------------
mkCcRegister ccs cc_stacks import_names
= let
register_ccs = mkAbstractCs (map mk_register ccs)
@@ -108,7 +102,7 @@ codeGen mod_name (local_CCs, extern_CCs, singleton_CCSs)
in
[
CCallProfCCMacro SLIT("START_REGISTER_CCS")
- [ CLitLit (_PK_ ("_reg" ++ moduleCString mod_name)) AddrRep],
+ [ CLitLit (_PK_ ("_reg" ++ moduleString mod_name)) AddrRep],
register_ccs,
register_cc_stacks,
register_imports,
@@ -123,7 +117,7 @@ codeGen mod_name (local_CCs, extern_CCs, singleton_CCSs)
mk_import_register import_name
= CCallProfCCMacro SLIT("REGISTER_IMPORT")
- [CLitLit (_PK_ ("_reg" ++ moduleCString import_name)) AddrRep]
+ [CLitLit (_PK_ ("_reg" ++ moduleString import_name)) AddrRep]
\end{code}
%************************************************************************