- (ptr_sp, ptr_offsets) = mkVirtStkOffsets sp idPrimRep ptr_args
- (nptr_sp, nptr_offsets) = mkVirtStkOffsets ptr_sp idPrimRep nptr_args
-
- ptrs = ptr_sp - sp
- nptrs = nptr_sp - ptr_sp
- in
-
- -- Bind args to appropriate regs/stk locns
- bindArgsToRegs reg_args arg_regs `thenC`
- mapCs bindNewToStack ptr_offsets `thenC`
- mapCs bindNewToStack nptr_offsets `thenC`
-
- setRealAndVirtualSp nptr_sp `thenC`
-
- -- free up the stack slots containing the return address
- -- (frame header itbl). c.f. CgCase.cgUnboxedTupleAlt.
- freeStackSlots [sp] `thenC`
+ -- restore the saved cost centre. BUT: we must not free the stack slot
+ -- containing the cost centre, because it might be needed for a
+ -- recursive call to this let-no-escape.
+ ; restoreCurrentCostCentre cc_slot False{-don't free-}