import CLabel
import FastString
import ForeignCall
-import qualified ZipCfg as Z
import qualified ZipDataflow as DF
import ZipCfg
import MkZipCfg
import BasicTypes
import Maybes
-import Monad
+import Control.Monad
import Outputable
import Prelude hiding (zip, unzip, last)
-import qualified Data.List as L
import SMRep (ByteOff)
import UniqSupply
deriving Eq
data Convention
- = NativeCall -- Native C-- call
+ = NativeDirectCall -- Native C-- call skipping the node (closure) argument
+
+ | NativeNodeCall -- Native C-- call including the node argument
- | NativeReturn -- Native C-- return
+ | NativeReturn -- Native C-- return
- | Slow -- Slow entry points: all args pushed on the stack
+ | Slow -- Slow entry points: all args pushed on the stack
- | GC -- Entry to the garbage collector: uses the node reg!
+ | GC -- Entry to the garbage collector: uses the node reg!
- | PrimOpCall -- Calling prim ops
+ | PrimOpCall -- Calling prim ops
- | PrimOpReturn -- Returning from prim ops
+ | PrimOpReturn -- Returning from prim ops
- | Foreign -- Foreign call/return
- ForeignConvention
+ | Foreign -- Foreign call/return
+ ForeignConvention
| Private
-- Used for control transfers within a (pre-CPS) procedure All
]
pprConvention :: Convention -> SDoc
-pprConvention (NativeCall {}) = text "<native-call-convention>"
-pprConvention (NativeReturn {}) = text "<native-ret-convention>"
-pprConvention Slow = text "<slow-convention>"
-pprConvention GC = text "<gc-convention>"
-pprConvention PrimOpCall = text "<primop-call-convention>"
-pprConvention PrimOpReturn = text "<primop-ret-convention>"
-pprConvention (Foreign c) = ppr c
-pprConvention (Private {}) = text "<private-convention>"
+pprConvention (NativeNodeCall {}) = text "<native-node-call-convention>"
+pprConvention (NativeDirectCall {}) = text "<native-direct-call-convention>"
+pprConvention (NativeReturn {}) = text "<native-ret-convention>"
+pprConvention Slow = text "<slow-convention>"
+pprConvention GC = text "<gc-convention>"
+pprConvention PrimOpCall = text "<primop-call-convention>"
+pprConvention PrimOpReturn = text "<primop-ret-convention>"
+pprConvention (Foreign c) = ppr c
+pprConvention (Private {}) = text "<private-convention>"
pprForeignConvention :: ForeignConvention -> SDoc
pprForeignConvention (ForeignConvention c as rs) = ppr c <> ppr as <> ppr rs