Question about x86 delegate calling convention
Walter Bright
newshound at digitalmars.com
Sat Jul 1 09:41:36 PDT 2006
Lionello Lunesu wrote:
> "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.
Some functions pass parameters in EAX (!)
More information about the Digitalmars-d
mailing list