mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 12:26:02 +02:00
* tmoddivnode.simplify: made result definitely assigned and removed local var
* tshlshrnode.simplify: likewise git-svn-id: trunk@17770 -
This commit is contained in:
parent
1470d91ba1
commit
2f7c779fa4
@ -111,7 +111,6 @@ implementation
|
|||||||
|
|
||||||
function tmoddivnode.simplify(forinline : boolean):tnode;
|
function tmoddivnode.simplify(forinline : boolean):tnode;
|
||||||
var
|
var
|
||||||
t : tnode;
|
|
||||||
rv,lv : tconstexprint;
|
rv,lv : tconstexprint;
|
||||||
begin
|
begin
|
||||||
result:=nil;
|
result:=nil;
|
||||||
@ -143,12 +142,10 @@ implementation
|
|||||||
|
|
||||||
case nodetype of
|
case nodetype of
|
||||||
modn:
|
modn:
|
||||||
t:=create_simplified_ord_const(lv mod rv,resultdef,forinline);
|
result:=create_simplified_ord_const(lv mod rv,resultdef,forinline);
|
||||||
divn:
|
divn:
|
||||||
t:=create_simplified_ord_const(lv div rv,resultdef,forinline);
|
result:=create_simplified_ord_const(lv div rv,resultdef,forinline);
|
||||||
end;
|
end;
|
||||||
result:=t;
|
|
||||||
exit;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -460,8 +457,6 @@ implementation
|
|||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
function tshlshrnode.simplify(forinline : boolean):tnode;
|
function tshlshrnode.simplify(forinline : boolean):tnode;
|
||||||
var
|
|
||||||
t : tnode;
|
|
||||||
begin
|
begin
|
||||||
result:=nil;
|
result:=nil;
|
||||||
{ constant folding }
|
{ constant folding }
|
||||||
@ -469,12 +464,10 @@ implementation
|
|||||||
begin
|
begin
|
||||||
case nodetype of
|
case nodetype of
|
||||||
shrn:
|
shrn:
|
||||||
t:=create_simplified_ord_const(tordconstnode(left).value shr tordconstnode(right).value,resultdef,forinline);
|
result:=create_simplified_ord_const(tordconstnode(left).value shr tordconstnode(right).value,resultdef,forinline);
|
||||||
shln:
|
shln:
|
||||||
t:=create_simplified_ord_const(tordconstnode(left).value shl tordconstnode(right).value,resultdef,forinline);
|
result:=create_simplified_ord_const(tordconstnode(left).value shl tordconstnode(right).value,resultdef,forinline);
|
||||||
end;
|
end;
|
||||||
result:=t;
|
|
||||||
exit;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user