[dmd-internals] AssociativeArray in druntime should go before the next release

Andrei Alexandrescu andrei at erdani.com
Fri Feb 3 15:25:25 PST 2012


On 2/3/12 2:28 PM, Steve Schveighoffer wrote:
> What I am saying is, if we go with the lowering of:
>
> [a:b, c:d] =>  AALiteral([a,c], [b,d]);
>
> I would like to have this not needlessly allocate the arrays [a, c] and [b, d] on the heap, since those arrays will be unused after that call.  To use the heap would be a step backwards, since the current AA literal code does not use it.
>
> -Steve

I think the language is powerful enough to afford us the rewrite:

[a:b, c:d] => aaLiteral(a, b, c, d)


Andrei



More information about the dmd-internals mailing list