X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FcodeGen%2FCgCase.lhs;h=e7c08940c5078eb9565b97f2d5e988cedbee25a4;hb=28a464a75e14cece5db40f2765a29348273ff2d2;hp=fad78d82151719ee28cbde79f722f5cb855e117e;hpb=d1c1b7d0e7b94ede238845c91f58582bad3b3ef3;p=ghc-hetmet.git diff --git a/ghc/compiler/codeGen/CgCase.lhs b/ghc/compiler/codeGen/CgCase.lhs index fad78d8..e7c0894 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.73 2005/03/18 13:37:38 simonmar Exp $ +% $Id: CgCase.lhs,v 1.75 2005/06/21 10:44:41 simonmar Exp $ % %******************************************************** %* * @@ -171,7 +171,7 @@ cgCase (StgOpApp op@(StgFCallOp fcall _) args _) live_in_whole_case live_in_alts bndr srt alt_type alts | unsafe_foreign_call = ASSERT( isSingleton alts ) - do -- *must* be an unboxed tuple alt. + do -- *must* be an unboxed tuple alt. -- exactly like the cgInlinePrimOp case for unboxed tuple alts.. { res_tmps <- mapFCs bindNewToTemp non_void_res_ids ; let res_hints = map (typeHint.idType) non_void_res_ids @@ -336,10 +336,10 @@ cgInlinePrimOp primop args bndr (AlgAlt tycon) live_in_alts alts -- Bind the default binder if necessary -- (avoiding it avoids the assignment) -- The deadness info is set by StgVarInfo - ; dflags <- getDynFlags + ; hmods <- getHomeModules ; whenC (not (isDeadBinder bndr)) (do { tmp_reg <- bindNewToTemp bndr - ; stmtC (CmmAssign tmp_reg (tagToClosure dflags tycon tag_amode)) }) + ; stmtC (CmmAssign tmp_reg (tagToClosure hmods tycon tag_amode)) }) -- Compile the alts ; (branches, mb_deflt) <- cgAlgAlts NoGC Nothing{-cc_slot-} @@ -471,7 +471,7 @@ are inlined alternatives. \begin{code} cgAlgAlts :: GCFlag -> Maybe VirtualSpOffset - -> AltType -- ** AlgAlt or PolyAlt only ** + -> AltType -- ** AlgAlt or PolyAlt only ** -> [StgAlt] -- The alternatives -> FCode ( [(ConTagZ, CgStmts)], -- The branches Maybe CgStmts ) -- The default case @@ -491,7 +491,7 @@ cgAlgAlts gc_flag cc_slot alt_type alts cgAlgAlt :: GCFlag -> Maybe VirtualSpOffset -- Turgid state - -> AltType -- ** AlgAlt or PolyAlt only ** + -> AltType -- ** AlgAlt or PolyAlt only ** -> StgAlt -> FCode (AltCon, CgStmts)