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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 9 09:37:03 PDT 2011


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



--- Comment #5 from Kenji Hara <k.hara.pg at gmail.com> 2011-09-09 09:36:49 PDT ---
After applying my patch, the sample code generates like follows:
(output of ddbg in 64-bit Windows 7)

c:\d\test.d:1 void main()
00402010: c80c0000                enter 0xc, 0x0
c:\d\test.d:3     int[3] x = [1,2,3];
00402014: c745f401000000          mov dword [ebp-0xc], 0x1
0040201b: c745f802000000          mov dword [ebp-0x8], 0x2
00402022: c745fc03000000          mov dword [ebp-0x4], 0x3
00402029: 31c0                    xor eax, eax
test.obj
0040202b: c9                      leave
0040202c: c3                      ret

-- 
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