X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FcodeGen%2FCgLetNoEscape.lhs;h=14f5fb8269cc910d6e9bf6f5adabe53538e14804;hp=ffec5709bbc4fb3f6519b903aa2e40e749df7e59;hb=9d0c8f842e35dde3d570580cf62a32779f66a6de;hpb=49ea1fa53acd2569b0b74c86a981b0d3779515dd diff --git a/compiler/codeGen/CgLetNoEscape.lhs b/compiler/codeGen/CgLetNoEscape.lhs index ffec570..14f5fb8 100644 --- a/compiler/codeGen/CgLetNoEscape.lhs +++ b/compiler/codeGen/CgLetNoEscape.lhs @@ -1,8 +1,7 @@ % +% (c) The University of Glasgow 2006 % (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 % -% $Id: CgLetNoEscape.lhs,v 1.26 2004/09/30 10:35:47 simonpj Exp $ -% %******************************************************** %* * \section[CgLetNoEscape]{Handling ``let-no-escapes''} @@ -19,21 +18,21 @@ import {-# SOURCE #-} CgExpr ( cgExpr ) import StgSyn import CgMonad -import CgBindery ( CgIdInfo, letNoEscapeIdInfo, nukeDeadBindings ) -import CgCase ( restoreCurrentCostCentre ) -import CgCon ( bindUnboxedTupleComponents ) -import CgHeapery ( unbxTupleHeapCheck ) -import CgInfoTbls ( emitDirectReturnTarget ) -import CgStackery ( allocStackTop, deAllocStackTop, getSpRelOffset ) -import Cmm ( CmmStmt(..) ) -import CmmUtils ( mkLblExpr, oneStmt ) -import CLabel ( mkReturnInfoLabel ) -import ClosureInfo ( mkLFLetNoEscape ) -import CostCentre ( CostCentreStack ) -import Id ( Id, idName ) -import Var ( idUnique ) -import SMRep ( retAddrSizeW ) -import BasicTypes ( RecFlag(..) ) +import CgBindery +import CgCase +import CgCon +import CgHeapery +import CgInfoTbls +import CgStackery +import Cmm +import CmmUtils +import CLabel +import ClosureInfo +import CostCentre +import Id +import Var +import SMRep +import BasicTypes \end{code} %************************************************************************ @@ -138,7 +137,6 @@ cgLetNoEscapeClosure :: Id -- binder -> CostCentreStack -- NB: *** NOT USED *** ToDo (WDP 94/06) -> StgBinderInfo -- NB: ditto - -> SRT -> StgLiveVars -- variables live in RHS, including the binders -- themselves in the case of a recursive group -> EndOfBlockInfo -- where are we going to? @@ -151,8 +149,8 @@ cgLetNoEscapeClosure -- ToDo: deal with the cost-centre issues cgLetNoEscapeClosure - bndr cc binder_info srt full_live_in_rhss - rhs_eob_info cc_slot rec args body + bndr cc _ full_live_in_rhss + rhs_eob_info cc_slot _ args body = let arity = length args lf_info = mkLFLetNoEscape arity @@ -170,7 +168,7 @@ cgLetNoEscapeClosure -- Ignore the label that comes back from -- mkRetDirectTarget. It must be conjured up elswhere - ; emitDirectReturnTarget (idName bndr) abs_c srt + ; _ <- emitReturnTarget (idName bndr) abs_c ; return () }) ; returnFC (bndr, letNoEscapeIdInfo bndr vSp lf_info) } @@ -184,7 +182,7 @@ cgLetNoEscapeBody :: Id -- Name of the joint point -> StgExpr -- Body -> Code -cgLetNoEscapeBody bndr cc cc_slot all_args body = do +cgLetNoEscapeBody bndr _ cc_slot all_args body = do { (arg_regs, ptrs, nptrs, ret_slot) <- bindUnboxedTupleComponents all_args -- restore the saved cost centre. BUT: we must not free the stack slot