Question about x86 delegate calling convention
Lionello Lunesu
lionello at lunesu.remove.com
Sat Jul 1 07:35:45 PDT 2006
"Walter Bright" <newshound at digitalmars.com> wrote in message
news:e82j04$28fs$1 at digitaldaemon.com...
> It's just an artifact of the register allocator. The context pointer is
> passed in EAX.
While on the subject, why can't a function pointer be (implicitly) converted
to a delegate pointer? The context can just be ignored int that case so
it'll probably be slightly less performant, but it's handy: a library could
use delegates for all callbacks, without forcing the users to use either
classes or nested functions. They can still use globals if they'd want.
L.
More information about the Digitalmars-d
mailing list