diff options
author | simonpj <unknown> | 2004-12-08 14:32:34 +0000 |
---|---|---|
committer | simonpj <unknown> | 2004-12-08 14:32:34 +0000 |
commit | 7504acab79c4ac75159337c50050c254d83e5184 (patch) | |
tree | d9248732bb4c61be5ec7126f6600f2466b1cc458 /ghc/compiler/codeGen | |
parent | c418e72f39aee1510267d5c96fd4d7227cd455d9 (diff) | |
download | haskell-7504acab79c4ac75159337c50050c254d83e5184.tar.gz |
[project @ 2004-12-08 14:32:28 by simonpj]
Comments and asserts only
Diffstat (limited to 'ghc/compiler/codeGen')
-rw-r--r-- | ghc/compiler/codeGen/CgBindery.lhs | 2 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgClosure.lhs | 9 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgMonad.lhs | 4 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CodeGen.lhs | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/ghc/compiler/codeGen/CgBindery.lhs b/ghc/compiler/codeGen/CgBindery.lhs index 2254ff7df9..e6e1043a47 100644 --- a/ghc/compiler/codeGen/CgBindery.lhs +++ b/ghc/compiler/codeGen/CgBindery.lhs @@ -91,7 +91,7 @@ voidIdInfo id = CgIdInfo { cg_id = id, cg_vol = NoVolatileLoc , cg_rep = VoidArg } -- Used just for VoidRep things -data VolatileLoc +data VolatileLoc -- These locations die across a call = NoVolatileLoc | RegLoc CmmReg -- In one of the registers (global or local) | VirHpLoc VirtualHpOffset -- Hp+offset (address of closure) diff --git a/ghc/compiler/codeGen/CgClosure.lhs b/ghc/compiler/codeGen/CgClosure.lhs index 0369b1ba03..3c8066ba97 100644 --- a/ghc/compiler/codeGen/CgClosure.lhs +++ b/ghc/compiler/codeGen/CgClosure.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgClosure.lhs,v 1.65 2004/11/26 16:20:03 simonmar Exp $ +% $Id: CgClosure.lhs,v 1.66 2004/12/08 14:32:29 simonpj Exp $ % \section[CgClosure]{Code generation for closures} @@ -237,7 +237,7 @@ So it should set up an update frame (if it is shared). NB: Thunks cannot have a primitive type! \begin{code} -closureCodeBody binder_info cl_info cc [] body = do +closureCodeBody binder_info cl_info cc [{- No args i.e. thunk -}] body = do { body_absC <- getCgStmts $ do { tickyEnterThunk cl_info ; ldvEnter (CmmReg nodeReg) -- NB: Node always points when profiling @@ -261,8 +261,9 @@ argSatisfactionCheck (by calling fetchAndReschedule). There info if Node points to closure is available. -- HWL \begin{code} -closureCodeBody binder_info cl_info cc args body = do - { -- Get the current virtual Sp (it might not be zero, +closureCodeBody binder_info cl_info cc args body + = ASSERT( length args > 0 ) + do { -- Get the current virtual Sp (it might not be zero, -- eg. if we're compiling a let-no-escape). vSp <- getVirtSp ; let (reg_args, other_args) = assignCallRegs (addIdReps args) diff --git a/ghc/compiler/codeGen/CgMonad.lhs b/ghc/compiler/codeGen/CgMonad.lhs index d9d0801a03..4ba8f093b3 100644 --- a/ghc/compiler/codeGen/CgMonad.lhs +++ b/ghc/compiler/codeGen/CgMonad.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgMonad.lhs,v 1.42 2004/11/26 16:20:10 simonmar Exp $ +% $Id: CgMonad.lhs,v 1.43 2004/12/08 14:32:31 simonpj Exp $ % \section[CgMonad]{The code generation monad} @@ -280,7 +280,7 @@ data StackUsage hwSp :: VirtualSpOffset } -- Highest value ever taken by virtSp --- INVARAINT: The environment contains no Stable references to +-- INVARIANT: The environment contains no Stable references to -- stack slots below (lower offset) frameSp -- It can contain volatile references to this area though. diff --git a/ghc/compiler/codeGen/CodeGen.lhs b/ghc/compiler/codeGen/CodeGen.lhs index 056fb1ef50..608ff92671 100644 --- a/ghc/compiler/codeGen/CodeGen.lhs +++ b/ghc/compiler/codeGen/CodeGen.lhs @@ -295,7 +295,7 @@ cgTopBinding dflags (StgRec pairs, srts) ; bndrs' <- mapFCs maybeExternaliseId bndrs ; let pairs' = zip bndrs' rhss ; mapM_ (mkSRT dflags bndrs') srts - ; new_binds <- fixC (\ new_binds -> do + ; _new_binds <- fixC (\ new_binds -> do { addBindsC new_binds ; mapFCs ( \ (b,e) -> cgTopRhs b e ) pairs' }) ; nopC } |