Browse Source

* set ms_compiled after the program/unit is parsed
* check for ms_compiled before checking preproc matches

peter 22 năm trước cách đây
mục cha
commit
526cffbaad
3 tập tin đã thay đổi với 24 bổ sung11 xóa
  1. 8 6
      compiler/fppu.pas
  2. 10 3
      compiler/parser.pas
  3. 6 2
      compiler/scanner.pas

+ 8 - 6
compiler/fppu.pas

@@ -1353,8 +1353,6 @@ uses
            if not do_compile then
             begin
               Message1(unit_u_loading_unit,modulename^);
-if modulename^='SYMSYM' then
- modulename:=modulename;
               search_unit(false,false);
               if not do_compile then
                begin
@@ -1400,12 +1398,12 @@ if modulename^='SYMSYM' then
               if not(state in [ms_compile,ms_second_compile]) then
                 state:=ms_compile;
               compile(mainsource^);
-            end;
+            end
+           else
+            state:=ms_compiled;
 
-           { set compiled flag }
            if current_module<>self then
              internalerror(200212282);
-           state:=ms_compiled;
 
            if in_interface then
              internalerror(200212283);
@@ -1510,7 +1508,11 @@ if modulename^='SYMSYM' then
 end.
 {
   $Log$
-  Revision 1.43  2003-10-23 14:44:07  peter
+  Revision 1.44  2003-10-29 21:02:51  peter
+    * set ms_compiled after the program/unit is parsed
+    * check for ms_compiled before checking preproc matches
+
+  Revision 1.43  2003/10/23 14:44:07  peter
     * splitted buildderef and buildderefimpl to fix interface crc
       calculation
 

+ 10 - 3
compiler/parser.pas

@@ -38,10 +38,10 @@ implementation
     uses
       cutils,cclasses,
       globtype,version,tokens,systems,globals,verbose,
-      symbase,symtable,symdef,symsym,
+      symbase,symtable,symsym,
       finput,fmodule,fppu,
       aasmbase,aasmtai,
-      cpubase,cgbase,
+      cgbase,
       script,gendef,
 {$ifdef BrowserLog}
       browlog,
@@ -539,6 +539,9 @@ implementation
 
          if assigned(current_module) then
           begin
+            { module is now compiled }
+            tppumodule(current_module).state:=ms_compiled;
+
             { free ppu }
             if assigned(tppumodule(current_module).ppufile) then
              begin
@@ -688,7 +691,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.57  2003-10-01 20:34:49  peter
+  Revision 1.58  2003-10-29 21:02:51  peter
+    * set ms_compiled after the program/unit is parsed
+    * check for ms_compiled before checking preproc matches
+
+  Revision 1.57  2003/10/01 20:34:49  peter
     * procinfo unit contains tprocinfo
     * cginfo renamed to cgbase
     * moved cgmessage to verbose

+ 6 - 2
compiler/scanner.pas

@@ -1021,7 +1021,7 @@ implementation
     destructor tscannerfile.destroy;
       begin
         if assigned(current_module) and
-           (current_module.state<>ms_second_load) and
+           (current_module.state=ms_compiled) and
            (status.errorcount=0) then
           checkpreprocstack
         else
@@ -2906,7 +2906,11 @@ exit_label:
 end.
 {
   $Log$
-  Revision 1.62  2003-09-17 22:30:19  olle
+  Revision 1.63  2003-10-29 21:02:51  peter
+    * set ms_compiled after the program/unit is parsed
+    * check for ms_compiled before checking preproc matches
+
+  Revision 1.62  2003/09/17 22:30:19  olle
     + support for a different set of compiler directives under $MODE MAC
     + added mac directives $SETC $IFC $ELSEC $ENDC