Quellcode durchsuchen

browser disabled
uf_local_symtable ppu flag when a localsymtable is stored

peter vor 21 Jahren
Ursprung
Commit
d763f9e142
6 geänderte Dateien mit 67 neuen und 50 gelöschten Zeilen
  1. 20 18
      compiler/fppu.pas
  2. 7 1
      compiler/options.pas
  3. 6 1
      compiler/ppu.pas
  4. 15 3
      compiler/switches.pas
  5. 10 4
      compiler/symdef.pas
  6. 9 23
      compiler/utils/ppudump.pp

+ 20 - 18
compiler/fppu.pas

@@ -910,14 +910,6 @@ uses
          b : byte;
          i : longint;
       begin
-        { load local symtable first }
-        {if ((flags and uf_local_browser)<>0) then
-          begin
-             localsymtable:=tstaticsymtable.create(modulename^);
-             tstaticsymtable(localsymtable).ppuload(ppufile);
-          end;}
-
-        { load browser }
         if (flags and uf_has_browser)<>0 then
           begin
             tstoredsymtable(globalsymtable).load_references(ppufile,true);
@@ -949,6 +941,8 @@ uses
           flags:=flags or uf_local_browser;
          if do_release then
           flags:=flags or uf_release;
+         if assigned(localsymtable) then
+           flags:=flags or uf_local_symtable;
 {$ifdef cpufpemu}
          if (cs_fp_emulation in aktmoduleswitches) then
            flags:=flags or uf_fpu_emulation;
@@ -994,8 +988,7 @@ uses
              derefdataintflen:=derefdata.size;
            end;
          tstoredsymtable(globalsymtable).buildderefimpl;
-         if {((flags and uf_local_browser)<>0) and}
-            assigned(localsymtable) then
+         if (flags and uf_local_symtable)<>0 then
            begin
              tstoredsymtable(localsymtable).buildderef;
              tstoredsymtable(localsymtable).buildderefimpl;
@@ -1021,8 +1014,7 @@ uses
 
          { write static symtable
            needed for local debugging of unit functions }
-         if {((flags and uf_local_browser)<>0) and}
-            assigned(localsymtable) then
+         if (flags and uf_local_symtable)<>0 then
            tstoredsymtable(localsymtable).ppuwrite(ppufile);
 
          { write all browser section }
@@ -1037,9 +1029,12 @@ uses
              end;
             ppufile.writeentry(ibendbrowser);
           end;
-         if ((flags and uf_local_browser)<>0) and
-            assigned(localsymtable) then
-           tstaticsymtable(localsymtable).write_references(ppufile,true);
+         if ((flags and uf_local_browser)<>0) then
+           begin
+             if not assigned(localsymtable) then
+               internalerror(200408271);
+             tstaticsymtable(localsymtable).write_references(ppufile,true);
+           end;
 
          { the last entry ibend is written automaticly }
 
@@ -1218,8 +1213,11 @@ uses
         numberunits;
 
         { load implementation symtable }
-        localsymtable:=tstaticsymtable.create(modulename^);
-        tstaticsymtable(localsymtable).ppuload(ppufile);
+        if (flags and uf_local_symtable)<>0 then
+          begin
+            localsymtable:=tstaticsymtable.create(modulename^);
+            tstaticsymtable(localsymtable).ppuload(ppufile);
+          end;
 
         { we can now derefence all pointers to the implementation parts }
         oldobjectlibrary:=objectlibrary;
@@ -1521,7 +1519,11 @@ uses
 end.
 {
   $Log$
-  Revision 1.59  2004-07-09 22:17:31  peter
+  Revision 1.60  2004-08-27 21:59:26  peter
+  browser disabled
+  uf_local_symtable ppu flag when a localsymtable is stored
+
+  Revision 1.59  2004/07/09 22:17:31  peter
     * revert has_localst patch
     * replace aktstaticsymtable/aktglobalsymtable with current_module
 

+ 7 - 1
compiler/options.pas

@@ -440,6 +440,7 @@ begin
 
            'b' :
              begin
+{$ifdef supportbrowser}
                if UnsetBool(More,0) then
                 begin
                   exclude(initmoduleswitches,cs_browser);
@@ -467,6 +468,7 @@ begin
 {$else}
                    IllegalPara(opt);
 {$endif}
+{$endif supportbrowser}
              end;
 
            'B' :
@@ -2077,7 +2079,11 @@ finalization
 end.
 {
   $Log$
-  Revision 1.138  2004-07-05 21:26:28  olle
+  Revision 1.139  2004-08-27 21:59:26  peter
+  browser disabled
+  uf_local_symtable ppu flag when a localsymtable is stored
+
+  Revision 1.138  2004/07/05 21:26:28  olle
     + allow fileextension .p, in mode macpas
 
   Revision 1.137  2004/07/04 12:24:04  jonas

+ 6 - 1
compiler/ppu.pas

@@ -147,6 +147,7 @@ const
   uf_threadvars    = $4000;   { unit has threadvars }
   uf_fpu_emulation = $8000;   { this unit was compiled with fpu emulation on }
   uf_has_debuginfo = $10000;  { this unit has debuginfo generated }
+  uf_local_symtable = $20000; { this unit has a local symtable stored }
 
 type
   ppureal=extended;
@@ -1053,7 +1054,11 @@ end;
 end.
 {
   $Log$
-  Revision 1.55  2004-08-22 20:11:38  florian
+  Revision 1.56  2004-08-27 21:59:26  peter
+  browser disabled
+  uf_local_symtable ppu flag when a localsymtable is stored
+
+  Revision 1.55  2004/08/22 20:11:38  florian
     * morphos now takes any pointer var. as libbase
     * alignment for sparc fixed
     * int -> double conversion on sparc fixed

+ 15 - 3
compiler/switches.pas

@@ -60,7 +60,11 @@ const
    {I} (typesw:localsw; setsw:ord(cs_check_io)),
    {J} (typesw:localsw; setsw:ord(cs_typed_const_writable)),
    {K} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
+{$ifdef supportbrowser}
    {L} (typesw:modulesw; setsw:ord(cs_local_browser)),
+{$else supportbrowser}
+   {L} (typesw:modulesw; setsw:ord(cs_localnone)),
+{$endif supportbrowser}
    {M} (typesw:localsw; setsw:ord(cs_generate_rtti)),
    {N} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
    {O} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
@@ -73,7 +77,11 @@ const
    {V} (typesw:localsw; setsw:ord(cs_strict_var_strings)),
    {W} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
    {X} (typesw:modulesw; setsw:ord(cs_extsyntax)),
+{$ifdef supportbrowser}
    {Y} (typesw:modulesw; setsw:ord(cs_browser)),
+{$else supportbrowser}
+   {Y} (typesw:modulesw; setsw:ord(cs_localnone)),
+{$endif supportbrowser}
    {Z} (typesw:illegalsw; setsw:ord(cs_localnone))
     );
 
@@ -126,7 +134,7 @@ begin
     switchTablePtr:= @macSwitchTable
   else
     switchTablePtr:= @turboSwitchTable;
-  
+
 { Handle the switch }
    with switchTablePtr^[switch] do
    begin
@@ -197,7 +205,7 @@ begin
     switchTablePtr:= @macSwitchTable
   else
     switchTablePtr:= @turboSwitchTable;
-  
+
 { Check the switch }
    with switchTablePtr^[switch] do
    begin
@@ -218,7 +226,11 @@ end;
 end.
 {
   $Log$
-  Revision 1.15  2004-07-14 23:19:22  olle
+  Revision 1.16  2004-08-27 21:59:26  peter
+  browser disabled
+  uf_local_symtable ppu flag when a localsymtable is stored
+
+  Revision 1.15  2004/07/14 23:19:22  olle
     + added external facilities for macpas
 
   Revision 1.14  2004/06/20 08:55:30  florian

+ 10 - 4
compiler/symdef.pas

@@ -3855,10 +3855,12 @@ implementation
 
          { save localsymtable for inline procedures or when local
            browser info is requested, this has no influence on the crc }
-         if assigned(localst) and
-            ((proccalloption=pocall_inline) or
-             ((current_module.flags and uf_local_browser)<>0)) then
+         if (proccalloption=pocall_inline) or
+            ((current_module.flags and uf_local_browser)<>0) then
           begin
+            { we must write a localsymtable }
+            if not assigned(localst) then
+              insert_localst;
             oldintfcrc:=ppufile.do_crc;
             ppufile.do_crc:=false;
             tlocalsymtable(localst).ppuwrite(ppufile);
@@ -6154,7 +6156,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.252  2004-08-17 16:29:21  jonas
+  Revision 1.253  2004-08-27 21:59:26  peter
+  browser disabled
+  uf_local_symtable ppu flag when a localsymtable is stored
+
+  Revision 1.252  2004/08/17 16:29:21  jonas
     + padalgingment field for recordsymtables (saved by recorddefs)
     + support for Macintosh PowerPC alignment (if the first field of a record
       or union has an alignment > 4, then the record or union size must be

+ 9 - 23
compiler/utils/ppudump.pp

@@ -1836,7 +1836,7 @@ begin
   else
    ppufile.skipuntilentry(ibendimplementation);
 {read the static browser units stuff}
-  if (ppufile.header.flags and uf_local_browser)<>0 then
+  if (ppufile.header.flags and uf_local_symtable)<>0 then
    begin
      if (verbose and v_defs)<>0 then
       begin
@@ -1854,28 +1854,10 @@ begin
         Writeln('Static Symbols');
         Writeln('------------------');
         readsymbols('implementation');
-      end;
+      end
+     else
+      ppufile.skipuntilentry(ibendsyms);
    end;
-{read the definitions}
-  if (verbose and v_defs)<>0 then
-   begin
-     Writeln;
-     Writeln('Implementation definitions');
-     Writeln('----------------------');
-     readdefinitions('implementation',false);
-   end
-  else
-   ppufile.skipuntilentry(ibenddefs);
-{read the symbols}
-  if (verbose and v_syms)<>0 then
-   begin
-     Writeln;
-     Writeln('Implementation Symbols');
-     Writeln('------------------');
-     readsymbols('implementation');
-   end
-  else
-   ppufile.skipuntilentry(ibendsyms);
 {read the browser units stuff}
   if (ppufile.header.flags and uf_has_browser)<>0 then
    begin
@@ -1986,7 +1968,11 @@ begin
 end.
 {
   $Log$
-  Revision 1.53  2004-07-12 09:14:04  jonas
+  Revision 1.54  2004-08-27 21:59:27  peter
+  browser disabled
+  uf_local_symtable ppu flag when a localsymtable is stored
+
+  Revision 1.53  2004/07/12 09:14:04  jonas
     * inline procedures at the node tree level, but only under some very
       limited circumstances for now (only procedures, and only if they have
       no or only vs_out/vs_var parameters).