Browse Source

* remove obsolete unchain_overloads

git-svn-id: trunk@12065 -
peter 16 years ago
parent
commit
0f6f1a9c97
4 changed files with 1 additions and 48 deletions
  1. 1 9
      compiler/pmodules.pas
  2. 0 2
      compiler/psub.pas
  3. 0 22
      compiler/symsym.pas
  4. 0 15
      compiler/symtable.pas

+ 1 - 9
compiler/pmodules.pas

@@ -1150,15 +1150,12 @@ implementation
              tstoredsymtable(current_module.globalsymtable).check_forwards;
              tstoredsymtable(current_module.globalsymtable).check_forwards;
              { check if all private fields are used }
              { check if all private fields are used }
              tstoredsymtable(current_module.globalsymtable).allprivatesused;
              tstoredsymtable(current_module.globalsymtable).allprivatesused;
-             { remove cross unit overloads }
-             tstoredsymtable(current_module.globalsymtable).unchain_overloaded;
 
 
              { test static symtable }
              { test static symtable }
              tstoredsymtable(current_module.localsymtable).allsymbolsused;
              tstoredsymtable(current_module.localsymtable).allsymbolsused;
              tstoredsymtable(current_module.localsymtable).allprivatesused;
              tstoredsymtable(current_module.localsymtable).allprivatesused;
              tstoredsymtable(current_module.localsymtable).check_forwards;
              tstoredsymtable(current_module.localsymtable).check_forwards;
              tstoredsymtable(current_module.localsymtable).checklabels;
              tstoredsymtable(current_module.localsymtable).checklabels;
-             tstoredsymtable(current_module.localsymtable).unchain_overloaded;
 
 
              { used units }
              { used units }
              current_module.allunitsused;
              current_module.allunitsused;
@@ -1236,10 +1233,7 @@ implementation
              Message1(unit_u_implementation_crc_changed,current_module.ppufilename^);
              Message1(unit_u_implementation_crc_changed,current_module.ppufilename^);
 {$endif EXTDEBUG}
 {$endif EXTDEBUG}
 
 
-         { release all overload references and local symtables that
-           are not needed anymore }
-         tstoredsymtable(current_module.localsymtable).unchain_overloaded;
-         tstoredsymtable(current_module.globalsymtable).unchain_overloaded;
+         { release local symtables that are not needed anymore }
          free_localsymtables(current_module.globalsymtable);
          free_localsymtables(current_module.globalsymtable);
          free_localsymtables(current_module.localsymtable);
          free_localsymtables(current_module.localsymtable);
 
 
@@ -1670,7 +1664,6 @@ implementation
              tstoredsymtable(current_module.localsymtable).allsymbolsused;
              tstoredsymtable(current_module.localsymtable).allsymbolsused;
              tstoredsymtable(current_module.localsymtable).allprivatesused;
              tstoredsymtable(current_module.localsymtable).allprivatesused;
              tstoredsymtable(current_module.localsymtable).check_forwards;
              tstoredsymtable(current_module.localsymtable).check_forwards;
-             tstoredsymtable(current_module.localsymtable).unchain_overloaded;
 
 
              current_module.allunitsused;
              current_module.allunitsused;
            end;
            end;
@@ -2038,7 +2031,6 @@ implementation
              tstoredsymtable(current_module.localsymtable).allsymbolsused;
              tstoredsymtable(current_module.localsymtable).allsymbolsused;
              tstoredsymtable(current_module.localsymtable).allprivatesused;
              tstoredsymtable(current_module.localsymtable).allprivatesused;
              tstoredsymtable(current_module.localsymtable).check_forwards;
              tstoredsymtable(current_module.localsymtable).check_forwards;
-             tstoredsymtable(current_module.localsymtable).unchain_overloaded;
 
 
              current_module.allunitsused;
              current_module.allunitsused;
            end;
            end;

+ 0 - 2
compiler/psub.pas

@@ -1349,8 +1349,6 @@ implementation
              tstoredsymtable(procdef.localst).check_forwards;
              tstoredsymtable(procdef.localst).check_forwards;
              { check if all labels are used }
              { check if all labels are used }
              tstoredsymtable(procdef.localst).checklabels;
              tstoredsymtable(procdef.localst).checklabels;
-             { remove cross unit overloads }
-             tstoredsymtable(procdef.localst).unchain_overloaded;
              { check for unused symbols, but only if there is no asm block }
              { check for unused symbols, but only if there is no asm block }
              if not(pi_has_assembler_block in flags) then
              if not(pi_has_assembler_block in flags) then
                begin
                begin

+ 0 - 22
compiler/symsym.pas

@@ -92,7 +92,6 @@ interface
           { tests, if all procedures definitions are defined and not }
           { tests, if all procedures definitions are defined and not }
           { only forward                                             }
           { only forward                                             }
           procedure check_forward;
           procedure check_forward;
-          procedure unchain_overload;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure buildderef;override;
           procedure buildderef;override;
           procedure deref;override;
           procedure deref;override;
@@ -753,27 +752,6 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tprocsym.unchain_overload;
-      var
-        i  : longint;
-        pd : tprocdef;
-      begin
-        { reset new lists }
-        for i:=0 to ProcdefList.Count-1 do
-          begin
-            pd:=tprocdef(ProcdefList[i]);
-            { only keep the proc definitions:
-              - are not deref'd (def=nil)
-              - are in the same symtable as the procsym (for example both
-                are in the staticsymtable) }
-            if not(pd.owner=owner) then
-              ProcdefList[i]:=nil;
-          end;
-        { Remove cleared entries }
-        ProcdefList.Pack;
-      end;
-
-
     function tprocsym.is_visible_for_object(currobjdef:tdef;context:tdef):boolean;
     function tprocsym.is_visible_for_object(currobjdef:tdef;context:tdef):boolean;
       var
       var
         i  : longint;
         i  : longint;

+ 0 - 15
compiler/symtable.pas

@@ -52,7 +52,6 @@ interface
           procedure varsymbolused(sym:TObject;arg:pointer);
           procedure varsymbolused(sym:TObject;arg:pointer);
           procedure TestPrivate(sym:TObject;arg:pointer);
           procedure TestPrivate(sym:TObject;arg:pointer);
           procedure objectprivatesymbolused(sym:TObject;arg:pointer);
           procedure objectprivatesymbolused(sym:TObject;arg:pointer);
-          procedure unchain_overloads(sym:TObject;arg:pointer);
           procedure loaddefs(ppufile:tcompilerppufile);
           procedure loaddefs(ppufile:tcompilerppufile);
           procedure loadsyms(ppufile:tcompilerppufile);
           procedure loadsyms(ppufile:tcompilerppufile);
           procedure writedefs(ppufile:tcompilerppufile);
           procedure writedefs(ppufile:tcompilerppufile);
@@ -74,7 +73,6 @@ interface
           procedure check_forwards;
           procedure check_forwards;
           procedure checklabels;
           procedure checklabels;
           function  needs_init_final : boolean;
           function  needs_init_final : boolean;
-          procedure unchain_overloaded;
           procedure testfordefaultproperty(sym:TObject;arg:pointer);
           procedure testfordefaultproperty(sym:TObject;arg:pointer);
        end;
        end;
 
 
@@ -651,13 +649,6 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tstoredsymtable.unchain_overloads(sym:TObject;arg:pointer);
-      begin
-         if tsym(sym).typ=procsym then
-           tprocsym(sym).unchain_overload;
-      end;
-
-
    procedure tstoredsymtable.testfordefaultproperty(sym:TObject;arg:pointer);
    procedure tstoredsymtable.testfordefaultproperty(sym:TObject;arg:pointer);
      begin
      begin
         if (tsym(sym).typ=propertysym) and
         if (tsym(sym).typ=propertysym) and
@@ -708,12 +699,6 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tstoredsymtable.unchain_overloaded;
-      begin
-         SymList.ForEachCall(@unchain_overloads,nil);
-      end;
-
-
     procedure TStoredSymtable._needs_init_final(sym:TObject;arg:pointer);
     procedure TStoredSymtable._needs_init_final(sym:TObject;arg:pointer);
       begin
       begin
          if b_needs_init_final then
          if b_needs_init_final then