"Vladimir Panteleev" <[email protected]> wrote in message news:[email protected]... > I'm trying to cut my teeth on DMD hacking with a simple optimization ( > http://d.puremagic.com/issues/show_bug.cgi?id=9477 ), but not having much > luck so far - the backend is rejecting my attempts with asserts here or > there. Since the asserts have no error messages, and the code is very > terse, often un-straightforward and lacking in comments, I have no idea if > I'm feeding it bad input or if it's some latent bug. > > Here's my work so far: > https://github.com/CyberShadow/dmd/compare/fix9477-work > > Could a DMD guru have a look and tell me what I'm doing wrong? > > Tests: > https://gist.github.com/CyberShadow/5177509
Instead of copying elems, try to generate something like this: (auto tmp1 = e1, auto tmp2 = e2, tmp1.length == tmp2.length && !memcmp(tmp1.ptr, tmp2.ptr)) There is code in e2ir that already does stuff like this. Not really the easiest part of dmd to hack on....
