Răsfoiți Sursa

* fix the unitsym chain

pierre 25 ani în urmă
părinte
comite
f4d925b2e1
3 a modificat fișierele cu 34 adăugiri și 5 ștergeri
  1. 10 3
      compiler/symsym.inc
  2. 5 1
      compiler/symsymh.inc
  3. 19 1
      compiler/symtable.pas

+ 10 - 3
compiler/symsym.inc

@@ -292,7 +292,7 @@
 
     { we need to remove it from the prevsym chain ! }
 
-    destructor tunitsym.done;
+    procedure tunitsym.restoreunitsym;
       var pus,ppus : punitsym;
       begin
          if assigned(unitsymtable) then
@@ -316,7 +316,11 @@
                end;
            end;
          prevsym:=nil;
-         unitsymtable:=nil;
+      end;
+
+    destructor tunitsym.done;
+      begin
+         restoreunitsym;
          inherited done;
       end;
 
@@ -2147,7 +2151,10 @@
 
 {
   $Log$
-  Revision 1.144  2000-04-27 10:06:04  pierre
+  Revision 1.145  2000-05-03 14:34:05  pierre
+   * fix the unitsym chain
+
+  Revision 1.144  2000/04/27 10:06:04  pierre
     * fix for snapshot failue
     * order_overloaded reintrocduced and adapted to operators
 

+ 5 - 1
compiler/symsymh.inc

@@ -77,6 +77,7 @@
           constructor load;
           destructor done;virtual;
           procedure write;virtual;
+          procedure restoreunitsym;
 {$ifdef GDB}
           procedure concatstabto(asmlist : paasmoutput);virtual;
 {$endif GDB}
@@ -317,7 +318,10 @@
 
 {
   $Log$
-  Revision 1.48  2000-04-27 10:06:04  pierre
+  Revision 1.49  2000-05-03 14:34:05  pierre
+   * fix the unitsym chain
+
+  Revision 1.48  2000/04/27 10:06:04  pierre
     * fix for snapshot failue
     * order_overloaded reintrocduced and adapted to operators
 

+ 19 - 1
compiler/symtable.pas

@@ -464,6 +464,7 @@ unit symtable;
 
 {*** symtable stack ***}
     procedure dellexlevel;
+    procedure RestoreUnitSyms;
 {$ifdef DEBUG}
     procedure test_symtablestack;
     procedure list_symtablestack;
@@ -2769,6 +2770,20 @@ implementation
           dispose(p,done);
       end;
 
+    procedure RestoreUnitSyms;
+      var
+         p : psymtable;
+      begin
+         p:=symtablestack;
+         while assigned(p) do
+           begin
+             if (p^.symtabletype=unitsymtable) and
+               assigned(punitsymtable(p)^.unitsym) then
+                 punitsymtable(p)^.unitsym^.restoreunitsym;
+             p:=p^.next;
+           end;
+      end;
+
 {$ifdef DEBUG}
     procedure test_symtablestack;
       var
@@ -2885,7 +2900,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.88  2000-04-27 11:35:04  pierre
+  Revision 1.89  2000-05-03 14:34:05  pierre
+   * fix the unitsym chain
+
+  Revision 1.88  2000/04/27 11:35:04  pierre
    * power to ** operator fixed
 
   Revision 1.87  2000/04/27 10:06:04  pierre