X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc%2Fcompiler%2FcodeGen%2FCgClosure.lhs;h=cfd5ceade1a28eefe45a57fc4b145d0c52107f8c;hp=81ff55f65ce85d5487e1036c6b7d53447ce66709;hb=e7498a3ee1d0484d02a9e86633cc179c76ebf36e;hpb=30cf375e0bc79a6b71074a5e0fd2ec393241a751 diff --git a/ghc/compiler/codeGen/CgClosure.lhs b/ghc/compiler/codeGen/CgClosure.lhs index 81ff55f..cfd5cea 100644 --- a/ghc/compiler/codeGen/CgClosure.lhs +++ b/ghc/compiler/codeGen/CgClosure.lhs @@ -12,8 +12,8 @@ with {\em closures} on the RHSs of let(rec)s. See also module CgClosure ( cgTopRhsClosure, cgRhsClosure ) where -import Ubiq{-uitous-} -import CgLoop2 ( cgExpr, cgSccExpr ) +IMP_Ubiq(){-uitous-} +IMPORT_DELOOPER(CgLoop2) ( cgExpr, cgSccExpr ) import CgMonad import AbsCSyn @@ -451,7 +451,10 @@ closureCodeBody binder_info closure_info cc all_args body ViaNode | is_concurrent -> [] other -> panic "closureCodeBody:arg_regs" - stk_args = drop (length arg_regs) all_args + num_arg_regs = length arg_regs + + (reg_args, stk_args) = splitAt num_arg_regs all_args + (spA_stk_args, spB_stk_args, stk_bxd_w_offsets, stk_ubxd_w_offsets) = mkVirtStkOffsets 0 0 -- Initial virtual SpA, SpB @@ -509,7 +512,7 @@ closureCodeBody binder_info closure_info cc all_args body -- Bind args to regs/stack as appropriate, and -- record expected position of sps - bindArgsToRegs all_args arg_regs `thenC` + bindArgsToRegs reg_args arg_regs `thenC` mapCs bindNewToAStack stk_bxd_w_offsets `thenC` mapCs bindNewToBStack stk_ubxd_w_offsets `thenC` setRealAndVirtualSps spA_stk_args spB_stk_args `thenC` @@ -863,8 +866,6 @@ setupUpdate closure_info code `thenC` returnFC amode - closure_label = mkClosureLabel (closureId closure_info) - vector = case (closureType closure_info) of Nothing -> CReg StdUpdRetVecReg