Help with a DMD patch
Vladimir Panteleev
vladimir at thecybershadow.net
Sun Mar 17 01:19:30 PDT 2013
On Sunday, 17 March 2013 at 02:35:30 UTC, Daniel Murphy wrote:
> "Vladimir Panteleev" <vladimir at thecybershadow.net> wrote in
> message
> news:pzqxkiigdvvicqkqahpn at forum.dlang.org...
>> 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))
That's pretty much what my first attempt was. It asserts when I
try to save a temporary copy of a static array. Also, it is
undesirable if the array happens to be large...
More information about the Digitalmars-d
mailing list