소스 검색

* set always resultnode as last node

git-svn-id: trunk@25969 -
florian 11 년 전
부모
커밋
b3c2a8ddb1
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      compiler/optdfa.pas
  2. 2 2
      compiler/optutils.pas

+ 1 - 1
compiler/optdfa.pas

@@ -595,7 +595,7 @@ unit optdfa;
         if not(assigned(nodemap)) then
         if not(assigned(nodemap)) then
           nodemap:=TIndexedNodeSet.Create;
           nodemap:=TIndexedNodeSet.Create;
         { add controll flow information }
         { add controll flow information }
-        SetNodeSucessors(node);
+        SetNodeSucessors(node,resultnode);
         { now, collect life information }
         { now, collect life information }
         CreateLifeInfo(node,nodemap);
         CreateLifeInfo(node,nodemap);
       end;
       end;

+ 2 - 2
compiler/optutils.pas

@@ -38,7 +38,7 @@ unit optutils;
         function Remove(node : tnode) : boolean;
         function Remove(node : tnode) : boolean;
       end;
       end;
 
 
-    procedure SetNodeSucessors(p : tnode);
+    procedure SetNodeSucessors(p,last : tnode);
     procedure PrintDFAInfo(var f : text;p : tnode);
     procedure PrintDFAInfo(var f : text;p : tnode);
     procedure PrintIndexedNodeSet(var f : text;s : TIndexedNodeSet);
     procedure PrintIndexedNodeSet(var f : text;s : TIndexedNodeSet);
     { determines the optinfo.defsum field for the given node
     { determines the optinfo.defsum field for the given node
@@ -141,7 +141,7 @@ unit optutils;
       end;
       end;
 
 
 
 
-    procedure SetNodeSucessors(p : tnode);
+    procedure SetNodeSucessors(p,last : tnode);
       var
       var
         Continuestack : TFPList;
         Continuestack : TFPList;
         Breakstack : TFPList;
         Breakstack : TFPList;