gc: factor out allocation
[mate.git] / Mate / X86CodeGen.hs
index ea986d2fc568b9da9f585c7d2b9e03343f1a9e02..abe5a39ea528215bef55255dc86517ca901a9b67 100644 (file)
@@ -33,8 +33,8 @@ import Mate.Strings
 foreign import ccall "dynamic"
    code_int :: FunPtr (CInt -> CInt -> IO CInt) -> (CInt -> CInt -> IO CInt)
 
-foreign import ccall "getMallocAddr"
-  getMallocAddr :: CUInt
+foreign import ccall "getMallocObjectAddr"
+  getMallocObjectAddr :: CUInt
 
 foreign import ccall "register_signal"
   register_signal :: IO ()
@@ -311,7 +311,7 @@ emitFromBB method cls hmap =  do
     callMalloc = do
         calladdr <- getCurrentOffset
         let w32_calladdr = 5 + calladdr
-        let malloaddr = (fromIntegral getMallocAddr :: Word32)
+        let malloaddr = (fromIntegral getMallocObjectAddr :: Word32)
         call (malloaddr - w32_calladdr)
         add esp (4 :: Word32)
         push eax