X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=Mate%2FBasicBlocks.hs;h=b52f22d2c4a9e4b5f246f408572784613d67cf4e;hb=4c504fbb0b276782af6cd250e5e9fd4fdcc26967;hp=3c0b93cfef82b9380aedce1f04aedeceaae0bdf1;hpb=b8a6ff5c2652b513205f16cebe988e60475b9720;p=mate.git diff --git a/Mate/BasicBlocks.hs b/Mate/BasicBlocks.hs index 3c0b93c..b52f22d 100644 --- a/Mate/BasicBlocks.hs +++ b/Mate/BasicBlocks.hs @@ -24,7 +24,6 @@ import JVM.ClassFile import JVM.Converter import JVM.Assembler -import Mate.Utilities import Mate.Types import Mate.Debug @@ -86,7 +85,7 @@ test_04 = testInstance "./tests/Fac.class" "fac" #endif -parseMethod :: Class Resolved -> B.ByteString -> IO (Maybe MapBB) +parseMethod :: Class Direct -> B.ByteString -> IO (Maybe MapBB) parseMethod cls method = do let maybe_bb = testCFG $ lookupMethod method cls let msig = methodSignature $ classMethods cls !! 1 @@ -104,7 +103,7 @@ parseMethod cls method = do return maybe_bb -testCFG :: Maybe (Method Resolved) -> Maybe MapBB +testCFG :: Maybe (Method Direct) -> Maybe MapBB testCFG (Just m) = case attrByName m "Code" of Nothing -> Nothing Just bytecode -> Just $ buildCFG $ codeInstructions $ decodeMethod bytecode