Browse Source

+ report when compilation of a unit is stopped because it has been already compiled during the recursive search in uses clauses

git-svn-id: trunk@30001 -
florian 10 năm trước cách đây
mục cha
commit
91db2a1698
4 tập tin đã thay đổi với 353 bổ sung342 xóa
  1. 3 0
      compiler/msg/errore.msg
  2. 3 2
      compiler/msgidx.inc
  3. 342 339
      compiler/msgtxt.inc
  4. 5 1
      compiler/pmodules.pas

+ 3 - 0
compiler/msg/errore.msg

@@ -1531,6 +1531,9 @@ parser_w_ptr_type_ignored=03338_W_Pointer type "$1" ignored
 parser_e_global_generic_references_static=03339_E_Global Generic template references static symtable
 % A generic declared in the interface section of a unit must not reference symbols that belong
 % solely to the implementation section of that unit.
+parser_u_already_compiled=03340_UL_Unit $1 has been already compiled meanwhile.
+% This tells you that the recursive reading of the uses clauses triggered already
+% a compilation of the current unit, so the current compilation can be aborded.
 %
 %
 %

+ 3 - 2
compiler/msgidx.inc

@@ -441,6 +441,7 @@ const
   parser_e_default_value_val_const=03337;
   parser_w_ptr_type_ignored=03338;
   parser_e_global_generic_references_static=03339;
+  parser_u_already_compiled=03340;
   type_e_mismatch=04000;
   type_e_incompatible_types=04001;
   type_e_not_equal_types=04002;
@@ -1006,9 +1007,9 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 75269;
+  MsgTxtSize = 75323;
 
   MsgIdxMax : array[1..20] of longint=(
-    26,99,340,1000,96,57,126,29,202,64,
+    26,99,341,1000,96,57,126,29,202,64,
     58,20,1,1,1,1,1,1,1,1
   );

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 342 - 339
compiler/msgtxt.inc


+ 5 - 1
compiler/pmodules.pas

@@ -849,7 +849,11 @@ type
              loadunits(nil);
              { has it been compiled at a higher level ?}
              if current_module.state=ms_compiled then
-               exit;
+               begin
+                 Message1(parser_u_already_compiled,current_module.realmodulename^);
+                 exit;
+               end;
+
              consume_semicolon_after_uses:=true;
            end
          else

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác