How to access hs_free_fun_ptr from a Visual Studio DLL
Sven Panne
Sven.Panne at aedion.de
Tue Mar 28 11:46:04 EST 2006
Am Montag, 27. März 2006 20:56 schrieb Wolfgang Thaller:
> > C -> adjustor -> stub -> Haskell -> stub -> adjustor -> C
> >
> > It could be the case that the adjustor tail-jumps to the stub, but
> > this is not
> > guaranteed to be the case for all platforms.
>
> Hmmm, I thought it was.
> [...]
> All of the implementations in Adjustor.c *except* for the IA-64 one
> go to some lengths to ensure that a tail-calll is used:
>
> C -> adjustor -> stub -> Haskell -> stub -> (maybe some static code)
> -> C
>
> I think this confusion should be fixed...
Even as the author of some parts of Adjustor.c and some parts of Hugs' FFI
implementation I have to admit that it isn't clear to me at all if tail-calls
are used everywhere. %-) And even if this is currently the case: Can we
really guarantee this for all eternity for every strange ABI people will come
up with? I'm not so sure about this, therefore I'd recommend against
"self-destruction", as handy as it admittedly is. I'd be happy to be
convinced of the opposite...
Cheers,
S.
More information about the Glasgow-haskell-users
mailing list