summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-12-17 17:50:40 +0000
committerIan Lynagh <igloo@earth.li>2008-12-17 17:50:40 +0000
commit578467927486163fffc605880f83c7dbc952176f (patch)
tree4ce2d15073b1d3a7123ca73d3cd06b2d053d27a8
parentb4ca3b65d621bf8c792a41587bc5e10ab25b3350 (diff)
downloadhaskell-578467927486163fffc605880f83c7dbc952176f.tar.gz
Fix warnings in CgTailCall
-rw-r--r--compiler/codeGen/CgTailCall.lhs20
1 files changed, 7 insertions, 13 deletions
diff --git a/compiler/codeGen/CgTailCall.lhs b/compiler/codeGen/CgTailCall.lhs
index 73030d1d27..6f8fd040cb 100644
--- a/compiler/codeGen/CgTailCall.lhs
+++ b/compiler/codeGen/CgTailCall.lhs
@@ -5,13 +5,6 @@
% Code generation for tail calls.
\begin{code}
-{-# 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 CgTailCall (
cgTailCall, performTailCall,
performReturn, performPrimReturn,
@@ -41,7 +34,6 @@ import Type
import Id
import StgSyn
import PrimOp
-import FastString
import Outputable
import Control.Monad
@@ -141,7 +133,7 @@ performTailCall fun_info arg_amodes pending_assts
-- A real constructor. Don't bother entering it,
-- just do the right sort of return instead.
-- As with any return, Node must point to it.
- ReturnCon con -> do
+ ReturnCon _ -> do
{ emitSimultaneously (node_asst `plusStmts` pending_assts)
; doFinalJump sp False emitReturnInstr }
@@ -238,7 +230,9 @@ performTailCall fun_info arg_amodes pending_assts
-- CONSTR_NOCAF_STATIC (from ClosureType.h)
-}
-
+directCall :: VirtualSpOffset -> CLabel -> [(CgRep, CmmExpr)]
+ -> [(CgRep, CmmExpr)] -> CmmStmts
+ -> Code
directCall sp lbl args extra_args assts = do
let
-- First chunk of args go in registers
@@ -289,7 +283,7 @@ performReturn :: Code -- The code to execute to actually do the return
-> Code
performReturn finish_code
- = do { EndOfBlockInfo args_sp sequel <- getEndOfBlockInfo
+ = do { EndOfBlockInfo args_sp _sequel <- getEndOfBlockInfo
; doFinalJump args_sp False{-not a LNE-} finish_code }
-- ----------------------------------------------------------------------------
@@ -321,7 +315,7 @@ performPrimReturn rep amode
returnUnboxedTuple :: [(CgRep, CmmExpr)] -> Code
returnUnboxedTuple amodes
- = do { eob@(EndOfBlockInfo args_sp sequel) <- getEndOfBlockInfo
+ = do { (EndOfBlockInfo args_sp _sequel) <- getEndOfBlockInfo
; tickyUnboxedTupleReturn (length amodes)
; (final_sp, assts) <- pushUnboxedTuple args_sp amodes
; emitSimultaneously assts
@@ -415,7 +409,7 @@ tailCallPrimOp op args
pushReturnAddress :: EndOfBlockInfo -> Code
-pushReturnAddress (EndOfBlockInfo args_sp sequel@(CaseAlts lbl _ _))
+pushReturnAddress (EndOfBlockInfo args_sp (CaseAlts lbl _ _))
= do { sp_rel <- getSpRelOffset args_sp
; stmtC (CmmStore sp_rel (mkLblExpr lbl)) }