[Issue 2356] array literal as non static initializer generates horribly inefficient code.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 24 13:21:36 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=2356



--- Comment #22 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-10-25 00:21:28 MSD ---
The fix is partially reverted in dmd pull 2682 [1] as it introduced Issue
11238.

Only construction is optimized now:
---
void main()
{
    int[2] m = [4, 6]; // still optimized
    m = [m[1], m[0]]; // swap, currently calls `_d_arrayliteralTX`
    assert(m == [6, 4]); // was [6, 6] with original fix (Issue 11238)
}
---

Opened Issue 11345 for assignment case.

Also some duplicates of current issue and duplicates of duplicates of current
issue are now really duplicates of Issue 11345.

[1] https://github.com/D-Programming-Language/dmd/pull/2682

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list