* set successor of blocknodes properly

git-svn-id: trunk@25970 -
This commit is contained in:
florian 2013-11-06 21:10:45 +00:00
parent b3c2a8ddb1
commit 1f05011113

View File

@ -186,15 +186,18 @@ unit optutils;
begin
result:=p;
DoSet(tblocknode(p).statements,succ);
p.successor:=succ;
if assigned(tblocknode(p).statements) then
p.successor:=tblocknode(p).statements
else
p.successor:=succ;
end;
forn:
begin
Breakstack.Add(succ);
Continuestack.Add(p);
result:=p;
{ the successor of the last node of the for body is the for node itself }
DoSet(tfornode(p).t2,p);
{ the successor of the last node of the for body is the body itself }
DoSet(tfornode(p).t2,tfornode(p).t2);
p.successor:=succ;
Breakstack.Delete(Breakstack.Count-1);
Continuestack.Delete(Continuestack.Count-1);