mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-08 15:17:27 +01:00
* fixed not(not()) removal
This commit is contained in:
parent
4aa03c0656
commit
160103faba
@ -578,20 +578,19 @@ implementation
|
||||
|
||||
resulttype:=left.resulttype;
|
||||
|
||||
{Try optmimizing ourself away.}
|
||||
{ Try optmimizing ourself away }
|
||||
if left.nodetype=notn then
|
||||
begin
|
||||
{Double not. Remove both.}
|
||||
t:=Tnotnode(left).left;
|
||||
{ Double not. Remove both }
|
||||
result:=Tnotnode(left).left;
|
||||
Tnotnode(left).left:=nil;
|
||||
left:=t;
|
||||
result:=t;
|
||||
exit;
|
||||
end;
|
||||
|
||||
if left.nodetype in [ltn,lten,equaln,unequaln,gtn,gten] then
|
||||
begin
|
||||
{ Not of boolean expression. Turn around the operator and remove
|
||||
the not.}
|
||||
the not }
|
||||
result:=left;
|
||||
left.nodetype:=boolean_reverse[left.nodetype];
|
||||
left:=nil;
|
||||
@ -755,7 +754,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.38 2002-08-15 15:09:42 carl
|
||||
Revision 1.39 2002-08-25 09:10:58 peter
|
||||
* fixed not(not()) removal
|
||||
|
||||
Revision 1.38 2002/08/15 15:09:42 carl
|
||||
+ fpu emulation helpers (ppu checking also)
|
||||
|
||||
Revision 1.37 2002/08/14 19:26:55 carl
|
||||
|
||||
Loading…
Reference in New Issue
Block a user