mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 18:49:11 +02:00
* fix life information of block nodes
git-svn-id: trunk@25973 -
This commit is contained in:
parent
1e4737c46d
commit
63757c84ad
@ -342,9 +342,12 @@ unit optdfa;
|
|||||||
CreateInfo(tfornode(node).t2);
|
CreateInfo(tfornode(node).t2);
|
||||||
|
|
||||||
{ expect a blocknode as body because we need to push the life information
|
{ expect a blocknode as body because we need to push the life information
|
||||||
of the counter variable into it }
|
of the counter variable into it
|
||||||
if tfornode(node).t2.nodetype<>blockn then
|
if tfornode(node).t2.nodetype<>blockn then
|
||||||
internalerror(2013110201);
|
begin
|
||||||
|
printnode(tfornode(node).t2);
|
||||||
|
internalerror(2013110301);
|
||||||
|
end;}
|
||||||
|
|
||||||
{ first update the body }
|
{ first update the body }
|
||||||
l:=copy(tfornode(node).t2.optinfo^.life);
|
l:=copy(tfornode(node).t2.optinfo^.life);
|
||||||
@ -404,8 +407,11 @@ unit optdfa;
|
|||||||
blockn:
|
blockn:
|
||||||
begin
|
begin
|
||||||
CreateInfo(tblocknode(node).statements);
|
CreateInfo(tblocknode(node).statements);
|
||||||
if assigned(tblocknode(node).statements) then
|
{ ensure that we don't remove life info }
|
||||||
node.optinfo^.life:=tblocknode(node).statements.optinfo^.life;
|
l:=node.optinfo^.life;
|
||||||
|
if assigned(node.successor) then
|
||||||
|
DFASetIncludeSet(l,node.successor.optinfo^.life);
|
||||||
|
UpdateLifeInfo(node,l);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ifn:
|
ifn:
|
||||||
|
Loading…
Reference in New Issue
Block a user