Will the D GC be awesome?

Piotr Szturmaj bncrbme at jadamspam.pl
Thu Oct 4 06:21:56 PDT 2012


Jacob Carlborg wrote:
> On 2012-10-04 14:36, Alex Rønne Petersen wrote:
>
>> Presumably speed; returning small structs in registers will be faster
>> than doing so on the stack.
>
> Are sturcts currently always returned on the stack?

From: http://dlang.org/abi.html, for Windows x86 extern(D):

* 1, 2 and 4 byte structs are returned in EAX.
* 8 byte structs are returned in EDX,EAX, where EDX gets the most 
significant half.
* For other struct sizes, the return value is stored through a hidden 
pointer passed as an argument to the function.


More information about the Digitalmars-d mailing list