فهرست منبع

browser disabled
uf_local_symtable ppu flag when a localsymtable is stored

peter 21 سال پیش
والد
کامیت
d763f9e142
6فایلهای تغییر یافته به همراه67 افزوده شده و 50 حذف شده
  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;
          b : byte;
          i : longint;
          i : longint;
       begin
       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
         if (flags and uf_has_browser)<>0 then
           begin
           begin
             tstoredsymtable(globalsymtable).load_references(ppufile,true);
             tstoredsymtable(globalsymtable).load_references(ppufile,true);
@@ -949,6 +941,8 @@ uses
           flags:=flags or uf_local_browser;
           flags:=flags or uf_local_browser;
          if do_release then
          if do_release then
           flags:=flags or uf_release;
           flags:=flags or uf_release;
+         if assigned(localsymtable) then
+           flags:=flags or uf_local_symtable;
 {$ifdef cpufpemu}
 {$ifdef cpufpemu}
          if (cs_fp_emulation in aktmoduleswitches) then
          if (cs_fp_emulation in aktmoduleswitches) then
            flags:=flags or uf_fpu_emulation;
            flags:=flags or uf_fpu_emulation;
@@ -994,8 +988,7 @@ uses
              derefdataintflen:=derefdata.size;
              derefdataintflen:=derefdata.size;
            end;
            end;
          tstoredsymtable(globalsymtable).buildderefimpl;
          tstoredsymtable(globalsymtable).buildderefimpl;
-         if {((flags and uf_local_browser)<>0) and}
-            assigned(localsymtable) then
+         if (flags and uf_local_symtable)<>0 then
            begin
            begin
              tstoredsymtable(localsymtable).buildderef;
              tstoredsymtable(localsymtable).buildderef;
              tstoredsymtable(localsymtable).buildderefimpl;
              tstoredsymtable(localsymtable).buildderefimpl;
@@ -1021,8 +1014,7 @@ uses
 
 
          { write static symtable
          { write static symtable
            needed for local debugging of unit functions }
            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);
            tstoredsymtable(localsymtable).ppuwrite(ppufile);
 
 
          { write all browser section }
          { write all browser section }
@@ -1037,9 +1029,12 @@ uses
              end;
              end;
             ppufile.writeentry(ibendbrowser);
             ppufile.writeentry(ibendbrowser);
           end;
           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 }
          { the last entry ibend is written automaticly }
 
 
@@ -1218,8 +1213,11 @@ uses
         numberunits;
         numberunits;
 
 
         { load implementation symtable }
         { 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 }
         { we can now derefence all pointers to the implementation parts }
         oldobjectlibrary:=objectlibrary;
         oldobjectlibrary:=objectlibrary;
@@ -1521,7 +1519,11 @@ uses
 end.
 end.
 {
 {
   $Log$
   $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
     * revert has_localst patch
     * replace aktstaticsymtable/aktglobalsymtable with current_module
     * replace aktstaticsymtable/aktglobalsymtable with current_module
 
 

+ 7 - 1
compiler/options.pas

@@ -440,6 +440,7 @@ begin
 
 
            'b' :
            'b' :
              begin
              begin
+{$ifdef supportbrowser}
                if UnsetBool(More,0) then
                if UnsetBool(More,0) then
                 begin
                 begin
                   exclude(initmoduleswitches,cs_browser);
                   exclude(initmoduleswitches,cs_browser);
@@ -467,6 +468,7 @@ begin
 {$else}
 {$else}
                    IllegalPara(opt);
                    IllegalPara(opt);
 {$endif}
 {$endif}
+{$endif supportbrowser}
              end;
              end;
 
 
            'B' :
            'B' :
@@ -2077,7 +2079,11 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $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
     + allow fileextension .p, in mode macpas
 
 
   Revision 1.137  2004/07/04 12:24:04  jonas
   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_threadvars    = $4000;   { unit has threadvars }
   uf_fpu_emulation = $8000;   { this unit was compiled with fpu emulation on }
   uf_fpu_emulation = $8000;   { this unit was compiled with fpu emulation on }
   uf_has_debuginfo = $10000;  { this unit has debuginfo generated }
   uf_has_debuginfo = $10000;  { this unit has debuginfo generated }
+  uf_local_symtable = $20000; { this unit has a local symtable stored }
 
 
 type
 type
   ppureal=extended;
   ppureal=extended;
@@ -1053,7 +1054,11 @@ end;
 end.
 end.
 {
 {
   $Log$
   $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
     * morphos now takes any pointer var. as libbase
     * alignment for sparc fixed
     * alignment for sparc fixed
     * int -> double conversion on 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)),
    {I} (typesw:localsw; setsw:ord(cs_check_io)),
    {J} (typesw:localsw; setsw:ord(cs_typed_const_writable)),
    {J} (typesw:localsw; setsw:ord(cs_typed_const_writable)),
    {K} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
    {K} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
+{$ifdef supportbrowser}
    {L} (typesw:modulesw; setsw:ord(cs_local_browser)),
    {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)),
    {M} (typesw:localsw; setsw:ord(cs_generate_rtti)),
    {N} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
    {N} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
    {O} (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)),
    {V} (typesw:localsw; setsw:ord(cs_strict_var_strings)),
    {W} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
    {W} (typesw:unsupportedsw; setsw:ord(cs_localnone)),
    {X} (typesw:modulesw; setsw:ord(cs_extsyntax)),
    {X} (typesw:modulesw; setsw:ord(cs_extsyntax)),
+{$ifdef supportbrowser}
    {Y} (typesw:modulesw; setsw:ord(cs_browser)),
    {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))
    {Z} (typesw:illegalsw; setsw:ord(cs_localnone))
     );
     );
 
 
@@ -126,7 +134,7 @@ begin
     switchTablePtr:= @macSwitchTable
     switchTablePtr:= @macSwitchTable
   else
   else
     switchTablePtr:= @turboSwitchTable;
     switchTablePtr:= @turboSwitchTable;
-  
+
 { Handle the switch }
 { Handle the switch }
    with switchTablePtr^[switch] do
    with switchTablePtr^[switch] do
    begin
    begin
@@ -197,7 +205,7 @@ begin
     switchTablePtr:= @macSwitchTable
     switchTablePtr:= @macSwitchTable
   else
   else
     switchTablePtr:= @turboSwitchTable;
     switchTablePtr:= @turboSwitchTable;
-  
+
 { Check the switch }
 { Check the switch }
    with switchTablePtr^[switch] do
    with switchTablePtr^[switch] do
    begin
    begin
@@ -218,7 +226,11 @@ end;
 end.
 end.
 {
 {
   $Log$
   $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
     + added external facilities for macpas
 
 
   Revision 1.14  2004/06/20 08:55:30  florian
   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
          { save localsymtable for inline procedures or when local
            browser info is requested, this has no influence on the crc }
            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
           begin
+            { we must write a localsymtable }
+            if not assigned(localst) then
+              insert_localst;
             oldintfcrc:=ppufile.do_crc;
             oldintfcrc:=ppufile.do_crc;
             ppufile.do_crc:=false;
             ppufile.do_crc:=false;
             tlocalsymtable(localst).ppuwrite(ppufile);
             tlocalsymtable(localst).ppuwrite(ppufile);
@@ -6154,7 +6156,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $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)
     + padalgingment field for recordsymtables (saved by recorddefs)
     + support for Macintosh PowerPC alignment (if the first field of a record
     + 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
       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
   else
    ppufile.skipuntilentry(ibendimplementation);
    ppufile.skipuntilentry(ibendimplementation);
 {read the static browser units stuff}
 {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
    begin
      if (verbose and v_defs)<>0 then
      if (verbose and v_defs)<>0 then
       begin
       begin
@@ -1854,28 +1854,10 @@ begin
         Writeln('Static Symbols');
         Writeln('Static Symbols');
         Writeln('------------------');
         Writeln('------------------');
         readsymbols('implementation');
         readsymbols('implementation');
-      end;
+      end
+     else
+      ppufile.skipuntilentry(ibendsyms);
    end;
    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}
 {read the browser units stuff}
   if (ppufile.header.flags and uf_has_browser)<>0 then
   if (ppufile.header.flags and uf_has_browser)<>0 then
    begin
    begin
@@ -1986,7 +1968,11 @@ begin
 end.
 end.
 {
 {
   $Log$
   $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
     * inline procedures at the node tree level, but only under some very
       limited circumstances for now (only procedures, and only if they have
       limited circumstances for now (only procedures, and only if they have
       no or only vs_out/vs_var parameters).
       no or only vs_out/vs_var parameters).