hs-java: upgrade to 0.3.1
[mate.git] / Mate / MethodPool.hs
index 16890c85f7bca01d6842a52dd3198c58fe34c583..c243d113950084fa56652f7b4950a64765c50797 100644 (file)
@@ -27,30 +27,13 @@ import Text.Printf
 import Mate.BasicBlocks
 import Mate.Types
 import Mate.X86CodeGen
-import Mate.Utilities
 import Mate.ClassPool
 import Mate.Debug
 
 foreign import ccall "dynamic"
    code_void :: FunPtr (IO ()) -> IO ()
 
-foreign export ccall getTrapType :: CUInt -> CUInt -> IO CUInt
-getTrapType :: CUInt -> CUInt -> IO CUInt
-getTrapType signal_from from2 = do
-  tmap <- getTrapMap
-  case M.lookup (fromIntegral signal_from) tmap of
-    (Just (MI _)) -> return 0
-    (Just (VI _)) -> return 1
-    (Just (SFI _)) -> return 2
-    (Just (II _)) -> return 4
-    -- maybe we've a hit on the second `from' value
-    Nothing -> case M.lookup (fromIntegral from2) tmap of
-      (Just (VI _)) -> return 1
-      (Just (II _)) -> return 4
-      (Just _) -> error "getTrapType: abort #1 :-("
-      Nothing -> error "getTrapType: abort #2 :-("
-
-foreign export ccall getMethodEntry :: CUInt -> CUInt -> IO CUInt
+
 getMethodEntry :: CUInt -> CUInt -> IO CUInt
 getMethodEntry signal_from methodtable = do
   mmap <- getMethodMap
@@ -98,8 +81,8 @@ getMethodEntry signal_from methodtable = do
         Nothing -> error $ show method ++ " not found. abort"
     Just w32 -> return (fromIntegral w32)
 
-lookupMethodRecursive :: B.ByteString -> [B.ByteString] -> Class Resolved
-                         -> IO (Maybe (Method Resolved, [B.ByteString], Class Resolved))
+lookupMethodRecursive :: B.ByteString -> [B.ByteString] -> Class Direct
+                         -> IO (Maybe (Method Direct, [B.ByteString], Class Direct))
 lookupMethodRecursive name clsnames cls =
   case res of
     Just x -> return $ Just (x, nextclsn, cls)