mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 13:59:29 +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)
|
||||
constructor create(l,r : tnode);virtual;reintroduce;
|
||||
function pass_typecheck:tnode;override;
|
||||
function simplify:tnode;override;
|
||||
function pass_1 : tnode;override;
|
||||
end;
|
||||
tinnodeclass = class of tinnode;
|
||||
@ -292,6 +293,15 @@ implementation
|
||||
exit;
|
||||
end;
|
||||
|
||||
result:=simplify;
|
||||
end;
|
||||
|
||||
|
||||
function tinnode.simplify:tnode;
|
||||
var
|
||||
t : tnode;
|
||||
begin
|
||||
result:=nil;
|
||||
{ constant evaluation }
|
||||
if (left.nodetype=ordconstn) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user