Will the D GC be awesome?

Marco Leise Marco.Leise at gmx.de
Wed Oct 10 05:05:13 PDT 2012


Am Thu, 04 Oct 2012 15:27:58 +0200
schrieb Alex Rønne Petersen <alex at lycus.org>:

> On 04-10-2012 15:21, Piotr Szturmaj wrote:
> > Jacob Carlborg wrote:
> > […]
> > * For other struct sizes, the return value is stored through a hidden
> > pointer passed as an argument to the function.
> 
> I strongly advise ignoring the D calling convention. Only DMD implements 
> it and nowhere else than on Windows for 32-bit x86.
> 
> Instead, refer to the Windows and System V x86 ABIs.

The hidden pointer is exactly what I see MSVC++ produce for
struct returns (but even for 4 byte ones). e.g. "MyStruct
foo()" is equivalent to "foo(MyStruct&)"
I understand that the GCC people don't want to add YACC (yet
another calling-convention), but frankly Pascal got away with
a c-c of its own, too and I never heard anyone complain.
I mean aside from compiler implementations, what's the problem
with an own calling convention for D code calling D code if it
is more efficient?

-- 
Marco



More information about the Digitalmars-d mailing list