Destructors and static array assignment

Kenji Hara via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 20 08:22:45 PDT 2015


2015-07-20 23:52 GMT+09:00 Kenji Hara <k.hara.pg at gmail.com>:

> At least there's a dmd bug.
>
> For such static array assignment, dmd should use druntime function, but
> instead plain memory copy operation used.
> https://github.com/D-Programming-Language/dmd/blob/master/src/e2ir.c#L2920
> https://github.com/D-Programming-Language/dmd/blob/master/src/e2ir.c#L2945
>
> And, even after the bug is fixed, I think it's debatable behavior whether
> an element-wise assignment should call opAssign on each elements, because
> it can be a kind of optimization.
>

I filed a new wrong-code issue.

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

Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150721/4971d8bd/attachment.html>


More information about the Digitalmars-d mailing list