2
0
Эх сурвалжийг харах

+ 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 жил өмнө
parent
commit
91db2a1698

+ 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
 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
 % A generic declared in the interface section of a unit must not reference symbols that belong
 % solely to the implementation section of that unit.
 % 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_e_default_value_val_const=03337;
   parser_w_ptr_type_ignored=03338;
   parser_w_ptr_type_ignored=03338;
   parser_e_global_generic_references_static=03339;
   parser_e_global_generic_references_static=03339;
+  parser_u_already_compiled=03340;
   type_e_mismatch=04000;
   type_e_mismatch=04000;
   type_e_incompatible_types=04001;
   type_e_incompatible_types=04001;
   type_e_not_equal_types=04002;
   type_e_not_equal_types=04002;
@@ -1006,9 +1007,9 @@ const
   option_info=11024;
   option_info=11024;
   option_help_pages=11025;
   option_help_pages=11025;
 
 
-  MsgTxtSize = 75269;
+  MsgTxtSize = 75323;
 
 
   MsgIdxMax : array[1..20] of longint=(
   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
     58,20,1,1,1,1,1,1,1,1
   );
   );

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 342 - 339
compiler/msgtxt.inc


+ 5 - 1
compiler/pmodules.pas

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

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно