Another round of External Core fixes
[ghc-hetmet.git] / compiler / codeGen / CgInfoTbls.hs
index e9751fa..14004ce 100644 (file)
@@ -1,3 +1,10 @@
+{-# 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.
@@ -57,7 +64,7 @@ import Outputable
 -- representation as a list of 'CmmAddr' is handled later
 -- in the pipeline by 'cmmToRawCmm'.
 
-emitClosureCodeAndInfoTable :: ClosureInfo -> CmmFormals -> CgStmts -> Code
+emitClosureCodeAndInfoTable :: ClosureInfo -> CmmFormalsWithoutKinds -> CgStmts -> Code
 emitClosureCodeAndInfoTable cl_info args body
  = do  { blks <- cgStmtsToBlocks body
         ; info <- mkCmmInfo cl_info
@@ -74,13 +81,11 @@ dataConTagZ con = dataConTag con - fIRST_TAG
 -- Not used for return points.  (The 'smRepClosureTypeInt' call would panic.)
 mkCmmInfo :: ClosureInfo -> FCode CmmInfo
 mkCmmInfo cl_info = do
-  prof <- 
-      if opt_SccProfilingOn 
+  prof <-
+      if opt_SccProfilingOn
       then do ty_descr_lit <- mkStringCLit (closureTypeDescr cl_info)
               cl_descr_lit <- mkStringCLit (closureValDescr cl_info)
-              return $ ProfilingInfo
-                         (makeRelativeRefTo info_lbl ty_descr_lit)
-                         (makeRelativeRefTo info_lbl cl_descr_lit)
+              return $ ProfilingInfo ty_descr_lit cl_descr_lit
       else return $ ProfilingInfo (mkIntCLit 0) (mkIntCLit 0)
 
   case cl_info of
@@ -234,8 +239,8 @@ stack_layout ((off, bind):binds) sizeW | off == sizeW - 1 =
     unique = getUnique (cgIdInfoId bind)
     machRep = argMachRep (cgIdInfoArgRep bind)
     kind = if isFollowableArg (cgIdInfoArgRep bind)
-           then KindPtr
-           else KindNonPtr
+           then GCKindPtr
+           else GCKindNonPtr
 stack_layout binds@((off, _):_) sizeW | otherwise =
   Nothing : (stack_layout binds (sizeW - 1))
 
@@ -261,8 +266,8 @@ stack_layout offsets sizeW = result
         unique = getUnique (cgIdInfoId x)
         machRep = argMachrep (cgIdInfoArgRep bind)
         kind = if isFollowableArg (cgIdInfoArgRep bind)
-           then KindPtr
-           else KindNonPtr
+           then GCKindPtr
+           else GCKindNonPtr
 -}
 
 emitAlgReturnTarget
@@ -422,7 +427,7 @@ funInfoTable info_ptr
 emitInfoTableAndCode 
        :: CLabel               -- Label of entry or ret
        -> CmmInfo              -- ...the info table
-       -> CmmFormals           -- ...args
+       -> CmmFormalsWithoutKinds               -- ...args
        -> [CmmBasicBlock]      -- ...and body
        -> Code