X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FcodeGen%2FCgInfoTbls.hs;h=274583222713b43598cb15fd5f09d34c1223d829;hp=c9439ce837e89aeed55b0ef0ff387ee6b7579047;hb=d9a655dad8e013e41c74dca98fb86c4ed6f29879;hpb=02fe6d8bcaec1783c4b3dcc70f06de6244e96d12 diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs index c9439ce..2745832 100644 --- a/compiler/codeGen/CgInfoTbls.hs +++ b/compiler/codeGen/CgInfoTbls.hs @@ -1,10 +1,3 @@ -{-# OPTIONS -w #-} --- The above warning supression flag is a temporary kludge. --- While working on this module you are encouraged to remove it and fix --- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings --- for details - ----------------------------------------------------------------------------- -- -- Building info tables. @@ -38,18 +31,15 @@ import CgCallConv import CgUtils import CgMonad -import CmmUtils -import Cmm +import OldCmmUtils +import OldCmm import CLabel -import StgSyn import Name import DataCon import Unique import StaticFlags -import Maybes import Constants -import Panic import Util import Outputable @@ -63,7 +53,7 @@ import Outputable -- representation as a list of 'CmmAddr' is handled later -- in the pipeline by 'cmmToRawCmm'. -emitClosureCodeAndInfoTable :: ClosureInfo -> CmmFormals -> CgStmts -> Code +emitClosureCodeAndInfoTable :: ClosureInfo -> [CmmFormal] -> CgStmts -> Code emitClosureCodeAndInfoTable cl_info args body = do { blks <- cgStmtsToBlocks body ; info <- mkCmmInfo cl_info @@ -237,7 +227,7 @@ stack_layout ((off, bind):binds) sizeW | off == sizeW - 1 = stack_bind = LocalReg unique machRep unique = getUnique (cgIdInfoId bind) machRep = argMachRep (cgIdInfoArgRep bind) -stack_layout binds@((off, _):_) sizeW | otherwise = +stack_layout binds@(_:_) sizeW | otherwise = Nothing : (stack_layout binds (sizeW - 1)) {- Another way to write the function that might be less error prone (untested) @@ -291,8 +281,6 @@ emitAlgReturnTarget name branches mb_deflt fam_sz ; return (lbl, Nothing) } -- Nothing: the internal branches in the switch don't have -- global labels, so we can't use them at the 'call site' - where - uniq = getUnique name -------------------------------- emitReturnInstr :: Code @@ -317,7 +305,8 @@ stdInfoTableSizeW size_prof | opt_SccProfilingOn = 2 | otherwise = 0 -stdInfoTableSizeB = stdInfoTableSizeW * wORD_SIZE :: ByteOff +stdInfoTableSizeB :: ByteOff +stdInfoTableSizeB = stdInfoTableSizeW * wORD_SIZE stdSrtBitmapOffset :: ByteOff -- Byte offset of the SRT bitmap half-word which is @@ -423,7 +412,7 @@ funInfoTable info_ptr emitInfoTableAndCode :: CLabel -- Label of entry or ret -> CmmInfo -- ...the info table - -> CmmFormals -- ...args + -> [CmmFormal] -- ...args -> [CmmBasicBlock] -- ...and body -> Code