X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FstgSyn%2FCoreToStg.lhs;fp=compiler%2FstgSyn%2FCoreToStg.lhs;h=f49f092b64031e12b22501bcf161c898cf0cf95f;hp=b5484a44d39b8e13ee1578d8c63aca1bfe93e7d1;hb=7854ec4b11e117f8514553890851d14a66690fbb;hpb=e5fba2f55f560b41e27047bf59958729d51aca84 diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs index b5484a4..f49f092 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'