projects
/
mate.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strings: put every String from the constantpool in a Map
[mate.git]
/
Mate
/
MethodPool.hs
diff --git
a/Mate/MethodPool.hs
b/Mate/MethodPool.hs
index e1eb1214323e989ec09f944a9d6bf0252391d119..0e146a103031c214997b81950efc5e22917017ba 100644
(file)
--- a/
Mate/MethodPool.hs
+++ b/
Mate/MethodPool.hs
@@
-65,7
+65,8
@@
getMethodEntry signal_from methodtable = do
return $ fromIntegral entry
Nothing -> error $ (show method) ++ " not found. abort"
True -> do
return $ fromIntegral entry
Nothing -> error $ (show method) ++ " not found. abort"
True -> do
- let symbol = (replace "/" "_" $ toString cm) ++ "__" ++ (toString method) ++ "__" ++ (replace "(" "_" (replace ")" "_" $ toString $ encode sig))
+ -- TODO(bernhard): cleaner please... *do'h*
+ let symbol = (replace "/" "_" $ toString cm) ++ "__" ++ (toString method) ++ "__" ++ (replace ";" "_" $ replace "/" "_" $ replace "(" "_" (replace ")" "_" $ toString $ encode sig))
printf "native-call: symbol: %s\n" symbol
nf <- loadNativeFunction symbol
let w32_nf = fromIntegral nf
printf "native-call: symbol: %s\n" symbol
nf <- loadNativeFunction symbol
let w32_nf = fromIntegral nf
@@
-120,6
+121,7
@@
initMethodPool = do
tmap2ptr M.empty >>= set_trapmap
classmap2ptr M.empty >>= set_classmap
virtualmap2ptr M.empty >>= set_virtualmap
tmap2ptr M.empty >>= set_trapmap
classmap2ptr M.empty >>= set_classmap
virtualmap2ptr M.empty >>= set_virtualmap
+ stringsmap2ptr M.empty >>= set_stringsmap
addMethodRef :: Word32 -> MethodInfo -> [B.ByteString] -> IO ()
addMethodRef :: Word32 -> MethodInfo -> [B.ByteString] -> IO ()