瀏覽代碼

* in_second_compile cleaned up, in_compile and in_second_load added

pierre 26 年之前
父節點
當前提交
5b38d71a12
共有 3 個文件被更改,包括 34 次插入8 次删除
  1. 8 1
      compiler/files.pas
  2. 15 3
      compiler/parser.pas
  3. 11 4
      compiler/pmodules.pas

+ 8 - 1
compiler/files.pas

@@ -168,7 +168,9 @@ unit files;
           do_compile,               { need to compile the sources }
           do_compile,               { need to compile the sources }
           sources_avail,            { if all sources are reachable }
           sources_avail,            { if all sources are reachable }
           is_unit,
           is_unit,
+          in_compile,               { is it being compiled ?? }
           in_second_compile,        { is this unit being compiled for the 2nd time? }
           in_second_compile,        { is this unit being compiled for the 2nd time? }
+          in_second_load,           { is this unit PPU loaded a 2nd time? }
           in_implementation,        { processing the implementation part? }
           in_implementation,        { processing the implementation part? }
           in_global     : boolean;  { allow global settings }
           in_global     : boolean;  { allow global settings }
           recompile_reason : trecompile_reason;  { the reason why the unit should be recompiled }
           recompile_reason : trecompile_reason;  { the reason why the unit should be recompiled }
@@ -1199,6 +1201,8 @@ end;
         sources_avail:=true;
         sources_avail:=true;
         compiled:=false;
         compiled:=false;
         recompile_reason:=rr_unknown;
         recompile_reason:=rr_unknown;
+        in_second_load:=false;
+        in_compile:=false;
         in_second_compile:=false;
         in_second_compile:=false;
         in_implementation:=false;
         in_implementation:=false;
         in_global:=true;
         in_global:=true;
@@ -1326,7 +1330,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.101  1999-08-27 10:43:20  pierre
+  Revision 1.102  1999-08-31 15:51:10  pierre
+   * in_second_compile cleaned up, in_compile and in_second_load added
+
+  Revision 1.101  1999/08/27 10:43:20  pierre
    + interface CRC check with ifdef Test_double_checksum added
    + interface CRC check with ifdef Test_double_checksum added
 
 
   Revision 1.100  1999/08/24 13:14:01  peter
   Revision 1.100  1999/08/24 13:14:01  peter

+ 15 - 3
compiler/parser.pas

@@ -271,6 +271,7 @@ unit parser;
             main_module:=current_module;
             main_module:=current_module;
           end;
           end;
 
 
+         current_module^.in_compile:=true;
        { Load current state from the init values }
        { Load current state from the init values }
          aktlocalswitches:=initlocalswitches;
          aktlocalswitches:=initlocalswitches;
          aktmoduleswitches:=initmoduleswitches;
          aktmoduleswitches:=initmoduleswitches;
@@ -443,10 +444,19 @@ unit parser;
 
 
 {$ifdef BrowserCol}
 {$ifdef BrowserCol}
               { Write Browser Collections }
               { Write Browser Collections }
-              CreateBrowserCol;
+              if (cs_browser in aktmoduleswitches) then
+                CreateBrowserCol;
 {$endif}
 {$endif}
               end;
               end;
 
 
+         if current_module^.in_second_compile then
+           begin
+             current_module^.in_second_compile:=false;
+             current_module^.in_compile:=true;
+           end
+         else
+           current_module^.in_compile:=false;
+
           (* Obsolete code aktprocsym
           (* Obsolete code aktprocsym
              is disposed by the localsymtable disposal (PM)
              is disposed by the localsymtable disposal (PM)
           { Free last aktprocsym }
           { Free last aktprocsym }
@@ -471,7 +481,10 @@ unit parser;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.82  1999-08-26 20:24:41  michael
+  Revision 1.83  1999-08-31 15:51:11  pierre
+   * in_second_compile cleaned up, in_compile and in_second_load added
+
+  Revision 1.82  1999/08/26 20:24:41  michael
   + Hopefuly last fixes for resourcestrings
   + Hopefuly last fixes for resourcestrings
 
 
   Revision 1.81  1999/08/04 13:02:48  jonas
   Revision 1.81  1999/08/04 13:02:48  jonas
@@ -829,4 +842,3 @@ end.
     + packed object/class/array
     + packed object/class/array
 }
 }
 
 
-

+ 11 - 4
compiler/pmodules.pas

@@ -455,13 +455,17 @@ unit pmodules;
                end
                end
              else
              else
               begin
               begin
-                if current_module^.in_second_compile then
-                  Message1(parser_d_compiling_second_time,current_module^.modulename^);
+                if current_module^.in_compile then
+                  begin
+                    current_module^.in_second_compile:=true;
+                    Message1(parser_d_compiling_second_time,current_module^.modulename^);
+                  end;
                 current_scanner^.tempcloseinputfile;
                 current_scanner^.tempcloseinputfile;
                 name:=current_module^.mainsource^;
                 name:=current_module^.mainsource^;
                 if assigned(scanner) then
                 if assigned(scanner) then
                   scanner^.invalid:=true;
                   scanner^.invalid:=true;
                 compile(name,compile_system);
                 compile(name,compile_system);
+                current_module^.in_second_compile:=false;
                 if (not current_scanner^.invalid) then
                 if (not current_scanner^.invalid) then
                   current_scanner^.tempopeninputfile;
                   current_scanner^.tempopeninputfile;
               end;
               end;
@@ -545,7 +549,7 @@ unit pmodules;
                hp^.search_unit(s,false);
                hp^.search_unit(s,false);
                { try to load the unit a second time first }
                { try to load the unit a second time first }
                current_module:=hp;
                current_module:=hp;
-               current_module^.in_second_compile:=true;
+               current_module^.in_second_load:=true;
                Message1(unit_u_second_load_unit,current_module^.modulename^);
                Message1(unit_u_second_load_unit,current_module^.modulename^);
                second_time:=true;
                second_time:=true;
              end
              end
@@ -1452,7 +1456,10 @@ unit pmodules;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.150  1999-08-30 16:21:40  pierre
+  Revision 1.151  1999-08-31 15:51:10  pierre
+   * in_second_compile cleaned up, in_compile and in_second_load added
+
+  Revision 1.150  1999/08/30 16:21:40  pierre
    * tempclosing of ppufiles under dos was wrong
    * tempclosing of ppufiles under dos was wrong
 
 
   Revision 1.149  1999/08/28 15:34:19  florian
   Revision 1.149  1999/08/28 15:34:19  florian