summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2007-08-09 15:37:37 +0000
committersimonpj@microsoft.com <unknown>2007-08-09 15:37:37 +0000
commit1c5499d4d5d506ce0cc971e98c09bfbf7bc290a1 (patch)
treeb615619708fc0fbb334389aea9bf33cd7c0d8bcf /compiler/codeGen
parent474b582b68ea9289f3da4355da816164138604b0 (diff)
downloadhaskell-1c5499d4d5d506ce0cc971e98c09bfbf7bc290a1.tar.gz
Rename a constructor CmmForeignCall to CmmCallee, and tidy Cmm code
This patch should have no effect; it's mainly comments, layout, plus this contructor name change.
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/CgForeignCall.hs10
-rw-r--r--compiler/codeGen/CgHpc.hs2
-rw-r--r--compiler/codeGen/CgPrimOp.hs4
-rw-r--r--compiler/codeGen/CgUtils.hs2
4 files changed, 9 insertions, 9 deletions
diff --git a/compiler/codeGen/CgForeignCall.hs b/compiler/codeGen/CgForeignCall.hs
index ce272e9a86..dd959943fb 100644
--- a/compiler/codeGen/CgForeignCall.hs
+++ b/compiler/codeGen/CgForeignCall.hs
@@ -73,7 +73,7 @@ emitForeignCall results (CCall (CCallSpec target cconv safety)) args live
= do vols <- getVolatileRegs live
srt <- getSRTInfo
emitForeignCall' safety results
- (CmmForeignCall cmm_target cconv) call_args (Just vols) srt
+ (CmmCallee cmm_target cconv) call_args (Just vols) srt
where
(call_args, cmm_target)
= case target of
@@ -128,12 +128,12 @@ emitForeignCall' safety results target args vols srt
-- Once that happens, this function will just emit a (CmmSafe srt) call,
-- and the CPS will will be the one to convert that
-- to this sequence of three CmmUnsafe calls.
- stmtC (CmmCall (CmmForeignCall suspendThread CCallConv)
+ stmtC (CmmCall (CmmCallee suspendThread CCallConv)
[ (id,PtrHint) ]
[ (CmmReg (CmmGlobal BaseReg), PtrHint) ]
CmmUnsafe)
stmtC (CmmCall temp_target results temp_args CmmUnsafe)
- stmtC (CmmCall (CmmForeignCall resumeThread CCallConv)
+ stmtC (CmmCall (CmmCallee resumeThread CCallConv)
[ (new_base, PtrHint) ]
[ (CmmReg (CmmLocal id), PtrHint) ]
CmmUnsafe)
@@ -159,9 +159,9 @@ load_args_into_temps = mapM arg_assign_temp
tmp <- maybe_assign_temp e
return (tmp,hint)
-load_target_into_temp (CmmForeignCall expr conv) = do
+load_target_into_temp (CmmCallee expr conv) = do
tmp <- maybe_assign_temp expr
- return (CmmForeignCall tmp conv)
+ return (CmmCallee tmp conv)
load_target_into_temp other_target =
return other_target
diff --git a/compiler/codeGen/CgHpc.hs b/compiler/codeGen/CgHpc.hs
index 811029bb18..e846f0e791 100644
--- a/compiler/codeGen/CgHpc.hs
+++ b/compiler/codeGen/CgHpc.hs
@@ -65,7 +65,7 @@ initHpc this_mod (HpcInfo tickCount hashNo)
; emitForeignCall'
PlayRisky
[(id,NoHint)]
- (CmmForeignCall
+ (CmmCallee
(CmmLit $ CmmLabel $ mkForeignLabel mod_alloc Nothing False)
CCallConv
)
diff --git a/compiler/codeGen/CgPrimOp.hs b/compiler/codeGen/CgPrimOp.hs
index e489d73646..049e12a986 100644
--- a/compiler/codeGen/CgPrimOp.hs
+++ b/compiler/codeGen/CgPrimOp.hs
@@ -117,7 +117,7 @@ emitPrimOp [res] ParOp [arg] live
vols <- getVolatileRegs live
emitForeignCall' PlayRisky
[(res,NoHint)]
- (CmmForeignCall newspark CCallConv)
+ (CmmCallee newspark CCallConv)
[(CmmReg (CmmGlobal BaseReg), PtrHint), (arg,PtrHint)]
(Just vols)
NoC_SRT -- No SRT b/c we do PlayRisky
@@ -133,7 +133,7 @@ emitPrimOp [] WriteMutVarOp [mutv,var] live
vols <- getVolatileRegs live
emitForeignCall' PlayRisky
[{-no results-}]
- (CmmForeignCall (CmmLit (CmmLabel mkDirty_MUT_VAR_Label))
+ (CmmCallee (CmmLit (CmmLabel mkDirty_MUT_VAR_Label))
CCallConv)
[(CmmReg (CmmGlobal BaseReg), PtrHint), (mutv,PtrHint)]
(Just vols)
diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs
index 19f5eabb2f..9ebcf90e30 100644
--- a/compiler/codeGen/CgUtils.hs
+++ b/compiler/codeGen/CgUtils.hs
@@ -358,7 +358,7 @@ emitRtsCall' res fun args vols safe = do
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)
-----------------------------------------------------------------------------