methodpool: also call native methods
some comments:
(1) we need shared libs now, otherwise the binary too big (~24MB).
please recompile from cabal (see README)
(2) as C doesn't allow '/', '(' and ')' as identifier names (unlike
forth <3), we replace them with '_', in order to identify a
(unique) native function. the pattern is as follows:
class__methodname__methodsignature
(3) `loadNativeFunction' is quite hackisch now. I don't know if we
get troubles with it at some point. we should consider:
(3a) ask on stackoverflow
(3b) patch this wtf stuff in ghc
(3c) just determine addresses at compile-time.
(3c) sucks, because you have to write much glue-code for every
native method. but maybe we could solve it with some magic TH
stuff (as suggested by hs_)