From: Duncan Coutts Date: Tue, 9 Jun 2009 15:11:55 +0000 (+0000) Subject: Add PrimCall to the STG layer and update Core -> STG translation X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=cbbee4e8727c583daf32d9bf17f00afaa839ef10;hp=cbbee4e8727c583daf32d9bf17f00afaa839ef10;p=ghc-hetmet.git Add PrimCall to the STG layer and update Core -> STG translation It adds a third case to StgOp which already hold StgPrimOp and StgFCallOp. The code generation for the new StgPrimCallOp case is almost exactly the same as for out-of-line primops. They now share the tailCallPrim function. In the Core -> STG translation we map foreign calls using the "prim" calling convention to the StgPrimCallOp case. This is because in Core we represent prim calls using the ForeignCall stuff. At the STG level however the prim calls are really much more like primops than foreign calls. ---