* simplified and fixed code of (v1=const1) and (v2=const2) optimization, resolves #38066

git-svn-id: trunk@47423 -
This commit is contained in:
florian 2020-11-15 16:17:54 +00:00
parent 157e8792c5
commit 98eab07abd

View File

@ -1426,8 +1426,6 @@ implementation
c2p:=@taddnode(right).right;
end;
if v1p^.resultdef.size=v2p^.resultdef.size then
begin
if not(is_integer(v1p^.resultdef)) or not(is_integer(v2p^.resultdef)) then
begin
case v1p^.resultdef.size of
1:
@ -1450,14 +1448,6 @@ implementation
ctypeconvnode.create_internal(c2p^.getcopy,inttype))
),
cordconstnode.create(0,inttype,false));
end
else
result:=caddnode.create_internal(equaln,
caddnode.create_internal(orn,
caddnode.create_internal(xorn,v1p^.getcopy,c1p^.getcopy),
caddnode.create_internal(xorn,v2p^.getcopy,c2p^.getcopy)
),
cordconstnode.create(0,v1p^.resultdef,false));
end;
end;
{ even when short circuit boolean evaluation is active, this