X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FcodeGen%2FCgLetNoEscape.lhs;h=521dc5cdd3e0d93883e4d94d0ccf43c4ee982b4e;hb=c0624c7661a229bfeed128ca96b07e2f4d5d677c;hp=f122b963b464c0e06c018b06a2ae6cd5ad914b8b;hpb=589b7946b0847a47d1a5493dcec0976c84814312;p=ghc-hetmet.git diff --git a/ghc/compiler/codeGen/CgLetNoEscape.lhs b/ghc/compiler/codeGen/CgLetNoEscape.lhs index f122b96..521dc5c 100644 --- a/ghc/compiler/codeGen/CgLetNoEscape.lhs +++ b/ghc/compiler/codeGen/CgLetNoEscape.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 % -% $Id: CgLetNoEscape.lhs,v 1.13 1999/05/13 17:30:57 simonm Exp $ +% $Id: CgLetNoEscape.lhs,v 1.18 2002/09/13 15:02:28 simonpj Exp $ % %******************************************************** %* * @@ -19,7 +19,6 @@ import {-# SOURCE #-} CgExpr ( cgExpr ) import StgSyn import CgMonad import AbsCSyn -import CLabel ( CLabel ) import CgBindery ( letNoEscapeIdInfo, bindArgsToRegs, bindNewToStack, buildContLivenessMask, CgIdInfo, @@ -36,8 +35,9 @@ import CostCentre ( CostCentreStack ) import Id ( idPrimRep, Id ) import Var ( idUnique ) import PrimRep ( PrimRep(..), retPrimRepSize ) -import Unique ( Unique ) import BasicTypes ( RecFlag(..) ) +import Unique ( Unique ) +import Util ( splitAtList ) \end{code} %************************************************************************ @@ -171,12 +171,12 @@ cgLetNoEscapeClosure (allocStackTop retPrimRepSize `thenFC` \_ -> nukeDeadBindings full_live_in_rhss) - (deAllocStackTop retPrimRepSize `thenFC` \_ -> - buildContLivenessMask uniq `thenFC` \ liveness -> + (deAllocStackTop retPrimRepSize `thenFC` \_ -> + buildContLivenessMask uniq `thenFC` \ liveness -> forkAbsC (cgLetNoEscapeBody binder cc args body uniq) `thenFC` \ code -> - getSRTLabel `thenFC` \ srt_label -> - absC (CRetDirect uniq code (srt_label,srt) liveness) + getSRTInfo srt `thenFC` \ srt_info -> + absC (CRetDirect uniq code srt_info liveness) `thenC` returnFC ()) `thenFC` \ (vSp, _) -> @@ -199,7 +199,7 @@ cgLetNoEscapeBody binder cc all_args body uniq let arg_kinds = map idPrimRep all_args (arg_regs, _) = assignRegs [{-nothing live-}] arg_kinds - (reg_args, stk_args) = splitAt (length arg_regs) all_args + (reg_args, stk_args) = splitAtList arg_regs all_args (sp_stk_args, stk_offsets, stk_tags) = mkTaggedVirtStkOffsets sp idPrimRep stk_args @@ -227,7 +227,7 @@ cgLetNoEscapeBody binder cc all_args body uniq -- Do heap check [ToDo: omit for non-recursive case by recording in -- in envt and absorbing at call site] - altHeapCheck False arg_regs stk_tags frame_hdr_asst (Just uniq) ( + altHeapCheck False True arg_regs stk_tags frame_hdr_asst (Just uniq) ( cgExpr body )