One minute to twelve: last chance to fix D2 ABI?
Robert Jacques
sandford at jhu.edu
Tue Mar 2 22:38:58 PST 2010
On Wed, 03 Mar 2010 01:00:46 -0500, Steve Teale
<steve.teale at britseyeview.com> wrote:
>
>> * Binding a delegate to a function pointer will always need a (dynamic)
>> thunk, because the function will have been invoked without any context
>> pointer and it's the thunk's responsibility to assign the correct
>> context pointer.
>
> At present, D's way of handling delegates requires patching GCC for the
> GDC implementation. If an ABI change was made it would be nice if it
> fitted into the GCC trampoline model.
>
> Steve
Um, how exactly? I just read the wikipedia page on GCC trampoline and it
a) targeted only at nested functions b) utilizes self-modifying code which
is disabled on any sensible platform c) would require dynamic allocation
and d) actually uses more memory than D's method. Some time ago there was
a link to an excellent article (by Walter? Don?) on different ways to do
this. I remember d's way coming out the best, but I've seemed to have lost
the link.
More information about the Digitalmars-d
mailing list