Question about x86 delegate calling convention

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Sat Jul 1 12:12:46 PDT 2006


BCS wrote:
> Frits van Bommel wrote:
> [a lot of cool code...]

Thanks :)

> Couldn't the compiler generate the needed stub(s) for you? With that 
> functionality, a function to delegate cast could be allowed.

Yes I would assume it could, and probably better than me as presumably 
those implementing the compiler have a better understanding of the 
calling conventions involved :).
Might be a bit of work to make sure it handles all the corner cases 
though...
Not sure how many of those would pop up, but there's bound to be some: 
Struct return values I mentioned in my post, and maybe array returns 
unless it uses EDX:EAX (or was it the other way around?) for that like 
it does for longs. Then there's associative arrays and last arguments 
that don't fit in EAX...



More information about the Digitalmars-d mailing list