mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-04 01:12:04 +01:00
+ simplify sar(x,0) to x
git-svn-id: trunk@36023 -
This commit is contained in:
parent
d8ec0eff8e
commit
8ac84ce43a
@ -1961,12 +1961,18 @@ implementation
|
||||
if (left.nodetype=callparan) and
|
||||
assigned(tcallparanode(left).right) then
|
||||
begin
|
||||
vl:=tordconstnode(tcallparanode(left).left).value;
|
||||
if (tcallparanode(tcallparanode(left).right).left.nodetype=ordconstn) then
|
||||
begin
|
||||
def:=tcallparanode(tcallparanode(left).right).left.resultdef;
|
||||
vl:=tordconstnode(tcallparanode(left).left).value;
|
||||
vl2:=tordconstnode(tcallparanode(tcallparanode(left).right).left).value;
|
||||
end
|
||||
else if vl=0 then
|
||||
begin
|
||||
result:=tcallparanode(tcallparanode(left).right).left;
|
||||
tcallparanode(tcallparanode(left).right).left:=nil;
|
||||
exit;
|
||||
end
|
||||
else
|
||||
exit;
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user