On 07 Dec 2013, at 18:50, Jürgen Hestermann wrote:
> I am wondering what the advantage is to *not* garantee a left to right order.
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/ncal.pas?view=markup#l3268
Jonas
___
fpc-pascal maillist
In our previous episode, J?rgen Hestermann said:
> I am wondering what the advantage is to *not* garantee a left to right order.
Undefined order allows to do the evaluation that needs the most temps first I
guess, which reduces spilling.
___
fpc-pascal
Am 2013-12-07 10:15, schrieb Jonas Maebe:
> The order in which parameters are evaluated is unrelated to the calling
convention.
> This order has always been undefined in FPC, and it is also undefined in
recent versions of Delphi.
I am wondering what the advantage is to *not* garantee a left to
Nope, calling convention only specifies parameter passing order, not
parameter evaluation order. If you want to specify exactly how the
parameters are evaluated, put each in a local variable first, according to
your order needs.
--
View this message in context:
http://free-pascal-general.104571
On 07 Dec 2013, at 09:40, Xiangrong Fang wrote:
> Is it true that all parameter evaluation goes from right to left?
The order in which parameters are evaluated is unrelated to the calling
convention. This order has always been undefined in FPC, and it is also
undefined in recent versions of De
I have this function:
function Compare(v1, v2: Integer): Integer;
And called like this:
Result := Compare(stack.Pop, stack.Pop);
The behavior is that the second Pop is evaluated first, thus reversed the
meaning of the function.
Is it true that all parameter evaluation goes from right to left?