+ has_life_info

* successor info for for nodes fixed

git-svn-id: trunk@24899 -
This commit is contained in:
florian 2013-06-14 20:52:40 +00:00
parent 3016d48521
commit 0af7a6f92c

View File

@ -47,6 +47,9 @@ unit optutils;
}
procedure CalcDefSum(p : tnode);
{ returns true, if n is a valid node and has life info }
function has_life_info(n : tnode) : boolean;
implementation
uses
@ -192,6 +195,7 @@ unit optutils;
result:=p;
{ the successor of the last node of the for body is the for node itself }
DoSet(tfornode(p).t2,p);
p.successor:=succ;
Breakstack.Delete(Breakstack.Count-1);
Continuestack.Delete(Continuestack.Count-1);
p.successor:=succ;
@ -211,7 +215,7 @@ unit optutils;
Breakstack.Add(succ);
Continuestack.Add(p);
result:=p;
{ the successor of the last node of the while body is the while node itself }
{ the successor of the last node of the while/repeat body is the while node itself }
DoSet(twhilerepeatnode(p).right,p);
p.successor:=succ;
Breakstack.Delete(Breakstack.Count-1);
@ -324,5 +328,12 @@ unit optutils;
end;
end;
function has_life_info(n : tnode) : boolean;
begin
result:=assigned(n) and assigned(n.optinfo) and
assigned(n.optinfo^.life);
end;
end.