X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgUtils.hs;h=5446e45425259daa1ab2f5b03f6df2a2dfad272d;hb=16dc208aaad7aadaea970e47b8055d7d7f8781e5;hp=8d3578e1ef01a2cd21518a16e280779da6a13382;hpb=6015a94f9108a502150565577b66c23650796639;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index 8d3578e..5446e45 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -6,6 +6,13 @@ -- ----------------------------------------------------------------------------- +{-# 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 + module CgUtils ( addIdReps, cgLit, @@ -281,11 +288,11 @@ addToMemE rep ptr n -- ------------------------------------------------------------------------- -tagToClosure :: PackageId -> TyCon -> CmmExpr -> CmmExpr -tagToClosure this_pkg tycon tag +tagToClosure :: TyCon -> CmmExpr -> CmmExpr +tagToClosure tycon tag = CmmLoad (cmmOffsetExprW closure_tbl tag) wordRep where closure_tbl = CmmLit (CmmLabel lbl) - lbl = mkClosureTableLabel this_pkg (tyConName tycon) + lbl = mkClosureTableLabel (tyConName tycon) ------------------------------------------------------------------------- -- @@ -354,11 +361,11 @@ emitRtsCall' res fun args vols safe = do then getSRTInfo >>= (return . CmmSafe) else return CmmUnsafe stmtsC caller_save - stmtC (CmmCall target res args safety) + stmtC (CmmCall target res args safety CmmMayReturn) stmtsC caller_load where (caller_save, caller_load) = callerSaveVolatileRegs vols - target = CmmForeignCall fun_expr CCallConv + target = CmmCallee fun_expr CCallConv fun_expr = mkLblExpr (mkRtsCodeLabel fun) ----------------------------------------------------------------------------- @@ -555,7 +562,7 @@ emitDataLits :: CLabel -> [CmmLit] -> Code emitDataLits lbl lits = emitData Data (CmmDataLabel lbl : map CmmStaticLit lits) -mkDataLits :: CLabel -> [CmmLit] -> GenCmmTop CmmStatic info stmt +mkDataLits :: CLabel -> [CmmLit] -> GenCmmTop CmmStatic info graph -- Emit a data-segment data block mkDataLits lbl lits = CmmData Data (CmmDataLabel lbl : map CmmStaticLit lits) @@ -570,7 +577,7 @@ emitRODataLits lbl lits needsRelocation (CmmLabelOff _ _) = True needsRelocation _ = False -mkRODataLits :: CLabel -> [CmmLit] -> GenCmmTop CmmStatic info stmt +mkRODataLits :: CLabel -> [CmmLit] -> GenCmmTop CmmStatic info graph mkRODataLits lbl lits = CmmData section (CmmDataLabel lbl : map CmmStaticLit lits) where section | any needsRelocation lits = RelocatableReadOnlyData