[project @ 1999-03-22 16:57:10 by simonm]
authorsimonm <unknown>
Mon, 22 Mar 1999 16:57:11 +0000 (16:57 +0000)
committersimonm <unknown>
Mon, 22 Mar 1999 16:57:11 +0000 (16:57 +0000)
Previous commit broke let-no-escape.  Fix it up again.

ghc/compiler/codeGen/CgCase.lhs
ghc/compiler/codeGen/CgExpr.lhs

index 23733c4..99eb1ab 100644 (file)
@@ -1,7 +1,7 @@
 %
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
-% $Id: CgCase.lhs,v 1.24 1999/03/22 12:59:32 simonm Exp $
+% $Id: CgCase.lhs,v 1.25 1999/03/22 16:57:10 simonm Exp $
 %
 %********************************************************
 %*                                                     *
@@ -10,7 +10,8 @@
 %********************************************************
 
 \begin{code}
-module CgCase (        cgCase, saveVolatileVarsAndRegs, restoreCurrentCostCentre,
+module CgCase (        cgCase, saveVolatileVarsAndRegs, 
+               restoreCurrentCostCentre, freeCostCentreSlot,
                splitTyConAppThroughNewTypes ) where
 
 #include "HsVersions.h"
index 9dbe3a2..2f41064 100644 (file)
@@ -1,7 +1,7 @@
 %
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
-% $Id: CgExpr.lhs,v 1.20 1999/03/11 11:32:26 simonm Exp $
+% $Id: CgExpr.lhs,v 1.21 1999/03/22 16:57:11 simonm Exp $
 %
 %********************************************************
 %*                                                     *
@@ -24,7 +24,7 @@ import CLabel         ( mkClosureTblLabel )
 import SMRep           ( fixedHdrSize )
 import CgBindery       ( getArgAmodes, CgIdInfo, nukeDeadBindings )
 import CgCase          ( cgCase, saveVolatileVarsAndRegs, 
-                         restoreCurrentCostCentre,
+                         restoreCurrentCostCentre, freeCostCentreSlot,
                          splitTyConAppThroughNewTypes )
 import CgClosure       ( cgRhsClosure, cgStdRhsClosure )
 import CgCon           ( buildDynCon, cgReturnDataCon )
@@ -207,6 +207,7 @@ cgExpr (StgLetNoEscape live_in_whole_let live_in_rhss bindings body)
     saveVolatileVarsAndRegs live_in_rhss
            `thenFC` \ (save_assts, rhs_eob_info, maybe_cc_slot) ->
     -- ToDo: cost centre???
+    freeCostCentreSlot maybe_cc_slot      `thenC`
     restoreCurrentCostCentre maybe_cc_slot `thenFC` \ restore_cc ->
 
        -- Save those variables right now!