From 33918805ffc2e2a6fc9ff74ae4ce55052151ba90 Mon Sep 17 00:00:00 2001 From: "Michael D. Adams" Date: Thu, 5 Jul 2007 14:29:36 +0000 Subject: [PATCH] Warning Police --- compiler/cmm/CmmOpt.hs | 1 - compiler/codeGen/CgPrimOp.hs | 3 --- compiler/ghci/ByteCodeAsm.lhs | 6 +++--- compiler/nativeGen/AsmCodeGen.lhs | 1 - compiler/nativeGen/MachCodeGen.hs | 1 - compiler/nativeGen/RegisterAlloc.hs | 13 ++----------- compiler/ndpFlatten/Flattening.hs | 4 ---- compiler/utils/StringBuffer.lhs | 1 - 8 files changed, 5 insertions(+), 25 deletions(-) diff --git a/compiler/cmm/CmmOpt.hs b/compiler/cmm/CmmOpt.hs index 4b2a488..0a6c193 100644 --- a/compiler/cmm/CmmOpt.hs +++ b/compiler/cmm/CmmOpt.hs @@ -18,7 +18,6 @@ import Cmm import CmmUtils import CLabel import MachOp -import SMRep import StaticFlags import UniqFM diff --git a/compiler/codeGen/CgPrimOp.hs b/compiler/codeGen/CgPrimOp.hs index 01279b4..d26d9c6 100644 --- a/compiler/codeGen/CgPrimOp.hs +++ b/compiler/codeGen/CgPrimOp.hs @@ -20,16 +20,13 @@ import CgBindery import CgMonad import CgInfoTbls import CgUtils -import ForeignCall import Cmm import CLabel import CmmUtils import MachOp -import SMRep import PrimOp import SMRep import Constants -import StaticFlags import Outputable -- --------------------------------------------------------------------------- diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs index 31cbd25..9060138 100644 --- a/compiler/ghci/ByteCodeAsm.lhs +++ b/compiler/ghci/ByteCodeAsm.lhs @@ -168,9 +168,9 @@ assembleBCO (ProtoBCO nm instrs bitmap bsize arity origin malloced) -- when (notNull malloced) (addFinalizer ul_bco (mapM_ zonk malloced)) return ul_bco - where - zonk ptr = do -- putStrLn ("freeing malloc'd block at " ++ show (A# a#)) - free ptr + -- where + -- zonk ptr = do -- putStrLn ("freeing malloc'd block at " ++ show (A# a#)) + -- free ptr mkBitmapArray :: Int -> [StgWord] -> UArray Int StgWord mkBitmapArray bsize bitmap diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index a04c5c7..1cbdb7b 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -396,7 +396,6 @@ genMachCode cmm_top = do { initial_us <- getUs ; let initial_st = mkNatM_State initial_us 0 (new_tops, final_st) = initNat initial_st (cmmTopCodeGen cmm_top) - final_us = natm_us final_st final_delta = natm_delta final_st final_imports = natm_imports final_st ; if final_delta == 0 diff --git a/compiler/nativeGen/MachCodeGen.hs b/compiler/nativeGen/MachCodeGen.hs index a940566..557278c 100644 --- a/compiler/nativeGen/MachCodeGen.hs +++ b/compiler/nativeGen/MachCodeGen.hs @@ -42,7 +42,6 @@ import FastTypes ( isFastTrue ) import Constants ( wORD_SIZE ) #ifdef DEBUG -import Outputable ( assertPanic ) import Debug.Trace ( trace ) #endif diff --git a/compiler/nativeGen/RegisterAlloc.hs b/compiler/nativeGen/RegisterAlloc.hs index 0a732fb..20f7b61 100644 --- a/compiler/nativeGen/RegisterAlloc.hs +++ b/compiler/nativeGen/RegisterAlloc.hs @@ -102,7 +102,6 @@ import Outputable #ifndef DEBUG import Data.Maybe ( fromJust ) #endif -import Data.Maybe ( fromMaybe ) import Data.List ( nub, partition, mapAccumL, groupBy ) import Control.Monad ( when ) import Data.Word @@ -453,7 +452,7 @@ linearRegAlloc block_live sccs = linearRA_SCCs emptyBlockMap emptyStackMap sccs (CyclicSCC blocks : sccs) = getUs `thenUs` \us -> let - ((block_assig', stack', us'), blocks') = mapAccumL processBlock + ((block_assig', stack', _), blocks') = mapAccumL processBlock (block_assig, stack, us) ({-reverse-} blocks) in @@ -968,7 +967,7 @@ spillR reg temp = RegM $ \ s@RA_State{ra_delta=delta, ra_stack=stack} -> (# s{ra_stack=stack'}, (instr,slot) #) loadR :: Reg -> Int -> RegM Instr -loadR reg slot = RegM $ \ s@RA_State{ra_delta=delta, ra_stack=stack} -> +loadR reg slot = RegM $ \ s@RA_State{ra_delta=delta} -> (# s, mkLoadInstr reg delta slot #) getFreeRegsR :: RegM FreeRegs @@ -987,14 +986,6 @@ setAssigR :: RegMap Loc -> RegM () setAssigR assig = RegM $ \ s -> (# s{ra_assig=assig}, () #) -getStackR :: RegM StackMap -getStackR = RegM $ \ s@RA_State{ra_stack = stack} -> - (# s, stack #) - -setStackR :: StackMap -> RegM () -setStackR stack = RegM $ \ s -> - (# s{ra_stack=stack}, () #) - getBlockAssigR :: RegM BlockAssignment getBlockAssigR = RegM $ \ s@RA_State{ra_blockassig = assig} -> (# s, assig #) diff --git a/compiler/ndpFlatten/Flattening.hs b/compiler/ndpFlatten/Flattening.hs index 6072ad6..1286f1f 100644 --- a/compiler/ndpFlatten/Flattening.hs +++ b/compiler/ndpFlatten/Flattening.hs @@ -89,10 +89,6 @@ import BasicTypes (Boxity(..)) import Outputable import FastString - --- FIXME: fro debugging - remove this -import Debug.Trace (trace) - -- standard import Monad (liftM, foldM) diff --git a/compiler/utils/StringBuffer.lhs b/compiler/utils/StringBuffer.lhs index 69caf0e..1835945 100644 --- a/compiler/utils/StringBuffer.lhs +++ b/compiler/utils/StringBuffer.lhs @@ -45,7 +45,6 @@ import Foreign import System.IO ( hGetBuf, hFileSize,IOMode(ReadMode), hClose , Handle, hTell ) -import GHC.Ptr ( Ptr(..) ) import GHC.Exts import GHC.IOBase ( IO(..) ) import GHC.Base ( unsafeChr ) -- 1.7.10.4