X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mate.git;a=blobdiff_plain;f=Mate%2FMethodPool.hs;h=4be3cf2577a7764660e59c19b1a55d01c33c6c1a;hp=da3e5e055808de09698423cc8173a4d3929178aa;hb=1d125225bf0257dcfcf415f94eb46e07daee2dbf;hpb=3573020fca0413c6d7823e2a1d70108f25766db0 diff --git a/Mate/MethodPool.hs b/Mate/MethodPool.hs index da3e5e0..4be3cf2 100644 --- a/Mate/MethodPool.hs +++ b/Mate/MethodPool.hs @@ -32,7 +32,7 @@ import Mate.NativeMachine import Mate.ClassPool import Mate.Debug import Mate.Utilities -import Mate.GarbageAlloc +import Mate.Rts() foreign import ccall "dynamic" code_void :: FunPtr (IO ()) -> IO () @@ -43,6 +43,9 @@ foreign import ccall "&demoInterfaceCall" foreign import ccall "&printMemoryUsage" printMemoryUsageAddr :: FunPtr (IO ()) +foreign import ccall "&loadLibrary" + loadLibraryAddr :: FunPtr (IO ()) + getMethodEntry :: CPtrdiff -> CPtrdiff -> IO CPtrdiff getMethodEntry signal_from methodtable = do mmap <- getMethodMap @@ -74,6 +77,8 @@ getMethodEntry signal_from methodtable = do let scm = toString cm; smethod = toString method if scm == "jmate/lang/MateRuntime" then do case smethod of + "loadLibrary" -> + return . funPtrToAddr $ loadLibraryAddr "demoInterfaceCall" -> return . funPtrToAddr $ demoInterfaceCallAddr "printMemoryUsage" ->