* better check for short boolean evaluation in firstcomplex

git-svn-id: trunk@45658 -
This commit is contained in:
florian 2020-06-18 20:32:55 +00:00
parent 7e89141993
commit 2e36783d0e

View File

@ -189,11 +189,8 @@ implementation
fcl, fcr: longint;
ncl, ncr: longint;
begin
{ always calculate boolean AND and OR from left to right }
if (p.nodetype in [orn,andn]) and
is_boolean(p.left.resultdef) and
(might_have_sideeffects(p.left,[mhs_exceptions]) or might_have_sideeffects(p.right,[mhs_exceptions]) or
(nf_short_bool in taddnode(p).flags)) then
{ calculate boolean AND and OR from left to right if it's short boolean evaluted }
if (p.nodetype in [orn,andn]) and is_boolean(p.left.resultdef) and is_boolean(p.left.resultdef) and doshortbooleval(p) then
begin
if nf_swapped in p.flags then
internalerror(200709253);