X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FcodeGen%2FCgInfoTbls.hs;h=e04079d6669d461170372c04489e30eb8ff32f13;hp=9fbe4fb36d18930348a254be98d5f292ba144695;hb=2c8aabcad1d2f2c469cb8a10afa7b66beeaedd45;hpb=176fa33f17dd78355cc572e006d2ab26898e2c69 diff --git a/compiler/codeGen/CgInfoTbls.hs b/compiler/codeGen/CgInfoTbls.hs index 9fbe4fb..e04079d 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 @@ -94,12 +84,12 @@ mkCmmInfo cl_info = do info = ConstrInfo (ptrs, nptrs) (fromIntegral (dataConTagZ con)) conName - return $ CmmInfo gc_target Nothing (CmmInfoTable prof cl_type info) + return $ CmmInfo gc_target Nothing (CmmInfoTable False prof cl_type info) ClosureInfo { closureName = name, closureLFInfo = lf_info, closureSRT = srt } -> - return $ CmmInfo gc_target Nothing (CmmInfoTable prof cl_type info) + return $ CmmInfo gc_target Nothing (CmmInfoTable False prof cl_type info) where info = case lf_info of @@ -152,7 +142,7 @@ emitReturnTarget name stmts ; let info = CmmInfo gc_target Nothing - (CmmInfoTable + (CmmInfoTable False (ProfilingInfo zeroCLit zeroCLit) rET_SMALL -- cmmToRawCmm may convert it to rET_BIG (ContInfo frame srt_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 @@ -432,18 +421,6 @@ emitInfoTableAndCode entry_ret_lbl info args blocks ------------------------------------------------------------------------- -- --- Static reference tables --- -------------------------------------------------------------------------- - -srtLabelAndLength :: C_SRT -> CLabel -> (CmmLit, StgHalfWord) -srtLabelAndLength NoC_SRT _ - = (zeroCLit, 0) -srtLabelAndLength (C_SRT lbl off bitmap) info_lbl - = (makeRelativeRefTo info_lbl $ cmmLabelOffW lbl off, bitmap) - -------------------------------------------------------------------------- --- -- Position independent code -- -------------------------------------------------------------------------