Typo fix in comment
[ghc-hetmet.git] / compiler / codeGen / CgInfoTbls.hs
index 6d270ae..4e38485 100644 (file)
@@ -60,7 +60,7 @@ emitClosureCodeAndInfoTable :: ClosureInfo -> CmmFormals -> CgStmts -> Code
 emitClosureCodeAndInfoTable cl_info args body
  = do  { blks <- cgStmtsToBlocks body
         ; info <- mkCmmInfo cl_info
-        ; emitInfoTableAndCode info_lbl info args blks }
+        ; emitInfoTableAndCode (infoLblToEntryLbl info_lbl) info args blks }
   where
     info_lbl  = infoTableLabelFromCI cl_info
 
@@ -89,12 +89,12 @@ mkCmmInfo cl_info = do
            info = ConstrInfo (ptrs, nptrs)
                              (fromIntegral (dataConTagZ con))
                              conName
-       return $ CmmInfo prof gc_target cl_type info
+       return $ CmmInfo gc_target Nothing (CmmInfoTable prof cl_type info)
 
     ClosureInfo { closureName   = name,
                   closureLFInfo = lf_info,
                   closureSRT    = srt } ->
-       return $ CmmInfo prof gc_target cl_type info
+       return $ CmmInfo gc_target Nothing (CmmInfoTable prof cl_type info)
        where
          info =
              case lf_info of
@@ -145,11 +145,13 @@ emitReturnTarget name stmts
        ; blks <- cgStmtsToBlocks stmts
         ; frame <- mkStackLayout
         ; let info = CmmInfo
-                       (ProfilingInfo zeroCLit zeroCLit)
                        gc_target
-                       rET_SMALL -- cmmToRawCmm may convert it to rET_BIG
-                       (ContInfo frame srt_info)
-        ; emitInfoTableAndCode info_lbl info args blks
+                       Nothing
+                       (CmmInfoTable
+                        (ProfilingInfo zeroCLit zeroCLit)
+                        rET_SMALL -- cmmToRawCmm may convert it to rET_BIG
+                        (ContInfo frame srt_info))
+        ; emitInfoTableAndCode (infoLblToEntryLbl info_lbl) info args blks
        ; return info_lbl }
   where
     args      = {- trace "emitReturnTarget: missing args" -} []
@@ -399,16 +401,14 @@ funInfoTable info_ptr
 -- put the info table next to the code
 
 emitInfoTableAndCode 
-       :: CLabel               -- Label of info table
+       :: CLabel               -- Label of entry or ret
        -> CmmInfo              -- ...the info table
        -> CmmFormals           -- ...args
        -> [CmmBasicBlock]      -- ...and body
        -> Code
 
-emitInfoTableAndCode info_lbl info args blocks
-  = emitProc info entry_lbl args blocks
-  where
-       entry_lbl = infoLblToEntryLbl info_lbl
+emitInfoTableAndCode entry_ret_lbl info args blocks
+  = emitProc info entry_ret_lbl args blocks
 
 -------------------------------------------------------------------------
 --