update submodule pointer
[ghc-hetmet.git] / compiler / ghci / ByteCodeFFI.lhs
index 5c2b35f..1589fe1 100644 (file)
@@ -5,12 +5,11 @@
 ByteCodeGen: Generate machine-code sequences for foreign import
 
 \begin{code}
-module ByteCodeFFI ( moan64, newExec ) where
+module ByteCodeFFI ( moan64 ) where
 
 import Outputable
 import System.IO
-import Foreign
-import Foreign.C
+import System.IO.Unsafe
 
 moan64 :: String -> SDoc -> a
 moan64 msg pp_rep
@@ -25,17 +24,5 @@ moan64 msg pp_rep
      )
      `seq`
      pprPanic msg pp_rep
-
-newExec :: Storable a => [a] -> IO (FunPtr ())
-newExec code
-   = do ptr <- _allocateExec (fromIntegral $ codeSize undefined code)
-        pokeArray ptr code
-        return (castPtrToFunPtr ptr)
-   where
-   codeSize :: Storable a => a -> [a] -> Int
-   codeSize dummy array = sizeOf(dummy) * length array
-
-foreign import ccall unsafe "allocateExec"
-  _allocateExec :: CUInt -> IO (Ptr a)  
 \end{code}