diff options
author | Ben.Lippmeier@anu.edu.au <unknown> | 2010-01-02 05:37:54 +0000 |
---|---|---|
committer | Ben.Lippmeier@anu.edu.au <unknown> | 2010-01-02 05:37:54 +0000 |
commit | 7854ec4b11e117f8514553890851d14a66690fbb (patch) | |
tree | f96e7dd94f39eda39fe86da0298e3f628a35ef65 /compiler/stgSyn | |
parent | e5fba2f55f560b41e27047bf59958729d51aca84 (diff) | |
download | haskell-7854ec4b11e117f8514553890851d14a66690fbb.tar.gz |
Tag ForeignCalls with the package they correspond to
Diffstat (limited to 'compiler/stgSyn')
-rw-r--r-- | compiler/stgSyn/CoreToStg.lhs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs index b5484a44d3..f49f092b64 100644 --- a/compiler/stgSyn/CoreToStg.lhs +++ b/compiler/stgSyn/CoreToStg.lhs @@ -528,15 +528,20 @@ coreToStgApp _ f args = do res_ty = exprType (mkApps (Var f) args) app = case idDetails f of DataConWorkId dc | saturated -> StgConApp dc args' + + -- Some primitive operator that might be implemented as a library call. PrimOpId op -> ASSERT( saturated ) StgOpApp (StgPrimOp op) args' res_ty - FCallId (CCall (CCallSpec (StaticTarget lbl) PrimCallConv _)) - -- prim calls are represented as FCalls in core, - -- but in stg we distinguish them - -> ASSERT( saturated ) - StgOpApp (StgPrimCallOp (PrimCall lbl)) args' res_ty + + -- A call to some primitive Cmm function. + FCallId (CCall (CCallSpec (PackageTarget lbl (Just pkgId)) PrimCallConv _)) + -> ASSERT( saturated ) + StgOpApp (StgPrimCallOp (PrimCall lbl pkgId)) args' res_ty + + -- A regular foreign call. FCallId call -> ASSERT( saturated ) StgOpApp (StgFCallOp call (idUnique f)) args' res_ty + TickBoxOpId {} -> pprPanic "coreToStg TickBox" $ ppr (f,args') _other -> StgApp f args' |