{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
#include "debug.h"
module Mate.ClassPool (
getClassInfo,
let sfi = trapmap M.! w32_from
setTrapMap $ M.delete w32_from trapmap
case sfi of
- (SFI (StaticFieldInfo cls field)) -> getStaticFieldOffset cls field
- _ -> error "getFieldAddr: no trapInfo. abort"
+ (StaticField (StaticFieldInfo cls field)) -> getStaticFieldOffset cls field
+ _ -> error "getFieldAddr: no TrapCause found. abort"
-- interface + method + signature plz!
getInterfaceMethodOffset :: B.ByteString -> B.ByteString -> B.ByteString -> IO Word32
where
path = replace "." "/" path'
rcf :: [MClassPath] -> IO (Class Direct)
- rcf [] = error $ "readClassFile: Class \"" ++ (show path) ++ "\" not found."
- rcf ((Directory pre):xs) = do
+ rcf [] = error $ "readClassFile: Class \"" ++ show path ++ "\" not found."
+ rcf (Directory pre:xs) = do
let cf = pre ++ path ++ ".class"
printfCp "rcf: searching @ %s for %s\n" (show pre) (show path)
b <- doesFileExist cf
if b
then parseClassFile cf
else rcf xs
- rcf ((JAR p):xs) = do
+ rcf (JAR p:xs) = do
printfCp "rcf: searching %s in JAR\n" (show path)
entry <- getEntry p path
case entry of