diff options
| author | simonpj <unknown> | 1999-06-28 16:29:49 +0000 |
|---|---|---|
| committer | simonpj <unknown> | 1999-06-28 16:29:49 +0000 |
| commit | 354ce4040a514f3016323f2e330c7eac527ce3b2 (patch) | |
| tree | a3097753b32d1434b909030883302fe40903620f /ghc/compiler/codeGen | |
| parent | 26caf834b8eba8eea0f68ab96d47997159a5ed7e (diff) | |
| download | haskell-354ce4040a514f3016323f2e330c7eac527ce3b2.tar.gz | |
[project @ 1999-06-28 16:29:45 by simonpj]
* Add Type.repType
* Re-express splitRepTyConApp_maybe using repType
* Use the new repType in Core2Stg
The bug was that we ended up with a binding like
let x = /\a -> 3# +# y
in ...
and this should turn into an STG case, but the big lambda
fooled the core-to-STG pass
Diffstat (limited to 'ghc/compiler/codeGen')
| -rw-r--r-- | ghc/compiler/codeGen/CgCase.lhs | 6 | ||||
| -rw-r--r-- | ghc/compiler/codeGen/CgExpr.lhs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ghc/compiler/codeGen/CgCase.lhs b/ghc/compiler/codeGen/CgCase.lhs index c4afa179a9..f6771a6320 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.33 1999/06/24 13:04:16 simonmar Exp $ +% $Id: CgCase.lhs,v 1.34 1999/06/28 16:29:45 simonpj Exp $ % %******************************************************** %* * @@ -62,7 +62,7 @@ import TyCon ( TyCon, isEnumerationTyCon, isUnboxedTupleTyCon, isNewTyCon, isAlgTyCon, isFunTyCon, isPrimTyCon, tyConDataCons, tyConFamilySize ) import Type ( Type, typePrimRep, splitAlgTyConApp, - splitTyConApp_maybe, splitRepTyConApp_maybe ) + splitTyConApp_maybe, repType ) import Unique ( Unique, Uniquable(..), mkBuiltinUnique ) import Maybes ( maybeToBool ) import Util @@ -981,7 +981,7 @@ possibleHeapCheck NoGC _ _ tags lbl code \begin{code} getScrutineeTyCon :: Type -> Maybe TyCon getScrutineeTyCon ty = - case splitRepTyConApp_maybe ty of + case splitTyConApp_maybe (repType ty) of Nothing -> Nothing Just (tc,_) -> if isFunTyCon tc then Nothing else -- not interested in funs diff --git a/ghc/compiler/codeGen/CgExpr.lhs b/ghc/compiler/codeGen/CgExpr.lhs index e12979d9c2..e76289892a 100644 --- a/ghc/compiler/codeGen/CgExpr.lhs +++ b/ghc/compiler/codeGen/CgExpr.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgExpr.lhs,v 1.28 1999/06/24 13:04:18 simonmar Exp $ +% $Id: CgExpr.lhs,v 1.29 1999/06/28 16:29:45 simonpj Exp $ % %******************************************************** %* * @@ -48,7 +48,7 @@ import PrimOp ( primOpOutOfLine, import PrimRep ( getPrimRepSize, PrimRep(..), isFollowableRep ) import TyCon ( maybeTyConSingleCon, isUnboxedTupleTyCon, isEnumerationTyCon ) -import Type ( Type, typePrimRep, splitTyConApp_maybe, splitRepTyConApp_maybe ) +import Type ( Type, typePrimRep, splitTyConApp_maybe, repType ) import Maybes ( assocMaybe, maybeToBool ) import Unique ( mkBuiltinUnique ) import BasicTypes ( TopLevelFlag(..), RecFlag(..) ) @@ -462,7 +462,7 @@ primRetUnboxedTuple op args res_ty allocate some temporaries for the return values. -} let - (tc,ty_args) = case splitRepTyConApp_maybe res_ty of + (tc,ty_args) = case splitTyConApp_maybe (repType res_ty) of Nothing -> pprPanic "primRetUnboxedTuple" (ppr res_ty) Just pr -> pr prim_reps = map typePrimRep ty_args |
