Is D right for me?

bearophile bearophileHUGS at lycos.com
Mon Oct 11 11:13:31 PDT 2010


Walter:

> The way varargs works for the C ABI is inefficient, clumsy, and frankly won't 
> work for what D needs. So I'm going to have two varargs - one for extern (C) 
> which is compatible with the C ABI and one for extern (D) which will push things 
> on the stack as for 32 bits.

Recently I have seen something related on Reddit:

http://blog.nelhage.com/2010/10/amd64-and-va_arg/

http://www.reddit.com/r/programming/comments/dmm05/til_va_arg_on_amd64_is_way_more_complex_than_i/


> The only remaining nuisance for the D method is that some types have to be 
> aligned more strictly than the stack. That means TypeInfo will have to be 
> extended to provide an alignment size for the type.

Is this somewhat related to this enhancement request "Guarantee alignment of stack-allocated variables on x86"?
http://d.puremagic.com/issues/show_bug.cgi?id=2278

Bye,
bearophile


More information about the Digitalmars-d mailing list