On Saturday, 16 March 2013 at 21:21:51 UTC, Vladimir Panteleev
wrote:
On Saturday, 16 March 2013 at 21:15:32 UTC, Igor Stepanov wrote:
What do the lines el_combine? I do not see them in the code
structure comparison.
Greetings Igor,
The el_combine calls are supposed to ensure correct order of
evaluation.
I based that code from this fragment:
https://github.com/D-Programming-Language/dmd/blob/635c6b07/src/e2ir.c#L2702
Visually, it should work :)
I would try to make sure that the various components of
expression are correctly calculated. In particular, I am
concerned the calculation of the length of a dynamic array. You
can try to do so, that would return the length of the entire
expression.
/ ***** In DMD ***** /
if (t1->ty == Tarray)
{
retrun el_una(I64 ? OP128_64 : OP64_32, TYsize_t,
el_same(&earr1));
}
/ ***** In D ***** /
int[] arr = [1,2,3];
int[] arr3 = [1,2,3,4,5];
size_t len = cast(size_t)(arr == arr3);
assert(len == arr.length);