-testCFG :: Maybe (Method Resolved) -> Maybe MapBB
-testCFG (Just m) = case attrByName m "Code" of
- Nothing -> Nothing
- Just bytecode -> Just $ buildCFG $ codeInstructions $ decodeMethod bytecode
-testCFG _ = Nothing
+testCFG :: Maybe (Method Direct) -> Maybe RawMethod
+testCFG m = do
+ m' <- m
+ codeseg <- attrByName m' "Code"
+ let decoded = decodeMethod codeseg
+ let mapbb = buildCFG $ codeInstructions decoded
+ let locals = fromIntegral (codeMaxLocals decoded)
+ let stacks = fromIntegral (codeStackSize decoded)
+ return $ RawMethod mapbb locals stacks