summaryrefslogtreecommitdiff
path: root/ghc/compiler/codeGen/CgClosure.lhs
diff options
context:
space:
mode:
authorpartain <unknown>1996-06-05 06:51:39 +0000
committerpartain <unknown>1996-06-05 06:51:39 +0000
commite7498a3ee1d0484d02a9e86633cc179c76ebf36e (patch)
treec1688b600d0b3c217b84cf07870379c29c969529 /ghc/compiler/codeGen/CgClosure.lhs
parent30cf375e0bc79a6b71074a5e0fd2ec393241a751 (diff)
downloadhaskell-e7498a3ee1d0484d02a9e86633cc179c76ebf36e.tar.gz
[project @ 1996-06-05 06:44:31 by partain]
SLPJ changes through 960604
Diffstat (limited to 'ghc/compiler/codeGen/CgClosure.lhs')
-rw-r--r--ghc/compiler/codeGen/CgClosure.lhs13
1 files changed, 7 insertions, 6 deletions
diff --git a/ghc/compiler/codeGen/CgClosure.lhs b/ghc/compiler/codeGen/CgClosure.lhs
index 81ff55f65c..cfd5ceade1 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