Pārlūkot izejas kodu

+ also print node tree after firstpass with -vp (patch by Adriaan van Os,
mantis #15710)

git-svn-id: trunk@14883 -

Jonas Maebe 15 gadi atpakaļ
vecāks
revīzija
e89d0bcee3
1 mainītis faili ar 8 papildinājumiem un 3 dzēšanām
  1. 8 3
      compiler/psub.pas

+ 8 - 3
compiler/psub.pas

@@ -49,7 +49,7 @@ interface
         dfabuilder : TDFABuilder;
         constructor create(aparent:tprocinfo);override;
         destructor  destroy;override;
-        procedure printproc;
+        procedure printproc(pass:string);
         procedure generate_code;
         procedure resetprocdef;
         procedure add_to_symtablestack;
@@ -534,7 +534,7 @@ implementation
        end;
 
 
-    procedure tcgprocinfo.printproc;
+    procedure tcgprocinfo.printproc(pass:string);
       begin
         assign(printnodefile,treelogfilename);
         {$I-}
@@ -549,6 +549,7 @@ implementation
          end;
         writeln(printnodefile);
         writeln(printnodefile,'*******************************************************************************');
+        writeln(printnodefile, pass);
         writeln(printnodefile,procdef.fullprocname(false));
         writeln(printnodefile,'*******************************************************************************');
         printnode(printnodefile,code);
@@ -767,6 +768,10 @@ implementation
           include(flags,pi_uses_fpu);
 {$endif i386}
 
+        { Print the node to tree.log }
+        if paraprintnodetree=1 then
+          printproc( 'after the firstpass');
+
         { do this before adding the entry code else the tail recursion recognition won't work,
           if this causes troubles, it must be if'ed
         }
@@ -1399,7 +1404,7 @@ implementation
 
          { Print the node to tree.log }
          if paraprintnodetree=1 then
-           printproc;
+           printproc( 'after parsing');
 
          { ... remove symbol tables }
          remove_from_symtablestack;