[Issue 13093] D ABI change for guaranteed efficient return of fixed size array

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 11 02:36:04 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13093

Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
          Component|DMD                         |websites
           Severity|enhancement                 |normal

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
It's already supported, but not explicitly described in ABI page.

>From http://dlang.org/abi

Return Value
...
* 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.
...

Normally static arrays are treated as the same size structs, so ubyte[1000] is
always returned through hidden pointer.

https://github.com/D-Programming-Language/dlang.org/pull/611

--


More information about the Digitalmars-d-bugs mailing list