mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 06:49:23 +02:00
* in node simplify
git-svn-id: trunk@10310 -
This commit is contained in:
parent
0df73836a2
commit
417c832e9d
@ -61,6 +61,7 @@ interface
|
|||||||
tinnode = class(tbinopnode)
|
tinnode = class(tbinopnode)
|
||||||
constructor create(l,r : tnode);virtual;reintroduce;
|
constructor create(l,r : tnode);virtual;reintroduce;
|
||||||
function pass_typecheck:tnode;override;
|
function pass_typecheck:tnode;override;
|
||||||
|
function simplify:tnode;override;
|
||||||
function pass_1 : tnode;override;
|
function pass_1 : tnode;override;
|
||||||
end;
|
end;
|
||||||
tinnodeclass = class of tinnode;
|
tinnodeclass = class of tinnode;
|
||||||
@ -292,6 +293,15 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
result:=simplify;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function tinnode.simplify:tnode;
|
||||||
|
var
|
||||||
|
t : tnode;
|
||||||
|
begin
|
||||||
|
result:=nil;
|
||||||
{ constant evaluation }
|
{ constant evaluation }
|
||||||
if (left.nodetype=ordconstn) then
|
if (left.nodetype=ordconstn) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user