summaryrefslogtreecommitdiff
path: root/compiler/codeGen/ClosureInfo.lhs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-12 11:31:11 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-12 11:31:11 +0100
commitf611396a581e733c41cee41750c95675bdb64961 (patch)
tree5ac98a36e98a6a58e97de9d1a7605386a41cd688 /compiler/codeGen/ClosureInfo.lhs
parent6986eb91102b42ed61953500b60724c385dd658c (diff)
downloadhaskell-f611396a581e733c41cee41750c95675bdb64961.tar.gz
Pass DynFlags down to bWord
I've switched to passing DynFlags rather than Platform, as (a) it's simpler to not have to extract targetPlatform in so many places, and (b) it may be useful to have DynFlags around in future.
Diffstat (limited to 'compiler/codeGen/ClosureInfo.lhs')
-rw-r--r--compiler/codeGen/ClosureInfo.lhs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs
index ae05bffbb8..88174b9f8c 100644
--- a/compiler/codeGen/ClosureInfo.lhs
+++ b/compiler/codeGen/ClosureInfo.lhs
@@ -265,13 +265,13 @@ instance Outputable CgRep where
ppr FloatArg = ptext (sLit "F_")
ppr DoubleArg = ptext (sLit "D_")
-argMachRep :: CgRep -> CmmType
-argMachRep PtrArg = gcWord
-argMachRep NonPtrArg = bWord
-argMachRep LongArg = b64
-argMachRep FloatArg = f32
-argMachRep DoubleArg = f64
-argMachRep VoidArg = panic "argMachRep:VoidRep"
+argMachRep :: DynFlags -> CgRep -> CmmType
+argMachRep _ PtrArg = gcWord
+argMachRep dflags NonPtrArg = bWord dflags
+argMachRep _ LongArg = b64
+argMachRep _ FloatArg = f32
+argMachRep _ DoubleArg = f64
+argMachRep _ VoidArg = panic "argMachRep:VoidRep"
primRepToCgRep :: PrimRep -> CgRep
primRepToCgRep VoidRep = VoidArg