mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-06 04:55:55 +02:00
* do the left.equals(right) check before might_have_sideeffects, because
left.equals(right) is usually faster git-svn-id: trunk@36033 -
This commit is contained in:
parent
056e742684
commit
6d589f415b
@ -976,8 +976,7 @@ implementation
|
|||||||
side effects, because this can change the result (e.g., in an
|
side effects, because this can change the result (e.g., in an
|
||||||
or-node that calls the same function twice and first returns
|
or-node that calls the same function twice and first returns
|
||||||
false and then true because of a global state change }
|
false and then true because of a global state change }
|
||||||
if not might_have_sideeffects(left) and
|
if left.isequal(right) and not might_have_sideeffects(left) then
|
||||||
left.isequal(right) then
|
|
||||||
begin
|
begin
|
||||||
case nodetype of
|
case nodetype of
|
||||||
andn,orn:
|
andn,orn:
|
||||||
@ -1016,8 +1015,7 @@ implementation
|
|||||||
|
|
||||||
if is_integer(left.resultdef) and is_integer(right.resultdef) then
|
if is_integer(left.resultdef) and is_integer(right.resultdef) then
|
||||||
begin
|
begin
|
||||||
if not might_have_sideeffects(left) and
|
if left.isequal(right) and not might_have_sideeffects(left) then
|
||||||
left.isequal(right) then
|
|
||||||
begin
|
begin
|
||||||
case nodetype of
|
case nodetype of
|
||||||
andn,orn:
|
andn,orn:
|
||||||
|
Loading…
Reference in New Issue
Block a user