Re: [GDC] Evaluation order: Please update the dmd backend

2014-10-01 Thread Kenji Hara via Digitalmars-d
Now I'm working to fix issue 6620 https://issues.dlang.org/show_bug.cgi?id=6620 https://github.com/D-Programming-Language/dmd/pull/4035 Kenji Hara 2014-04-01 20:49 GMT+09:00 Johannes Pfau nos...@example.com: I started fixing GDC bug #8 (*) which is basically that array op evaluation order

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Johannes Pfau
Am Wed, 02 Apr 2014 00:04:42 +0200 schrieb Timon Gehr timon.g...@gmx.ch: On 04/01/2014 08:40 PM, Sarath Kodali wrote: ... The evaluation order of assign operators should not be LTR as they have right associativity. In a = b = c, c has to be evaluated first, then b and then a.

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Johannes Pfau
Am Wed, 2 Apr 2014 00:54:40 +1100 schrieb Daniel Murphy yebbliesnos...@gmail.com: Iain Buclaw ibuc...@gdcproject.org wrote in message news:mailman.13.1396357117.19942.digitalmar...@puremagic.com... So you can write the patches then? :o) Sure, as long as you're not in a hurry.

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Sarath Kodali
On Tuesday, 1 April 2014 at 22:04:43 UTC, Timon Gehr wrote: On 04/01/2014 08:40 PM, Sarath Kodali wrote: ... The evaluation order of assign operators should not be LTR as they have right associativity. In a = b = c, c has to be evaluated first, then b and then a. Similarly, in a = b + c, b+c

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Iain Buclaw
On 2 Apr 2014 09:52, Sarath Kodali sar...@dummy.com wrote: On Tuesday, 1 April 2014 at 22:04:43 UTC, Timon Gehr wrote: On 04/01/2014 08:40 PM, Sarath Kodali wrote: ... The evaluation order of assign operators should not be LTR as they have right associativity. In a = b = c, c has to be

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Johannes Pfau
Am Wed, 02 Apr 2014 07:47:23 + schrieb Sarath Kodali sar...@dummy.com: On Tuesday, 1 April 2014 at 22:04:43 UTC, Timon Gehr wrote: On 04/01/2014 08:40 PM, Sarath Kodali wrote: ... The evaluation order of assign operators should not be LTR as they have right associativity. In a =

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Johannes Pfau
Am Wed, 2 Apr 2014 10:48:33 +0200 schrieb Johannes Pfau nos...@example.com: http://dpaste.dzfl.pl/19c118b7d368 BTW: LDC and even very old versions of GDC already evaluate that LTR, you can switch the compiler to LDC to see that: http://dpaste.dzfl.pl/cec5cc3b7dd7

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Sarath Kodali
On Wednesday, 2 April 2014 at 08:02:36 UTC, Iain Buclaw wrote: On 2 Apr 2014 09:52, Sarath Kodali sar...@dummy.com wrote: On Tuesday, 1 April 2014 at 22:04:43 UTC, Timon Gehr wrote: On 04/01/2014 08:40 PM, Sarath Kodali wrote: ... The evaluation order of assign operators should not be LTR

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Sarath Kodali
On Wednesday, 2 April 2014 at 08:50:17 UTC, Johannes Pfau wrote: Am Wed, 02 Apr 2014 07:47:23 + schrieb Sarath Kodali sar...@dummy.com: On Tuesday, 1 April 2014 at 22:04:43 UTC, Timon Gehr wrote: On 04/01/2014 08:40 PM, Sarath Kodali wrote: ... The evaluation order of assign operators

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Iain Buclaw
On 2 April 2014 15:04, Sarath Kodali sar...@dummy.com wrote: On Wednesday, 2 April 2014 at 08:02:36 UTC, Iain Buclaw wrote: On 2 Apr 2014 09:52, Sarath Kodali sar...@dummy.com wrote: On Tuesday, 1 April 2014 at 22:04:43 UTC, Timon Gehr wrote: On 04/01/2014 08:40 PM, Sarath Kodali wrote:

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Timon Gehr
On 04/02/2014 09:47 AM, Sarath Kodali wrote: On Tuesday, 1 April 2014 at 22:04:43 UTC, Timon Gehr wrote: On 04/01/2014 08:40 PM, Sarath Kodali wrote: ... The evaluation order of assign operators should not be LTR as they have right associativity. In a = b = c, c has to be evaluated first,

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Sarath Kodali
On Wednesday, 2 April 2014 at 14:43:44 UTC, Iain Buclaw wrote: Please do not get confused between operands evaluation order in an expression and arguments passing order to a function. Those are two different things. I was talking about both of them because both of them are involved in the

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-02 Thread Iain Buclaw
On 2 Apr 2014 21:00, Sarath Kodali sar...@dummy.com wrote: On Wednesday, 2 April 2014 at 14:43:44 UTC, Iain Buclaw wrote: Please do not get confused between operands evaluation order in an expression and arguments passing order to a function. Those are two different things. I was talking

[GDC] Evaluation order: Please update the dmd backend

2014-04-01 Thread Johannes Pfau
I started fixing GDC bug #8 (*) which is basically that array op evaluation order currently depends on the target architecture. Consider this example: a()[] = b()[] + c()[]; The order in which c,a,b are called is currently architecture specific. As stated in that bug report by Andrei we want this

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-01 Thread Daniel Murphy
Johannes Pfau wrote in message news:lhe96q$27ua$1...@digitalmars.com... So I need someone with dmd backend knowledge to fix the evaluation order of extern(C) function parameters to be LTR. Evaluation order of assignments should also be fixed to be LTR in the dmd backend. Although not strictly

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-01 Thread Iain Buclaw
On 1 Apr 2014 14:45, Daniel Murphy yebbliesnos...@gmail.com wrote: Johannes Pfau wrote in message news:lhe96q$27ua$1...@digitalmars.com... So I need someone with dmd backend knowledge to fix the evaluation order of extern(C) function parameters to be LTR. Evaluation order of assignments

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-01 Thread Daniel Murphy
Iain Buclaw ibuc...@gdcproject.org wrote in message news:mailman.13.1396357117.19942.digitalmar...@puremagic.com... So you can write the patches then? :o) Sure, as long as you're not in a hurry.

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-01 Thread Sarath Kodali
On Tuesday, 1 April 2014 at 11:50:51 UTC, Johannes Pfau wrote: I started fixing GDC bug #8 (*) which is basically that array op evaluation order currently depends on the target architecture. Consider this example: a()[] = b()[] + c()[]; The order in which c,a,b are called is currently

Re: [GDC] Evaluation order: Please update the dmd backend

2014-04-01 Thread Timon Gehr
On 04/01/2014 08:40 PM, Sarath Kodali wrote: ... The evaluation order of assign operators should not be LTR as they have right associativity. In a = b = c, c has to be evaluated first, then b and then a. Similarly, in a = b + c, b+c has to be evaluated first before a is evaluated. Otherwise it