projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add PrimCall to the STG layer and update Core -> STG translation
[ghc-hetmet.git]
/
compiler
/
prelude
/
ForeignCall.lhs
diff --git
a/compiler/prelude/ForeignCall.lhs
b/compiler/prelude/ForeignCall.lhs
index
cae46be
..
015b28e
100644
(file)
--- a/
compiler/prelude/ForeignCall.lhs
+++ b/
compiler/prelude/ForeignCall.lhs
@@
-134,7
+134,7
@@
platforms.
See: http://www.programmersheaven.com/2/Calling-conventions
\begin{code}
See: http://www.programmersheaven.com/2/Calling-conventions
\begin{code}
-data CCallConv = CCallConv | StdCallConv | CmmCallConv
+data CCallConv = CCallConv | StdCallConv | CmmCallConv | PrimCallConv
deriving (Eq)
{-! derive: Binary !-}
deriving (Eq)
{-! derive: Binary !-}
@@
-142,6
+142,7
@@
instance Outputable CCallConv where
ppr StdCallConv = ptext (sLit "stdcall")
ppr CCallConv = ptext (sLit "ccall")
ppr CmmCallConv = ptext (sLit "C--")
ppr StdCallConv = ptext (sLit "stdcall")
ppr CCallConv = ptext (sLit "ccall")
ppr CmmCallConv = ptext (sLit "C--")
+ ppr PrimCallConv = ptext (sLit "prim")
defaultCCallConv :: CCallConv
defaultCCallConv = CCallConv
defaultCCallConv :: CCallConv
defaultCCallConv = CCallConv
@@
-332,11
+333,14
@@
instance Binary CCallConv where
putByte bh 0
put_ bh StdCallConv = do
putByte bh 1
putByte bh 0
put_ bh StdCallConv = do
putByte bh 1
+ put_ bh PrimCallConv = do
+ putByte bh 2
get bh = do
h <- getByte bh
case h of
0 -> do return CCallConv
get bh = do
h <- getByte bh
case h of
0 -> do return CCallConv
- _ -> do return StdCallConv
+ 1 -> do return StdCallConv
+ _ -> do return PrimCallConv
instance Binary DNCallSpec where
put_ bh (DNCallSpec isStatic kind ass nm _ _) = do
instance Binary DNCallSpec where
put_ bh (DNCallSpec isStatic kind ass nm _ _) = do