فهرست منبع

- removed OLDPPU

peter 27 سال پیش
والد
کامیت
6cc16ea7f1
7فایلهای تغییر یافته به همراه38 افزوده شده و 1266 حذف شده
  1. 5 7
      compiler/cga68k.pas
  2. 5 398
      compiler/files.pas
  3. 5 290
      compiler/pmodules.pas
  4. 5 5
      compiler/pstatmnt.pas
  5. 8 161
      compiler/symdef.inc
  6. 4 270
      compiler/symppu.inc
  7. 6 135
      compiler/symsym.inc

+ 5 - 7
compiler/cga68k.pas

@@ -75,18 +75,13 @@ unit cga68k;
 
     uses
        systems,globals,verbose,files,types,pbase,
-       tgen68k,hcodegen,temp_gen
-{$ifndef OLDPPU}
-       ,ppu
-{$endif}
-
+       tgen68k,hcodegen,temp_gen,ppu
 {$ifdef GDB}
        ,gdb
 {$endif}
        ;
 
 
-
     {
     procedure genconstadd(size : topsize;l : longint;const str : string);
 
@@ -1220,7 +1215,10 @@ end;
   end.
 {
   $Log$
-  Revision 1.8  1998-08-10 14:43:16  peter
+  Revision 1.9  1998-08-17 10:10:04  peter
+    - removed OLDPPU
+
+  Revision 1.8  1998/08/10 14:43:16  peter
     * string type st_ fixed
 
   Revision 1.7  1998/07/10 10:51:01  peter

+ 5 - 398
compiler/files.pas

@@ -26,11 +26,7 @@ unit files;
   interface
 
     uses
-       cobjects,globals
-{$ifndef OLDPPU}
-       ,ppu
-{$endif}
-       ;
+       cobjects,globals,ppu;
 
     const
 {$ifdef FPC}
@@ -87,11 +83,7 @@ unit files;
 
        pmodule = ^tmodule;
        tmodule = object(tlinkedlist_item)
-{$ifndef OLDPPU}
           ppufile       : pppufile; { the PPU file }
-{$else}
-          ppufile       : pextfile; { the PPU file }
-{$endif}
           crc,
           flags         : longint;  { the PPU flags }
 
@@ -133,118 +125,31 @@ unit files;
           mainsource    : pstring;  { name of the main sourcefile }
 
           constructor init(const s:string;_is_unit:boolean);
-{$ifndef OLDPPU}
           destructor done;virtual;
-{$else}
-          destructor special_done;virtual; { this is to be called only when compiling again }
-{$endif OLDPPU}
           procedure setfilename(const fn:string);
-{$ifndef OLDPPU}
           function  openppu:boolean;
-{$else}
-          function  load_ppu(const unit_path,n,ext:string):boolean;
-{$endif}
           function  search_unit(const n : string):boolean;
        end;
 
        pused_unit = ^tused_unit;
        tused_unit = object(tlinkedlist_item)
           unitid          : word;
-{$ifndef OLDPPU}
           name            : pstring;
           checksum        : longint;
           loaded          : boolean;
-{$endif OLDPPU}
           in_uses,
           in_interface,
           is_stab_written : boolean;
           u               : pmodule;
-{$ifndef OLDPPU}
           constructor init(_u : pmodule;intface:boolean);
           constructor init_to_load(const n:string;c:longint;intface:boolean);
-{$else OLDPPU}
-          constructor init(_u : pmodule;f : byte);
-{$endif OLDPPU}
           destructor done;virtual;
        end;
 
-{$ifdef OLDPPU}
-    type
-       tunitheader = array[0..19] of char;
-    const
-                                   {                compiler version }
-                                   {             format      |       }
-                                   { signature    |          |       }
-                                   {  |           |          |       }
-                                   { /-------\   /-------\  /----\   }
-       unitheader : tunitheader  = ('P','P','U','0','1','4',#0,#99,
-                                     #0,#0,#0,#0,#0,#0,#255,#255,
-                                   { |   | \---------/ \-------/    }
-                                   { |   |    |             |        }
-                                   { |   |    check sum     |        }
-                                   { |   \--flags        unused      }
-                                   { target system                   }
-                                    #0,#0,#0,#0);
-                                   {\---------/                      }
-                                   {  |                              }
-                                   {  start of machine language      }
-
-       ibloadunit      = 1;
-       iborddef        = 2;
-       ibpointerdef    = 3;
-       ibtypesym       = 4;
-       ibarraydef      = 5;
-       ibprocdef       = 6;
-       ibprocsym       = 7;
-       iblinkofile     = 8;
-       ibstringdef     = 9;
-       ibvarsym        = 10;
-       ibconstsym      = 11;
-       ibinitunit      = 12;
-       ibenumsym       = 13;
-       ibtypedconstsym = 14;
-       ibrecorddef     = 15;
-       ibfiledef       = 16;
-       ibformaldef     = 17;
-       ibobjectdef     = 18;
-       ibenumdef       = 19;
-       ibsetdef        = 20;
-       ibprocvardef    = 21;
-       ibsourcefile    = 22;
-       ibdbxcount      = 23;
-       ibfloatdef      = 24;
-       ibref           = 25;
-       ibextsymref     = 26;
-       ibextdefref     = 27;
-       ibabsolutesym   = 28;
-       ibclassrefdef   = 29;
-       ibpropertysym   = 30;
-       ibsharedlibs    = 31;
-       iblongstringdef = 32;
-       ibansistringdef = 33;
-       ibunitname      = 34;
-       ibwidestringdef = 35;
-       ibstaticlibs    = 36;
-       ibvarsym_C      = 37;
-       ibend           = 255;
-
-       { unit flags }
-       uf_init           = $1;
-       uf_finalize       = $2;
-       uf_big_endian     = $4;
-       uf_has_dbx        = $8;
-       uf_has_browser    = $10;
-       uf_in_library     = $20;
-       uf_static_library = $40;
-       uf_shared_library = $80;
-{$endif}
-
     var
        main_module    : pmodule;     { Main module of the program }
        current_module : pmodule;     { Current module which is compiled }
-{$ifndef OLDPPU}
        current_ppu    : pppufile;    { Current ppufile which is read }
-{$endif}
        global_unit_count : word;
        usedunits      : tlinkedlist; { Used units for this program }
        loaded_units   : tlinkedlist; { All loaded units }
@@ -429,7 +334,6 @@ unit files;
          exefilename:=stringdup(s+target_os.exeext);
       end;
 
-{$ifndef OLDPPU}
 
     function tmodule.openppu:boolean;
       var
@@ -608,260 +512,6 @@ unit files;
          search_unit:=Found;
       end;
 
-{$else OLDPPU}
-
-{*****************************************************************************
-
-                               Old PPU
-
-*****************************************************************************}
-
-    function tmodule.load_ppu(const unit_path,n,ext : string):boolean;
-      var
-         header  : tunitheader;
-         count   : longint;
-         temp,hs : string;
-         b       : byte;
-         incfile_found : boolean;
-         code    : word;
-         ppuversion,
-         objfiletime,
-         ppufiletime,
-         asmfiletime,
-         source_time : longint;
-{$ifdef UseBrowser}
-         hp : pextfile;
-         _d : dirstr;
-         _n : namestr;
-         _e : extstr;
-{$endif UseBrowser}
-      begin
-        load_ppu:=false;
-      { Get ppufile time (also check if the file exists) }
-        ppufiletime:=getnamedfiletime(ppufilename^);
-        if ppufiletime=-1 then
-         exit;
-
-        Message1(unit_u_ppu_loading,ppufilename^);
-        ppufile:=new(pextfile,init(unit_path,n,ext));
-        ppufile^.reset;
-        ppufile^.flush;
-        { load the header }
-        ppufile^.read_data(header,sizeof(header),count);
-        if count<>sizeof(header) then
-         begin
-           ppufile^.done;
-           Message(unit_d_ppu_file_too_short);
-           exit;
-         end;
-        { check for a valid PPU file }
-        if (header[0]<>'P') or (header[1]<>'P') or (header[2]<>'U') then
-         begin
-           ppufile^.done;
-           Message(unit_d_ppu_invalid_header);
-           exit;
-         end;
-        { load ppu version }
-        val(header[3]+header[4]+header[5],ppuversion,code);
-        if not(ppuversion in [13..14]) then
-         begin
-           ppufile^.done;
-           Message1(unit_d_ppu_invalid_version,tostr(ppuversion));
-           exit;
-         end;
-        flags:=byte(header[9]);
-        crc:=plongint(@header[10])^;
-        {Get ppufile time}
-        ppufiletime:=getnamedfiletime(ppufilename^);
-        {Show Debug info}
-        Message1(unit_d_ppu_time,filetimestring(ppufiletime));
-        Message1(unit_d_ppu_flags,tostr(flags));
-        Message1(unit_d_ppu_crc,tostr(crc));
-
-      { read name if its there }
-        ppufile^.read_data(b,1,count);
-        if b=ibunitname then
-         begin
-           ppufile^.read_data(hs[0],1,count);
-           ppufile^.read_data(hs[1],ord(hs[0]),count);
-           stringdispose(modulename);
-           modulename:=stringdup(hs);
-           ppufile^.read_data(b,1,count);
-         end;
-
-      { search source files there is at least one source file }
-        do_compile:=false;
-        sources_avail:=true;
-        while b<>ibend do
-         begin
-           ppufile^.read_data(hs[0],1,count);
-           ppufile^.read_data(hs[1],ord(hs[0]),count);
-           ppufile^.read_data(b,1,count);
-           temp:='';
-           if (flags and uf_in_library)<>0 then
-            begin
-              sources_avail:=false;
-              temp:=' library';
-            end
-           else
-            begin
-              { check the date of the source files }
-              Source_Time:=GetNamedFileTime(unit_path+hs);
-              if Source_Time=-1 then
-                begin
-                   { search for include files in the includepathlist }
-                   if b<>ibend then
-                     begin
-                        temp:=search(hs,includesearchpath,incfile_found);
-                        if incfile_found then
-                          begin
-                             hs:=temp+hs;
-                             Source_Time:=GetNamedFileTime(hs);
-                          end;
-                     end;
-                end
-              else
-                hs:=unit_path+hs;
-              if Source_Time=-1 then
-               begin
-                 sources_avail:=false;
-                 temp:=' not found';
-               end
-              else
-               begin
-                 temp:=' time '+filetimestring(source_time);
-                 if (source_time>ppufiletime) then
-                  begin
-                    do_compile:=true;
-                    temp:=temp+' *'
-                  end;
-               end;
-            end;
-           Message1(unit_t_ppu_source,hs+temp);
-  {$ifdef UseBrowser}
-           fsplit(hs,_d,_n,_e);
-           new(hp,init(_d,_n,_e));
-           { the indexing should match what is done in writeasunit }
-           sourcefiles.register_file(hp);
-  {$endif UseBrowser}
-         end;
-      { main source is always the last }
-        stringdispose(mainsource);
-        mainsource:=stringdup(hs);
-
-      { check the object and assembler file if not a library }
-        if (flags and uf_smartlink)<>0 then
-         begin
-           objfiletime:=getnamedfiletime(libfilename^);
-           if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
-             do_compile:=true;
-         end
-        else
-         begin
-           if (flags and uf_in_library)=0 then
-            begin
-            { the objectfile should be newer than the ppu file }
-              objfiletime:=getnamedfiletime(objfilename^);
-              if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
-               begin
-               { check if assembler file is older than ppu file }
-                 asmfileTime:=GetNamedFileTime(asmfilename^);
-                 if (asmfiletime<0) or (ppufiletime>asmfiletime) then
-                  begin
-                    Message(unit_d_obj_and_asm_are_older_than_ppu);
-                    do_compile:=true;
-                  end
-                 else
-                  begin
-                    Message(unit_d_obj_is_older_than_asm);
-                    do_assemble:=true;
-                  end;
-               end;
-            end;
-         end;
-        load_ppu:=true;
-      end;
-
-    function tmodule.search_unit(const n : string):boolean;
-      var
-         ext       : string[8];
-         singlepathstring,
-         UnitPath,
-         filename  : string;
-         found     : boolean;
-         start,i   : longint;
-
-         Function UnitExists(const ext:string):boolean;
-         begin
-           Message1(unit_t_unitsearch,Singlepathstring+filename+ext);
-           UnitExists:=FileExists(Singlepathstring+FileName+ext);
-         end;
-
-       begin
-         start:=1;
-         filename:=FixFileName(n);
-         unitpath:=UnitSearchPath;
-         Found:=false;
-         repeat
-         {Create current path to check}
-           i:=pos(';',unitpath);
-           if i=0 then
-            i:=length(unitpath)+1;
-           singlepathstring:=FixPath(copy(unitpath,start,i-start));
-           delete(unitpath,start,i-start+1);
-         { Check for PPL file }
-           if not (cs_link_static in aktswitches) then
-            begin
-              Found:=UnitExists(target_info.unitlibext);
-              if Found then
-               Begin
-                 SetFileName(SinglePathString,FileName);
-                 Found:=Load_PPU(singlepathstring,filename,target_info.unitlibext);
-               End;
-             end;
-         { Check for PPU file }
-           if not (cs_link_dynamic in aktswitches) and not Found then
-            begin
-              Found:=UnitExists(target_info.unitext);
-              if Found then
-               Begin
-                 SetFileName(SinglePathString,FileName);
-                 Found:=Load_PPU(singlepathstring,filename,target_info.unitext);
-               End;
-            end;
-         { Check for Sources }
-           if not Found then
-            begin
-              ppufile:=nil;
-              do_compile:=true;
-            {Check for .pp file}
-              Found:=UnitExists(target_os.sourceext);
-              if Found then
-               Ext:=target_os.sourceext
-              else
-               begin
-               {Check for .pas}
-                 Found:=UnitExists(target_os.pasext);
-                 if Found then
-                  Ext:=target_os.pasext;
-               end;
-              stringdispose(mainsource);
-              if Found then
-               begin
-                 sources_avail:=true;
-               {Load Filenames when found}
-                 mainsource:=StringDup(SinglePathString+FileName+Ext);
-                 SetFileName(SinglePathString,FileName);
-               end
-              else
-               sources_avail:=false;
-            end;
-         until Found or (unitpath='');
-         search_unit:=Found;
-      end;
-
-{$endif OLDPPU}
-
 
     constructor tmodule.init(const s:string;_is_unit:boolean);
       var
@@ -888,7 +538,6 @@ unit files;
 {$else}
          asmprefix:=stringdup(Lower(n));
 {$endif}
-
          path:=nil;
          setfilename(p+n);
          used_units.init;
@@ -927,7 +576,6 @@ unit files;
       end;
 
 
-{$ifndef OLDPPU}
     destructor tmodule.done;
       begin
         if assigned(map) then
@@ -954,34 +602,11 @@ unit files;
         inherited done;
       end;
 
-{$else}
-
-    destructor tmodule.special_done;
-      begin
-         if assigned(map) then
-           dispose(map);
-         { cannot remove that because it is linked
-         in the global chain of used_objects
-         used_units.done; }
-         sourcefiles.done;
-         linkofiles.done;
-         linkstaticlibs.done;
-         linksharedlibs.done;
-         if assigned(ppufile) then
-          dispose(ppufile,done);
-         if assigned(imports) then
-          dispose(imports,done);
-         inherited done;
-      end;
-
-{$endif OLDPPU}
 
 {****************************************************************************
                               TUSED_UNIT
  ****************************************************************************}
 
-{$ifndef OLDPPU}
-
     constructor tused_unit.init(_u : pmodule;intface:boolean);
       begin
         u:=_u;
@@ -1014,29 +639,13 @@ unit files;
         inherited done;
       end;
 
-{$else OLDPPU}
-
-    constructor tused_unit.init(_u : pmodule;f : byte);
-      begin
-        u:=_u;
-        in_interface:=false;
-        in_uses:=false;
-        is_stab_written:=false;
-        unitid:=f;
-      end;
-
-    destructor tused_unit.done;
-      begin
-        inherited done;
-      end;
-
-{$endif OLDPPU}
-
-
 end.
 {
   $Log$
-  Revision 1.35  1998-08-17 09:17:44  peter
+  Revision 1.36  1998-08-17 10:10:07  peter
+    - removed OLDPPU
+
+  Revision 1.35  1998/08/17 09:17:44  peter
     * static/shared linking updates
 
   Revision 1.34  1998/08/14 21:56:31  peter
@@ -1077,8 +686,6 @@ end.
     * cleaner pmodules for newppu
 
   Revision 1.23  1998/06/15 14:44:36  daniel
-
-
   * BP updates.
 
   Revision 1.22  1998/06/14 18:25:41  peter

+ 5 - 290
compiler/pmodules.pas

@@ -38,10 +38,7 @@ unit pmodules;
     uses
        cobjects,verbose,comphook,systems,globals,
        symtable,aasm,hcodegen,
-       link,assemble,import,gendef
-{$ifndef OLDPPU}
-       ,ppu
-{$endif OLDPPU}
+       link,assemble,import,gendef,ppu
 {$ifdef i386}
        ,i386
 {$endif}
@@ -80,8 +77,6 @@ unit pmodules;
       end;
 
 
-
-
     procedure insertsegment;
 
         procedure fixseg(p:paasmoutput;sec:tsection);
@@ -145,7 +140,6 @@ unit pmodules;
 
 
     procedure inserttargetspecific;
-
       begin
 {$ifdef i386}
         case target_info.target of
@@ -165,8 +159,6 @@ unit pmodules;
       end;
 
 
-{$ifndef OLDPPU}
-
     function loadunit(const s : string;compile_system:boolean) : pmodule;forward;
 
     procedure load_usedunits(compile_system:boolean);
@@ -358,267 +350,6 @@ unit pmodules;
          loadunit:=hp;
       end;
 
-{$else OLDPPU}
-
-{*****************************************************************************
-
-                               Old PPU
-
-*****************************************************************************}
-
-    function loadunit(const s : string;compile_system, in_uses : boolean) : pmodule;forward;
-
-    procedure load_ppu(oldhp,hp : pmodule;compile_system : boolean);
-      var
-         loaded_unit  : pmodule;
-         b            : byte;
-         checksum,
-         count,
-         nextmapentry : longint;
-         hs           : string;
-      begin
-         { init the map }
-         new(hp^.map);
-         nextmapentry:=1;
-         { load the used units from interface }
-         hp^.ppufile^.read_data(b,1,count);
-         while (b=ibloadunit) do
-           begin
-              { read unit name }
-              hp^.ppufile^.read_data(hs[0],1,count);
-              hp^.ppufile^.read_data(hs[1],byte(hs[0]),count);
-              hp^.ppufile^.read_data(checksum,4,count);
-              loaded_unit:=loadunit(hs,false,false);
-              if hp^.compiled then
-                exit;
-              { if the crc of a used unit is the same as }
-              { written to the PPU file, we needn't to   }
-              { recompile the current unit               }
-              if (loaded_unit^.crc<>checksum) then
-                begin
-                   { we have to compile the current unit }
-                   { remove stuff which isn't needed     }
-                   { forget the map }
-                   dispose(hp^.map);
-                   hp^.map:=nil;
-                   hp^.ppufile^.close;
-                   dispose(hp^.ppufile,done);
-                   hp^.ppufile:=nil;
-                   if not(hp^.sources_avail) then
-                    Message1(unit_f_cant_compile_unit,hp^.modulename^)
-                   else
-                    begin
-                       if assigned(oldhp^.current_inputfile) then
-                         oldhp^.current_inputfile^.tempclose;
-                       compile(hp^.mainsource^,compile_system);
-                       if (not oldhp^.compiled) and assigned(oldhp^.current_inputfile) then
-                         oldhp^.current_inputfile^.tempreopen;
-                    end;
-                   exit;
-                end;
-              { setup the map entry for deref }
-              hp^.map^[nextmapentry]:=loaded_unit^.symtable;
-              inc(nextmapentry);
-              if nextmapentry>maxunits then
-               Message(unit_f_too_much_units);
-              { read until ibend }
-              hp^.ppufile^.read_data(b,1,count);
-           end;
-         { ok, now load the unit }
-         hp^.symtable:=new(punitsymtable,load(hp^.modulename^));
-         { if this is the system unit insert the intern }
-         { symbols                                      }
-         make_ref:=false;
-         if compile_system then
-           insertinternsyms(psymtable(hp^.symtable));
-         make_ref:=true;
-         { now only read the implementation part }
-         hp^.in_implementation:=true;
-         { load the used units from implementation }
-         hp^.ppufile^.read_data(b,1,count);
-         while (b<>ibend) and (b=ibloadunit) do
-           begin
-              { read unit name }
-              hp^.ppufile^.read_data(hs[0],1,count);
-              hp^.ppufile^.read_data(hs[1],byte(hs[0]),count);
-              hp^.ppufile^.read_data(checksum,4,count);
-              loaded_unit:=loadunit(hs,false,false);
-              if hp^.compiled then exit;
-              { if the crc of a used unit is the same as }
-              { written to the PPU file, we needn't to   }
-              { recompile the current unit               }
-              { but for the implementation part          }
-              { the written crc is false, because        }
-              { not defined when writing the ppufile !!  }
-{$ifdef TEST_IMPL}
-              if (checksum<>0) and (loaded_unit^.crc<>checksum) then
-                begin
-                   { we have to compile the current unit }
-                   { remove stuff which isn't needed     }
-                   { forget the map }
-                   dispose(hp^.map);
-                   hp^.map:=nil;
-                   hp^.ppufile^.close;
-                   dispose(hp^.ppufile,done);
-                   hp^.ppufile:=nil;
-                   if not(hp^.sources_avail) then
-                    Message1(unit_f_cant_compile_unit,hp^.modulename^)
-                   else
-                     begin
-                        oldhp^.current_inputfile^.tempclose;
-                        compile(hp^.mainsource^,compile_system);
-                        oldhp^.current_inputfile^.tempclose;
-                     end;
-                   exit;
-                end;
-{$endif TEST_IMPL}
-              { read until ibend }
-              hp^.ppufile^.read_data(b,1,count);
-           end;
-         hp^.ppufile^.close;
-         dispose(hp^.map);
-         hp^.map:=nil;
-      end;
-
-
-    function loadunit(const s : string;compile_system, in_uses : boolean) : pmodule;
-      var
-         st : punitsymtable;
-         old_current_module,hp,nextmodule : pmodule;
-         pu : pused_unit;
-         hs : pstring;
-      begin
-         old_current_module:=current_module;
-         { be sure not to mix lines from different files }
-         { update_line; }
-         { unit not found }
-         st:=nil;
-         { search all loaded units }
-         hp:=pmodule(loaded_units.first);
-         while assigned(hp) do
-           begin
-              if hp^.modulename^=s then
-                begin
-                   { the unit is already registered   }
-                   { and this means that the unit     }
-                   { is already compiled              }
-                   { else there is a cyclic unit use  }
-                   if assigned(hp^.symtable) then
-                     st:=punitsymtable(hp^.symtable)
-                   else
-                    begin
-                    { recompile the unit ? }
-                      if (not current_module^.in_implementation) and (hp^.in_implementation) then
-                       Message(unit_f_circular_unit_reference);
-                    end;
-                   break;
-                end;
-              { the next unit }
-              hp:=pmodule(hp^.next);
-           end;
-       { no error and the unit isn't loaded }
-         if not(assigned(hp)) and (st=nil) then
-           begin
-              { generates a new unit info record }
-              hp:=new(pmodule,init(s,true));
-              { now we can register the unit }
-              loaded_units.insert(hp);
-              current_module:=hp;
-              { force build ? }
-              if (hp^.do_compile) or (hp^.sources_avail and do_build) then
-                begin
-                   { we needn't the ppufile }
-                   if assigned(hp^.ppufile) then
-                     begin
-                        dispose(hp^.ppufile,done);
-                        hp^.ppufile:=nil;
-                     end;
-                   if not(hp^.sources_avail) then
-                    Message1(unit_f_cant_compile_unit,hp^.modulename^)
-                   else
-                    begin
-                      if assigned(old_current_module^.current_inputfile) then
-                         old_current_module^.current_inputfile^.tempclose;
-                        compile(hp^.mainsource^,compile_system);
-                      if (not old_current_module^.compiled) and assigned(old_current_module^.current_inputfile) then
-                        old_current_module^.current_inputfile^.tempreopen;
-                    end;
-                end
-              else
-                begin
-                { only reassemble ? }
-                  if (hp^.do_assemble) then
-                    OnlyAsm(hp^.asmfilename^);
-                 { we should know there the PPU file else it's an error and
-                   we can't load the unit }
-                  if hp^.ppufile^.name^<>'' then
-                    load_ppu(old_current_module,hp,compile_system);
-                 { add the files for the linker }
-                  addlinkerfiles(hp);
-                end;
-              { register the unit _once_ }
-              usedunits.concat(new(pused_unit,init(hp,0)));
-              { the unit is written, so we can set the symtable type }
-              { to unitsymtable, else we get some dupid errors       }
-              { this is not the right place because of the           }
-              { ready label                                          }
-              { psymtable(hp^.symtable)^.symtabletype:=unitsymtable; }
-              { placed at this end of proc_unit                      }
-              psymtable(hp^.symtable)^.unitid:=0;
-              { reset the unitnumbers for the other units }
-              pu:=pused_unit(old_current_module^.used_units.first);
-              while assigned(pu) do
-                begin
-                   psymtable(pu^.u^.symtable)^.unitid:=pu^.unitid;
-                   pu:=pused_unit(pu^.next);
-                end;
-           end
-         else
-           if assigned(hp) and (st=nil) then
-             begin
-                { we have to compile the unit again, but it is already inserted !!}
-                { we may have problem with the lost symtable !! }
-                current_module:=hp;
-                { we must preserve the unit chain }
-                nextmodule:=pmodule(hp^.next);
-                { we have to cleanup a little }
-                hp^.special_done;
-                new(hs);
-                hs^:=hp^.mainsource^;
-                hp^.init(hs^,true);
-                dispose(hs);
-                { we must preserve the unit chain }
-                hp^.next:=nextmodule;
-                if assigned(hp^.ppufile) then
-                 load_ppu(old_current_module,hp,compile_system)
-                else
-                 begin
-{$ifdef UseBrowser}
-                    { here we need to remove the names ! }
-                    hp^.sourcefiles.done;
-                    hp^.sourcefiles.init;
-{$endif UseBrowser}
-                   if assigned(old_current_module^.current_inputfile) then
-                     old_current_module^.current_inputfile^.tempclose;
-                   Message1(parser_d_compiling_second_time,hp^.mainsource^);
-                   compile(hp^.mainsource^,compile_system);
-                   if (not old_current_module^.compiled) and assigned(old_current_module^.current_inputfile) then
-                     old_current_module^.current_inputfile^.tempreopen;
-                 end;
-                current_module^.compiled:=true;
-             end;
-         { set the old module }
-         current_module:=old_current_module;
-         { the current module uses the unit hp }
-         current_module^.used_units.concat(new(pused_unit,init(hp,0)));
-         pused_unit(current_module^.used_units.last)^.in_uses:=in_uses;
-         if in_uses and not current_module^.in_implementation then
-           pused_unit(current_module^.used_units.last)^.in_interface:=true;
-         loadunit:=hp;
-      end;
-
-{$endif OLDPPU}
-
 
     procedure loadsystemunit;
       var
@@ -628,17 +359,10 @@ unit pmodules;
         will be loaded }
         if not(cs_compilesystem in aktmoduleswitches) then
           begin
-{$ifndef OLDPPU}
             hp:=loadunit(upper(target_info.system_unit),true);
             systemunit:=hp^.symtable;
           { add to the used units }
             current_module^.used_units.concat(new(pused_unit,init(hp,true)));
-{$else OLDPPU}
-            hp:=loadunit(upper(target_info.system_unit),true,true);
-            systemunit:=hp^.symtable;
-          { add to the used units }
-            current_module^.used_units.concat(new(pused_unit,init(hp,0)));
-{$endif OLDPPU}
           { read default constant definitions }
             make_ref:=false;
             readconstdefs;
@@ -675,18 +399,13 @@ unit pmodules;
          repeat
            s:=pattern;
            consume(ID);
-{$ifndef OLDPPU}
            hp2:=loadunit(s,false);
          { the current module uses the unit hp2 }
            current_module^.used_units.concat(new(pused_unit,init(hp2,not current_module^.in_implementation)));
            pused_unit(current_module^.used_units.last)^.in_uses:=true;
-{$else OLDPPU}
-           hp2:=loadunit(s,false,true);
-{$endif OLDPPU}
            if current_module^.compiled then
              exit;
            refsymtable^.insert(new(punitsym,init(s,hp2^.symtable)));
-
            if token=COMMA then
             begin
               pattern:='';
@@ -773,7 +492,6 @@ unit pmodules;
          s1,s2  : ^string; {Saves stack space}
       begin
          consume(_UNIT);
-
          if token=ID then
           begin
           { create filenames and unit name }
@@ -1013,7 +731,6 @@ unit pmodules;
 
          { insert own objectfile }
          insertobjectfile;
-        
 
          {Write out the unit if the compile was succesfull.}
          if status.errorcount=0 then
@@ -1030,7 +747,6 @@ unit pmodules;
          { leave when we got an error }
          if status.errorcount>0 then
           exit;
-        
 
          { generate imports }
          if current_module^.uses_imports then
@@ -1038,7 +754,6 @@ unit pmodules;
 
          { finish asmlist by adding segment starts }
          insertsegment;
-        
 
          { assemble }
          create_objectfile;
@@ -1148,7 +863,6 @@ unit pmodules;
          { leave when we got an error }
          if status.errorcount>0 then
           exit;
-        
 
          { insert heap }
          insertheap;
@@ -1166,11 +880,9 @@ unit pmodules;
 
          { insert own objectfile }
          insertobjectfile;
-        
 
          { assemble and link }
          create_objectfile;
-                
 
          { create the executable when we are at level 1 }
          if (compile_level=1) then
@@ -1185,7 +897,10 @@ unit pmodules;
 end.
 {
   $Log$
-  Revision 1.40  1998-08-17 09:17:50  peter
+  Revision 1.41  1998-08-17 10:10:08  peter
+    - removed OLDPPU
+
+  Revision 1.40  1998/08/17 09:17:50  peter
     * static/shared linking updates
 
   Revision 1.39  1998/08/14 21:56:37  peter

+ 5 - 5
compiler/pstatmnt.pas

@@ -40,10 +40,7 @@ unit pstatmnt;
 
     uses
        cobjects,globals,files,verbose,systems,
-       symtable,aasm,pass_1,types,scanner,hcodegen
-{$ifndef OLDPPU}
-       ,ppu
-{$endif}
+       symtable,aasm,pass_1,types,scanner,hcodegen,ppu
        ,pbase,pexpr,pdecl
 {$ifdef i386}
        ,i386,tgeni386
@@ -1241,7 +1238,10 @@ unit pstatmnt;
 end.
 {
   $Log$
-  Revision 1.33  1998-08-12 19:39:30  peter
+  Revision 1.34  1998-08-17 10:10:09  peter
+    - removed OLDPPU
+
+  Revision 1.33  1998/08/12 19:39:30  peter
     * fixed some crashes
 
   Revision 1.32  1998/08/10 14:50:17  peter

+ 8 - 161
compiler/symdef.inc

@@ -389,35 +389,17 @@
 
     procedure tstringdef.write;
       begin
-{$ifdef OLDPPU}
-         case string_typ of
-            shortstring:
-              writebyte(ibstringdef);
-            longstring:
-              writebyte(iblongstringdef);
-            ansistring:
-              writebyte(ibansistringdef);
-            widestring:
-              writebyte(ibwidestringdef);
-         end;
-{$endif}
          tdef.write;
          if string_typ=st_shortstring then
            writebyte(len)
          else
            writelong(len);
-{$ifndef OLDPPU}
          case string_typ of
-            st_shortstring:
-              current_ppu^.writeentry(ibstringdef);
-            st_longstring:
-              current_ppu^.writeentry(iblongstringdef);
-            st_ansistring:
-              current_ppu^.writeentry(ibansistringdef);
-            st_widestring:
-              current_ppu^.writeentry(ibwidestringdef);
+          st_shortstring : current_ppu^.writeentry(ibstringdef);
+           st_longstring : current_ppu^.writeentry(iblongstringdef);
+           st_ansistring : current_ppu^.writeentry(ibansistringdef);
+           st_widestring : current_ppu^.writeentry(ibwidestringdef);
          end;
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -539,14 +521,9 @@
     procedure tenumdef.write;
 
       begin
-{$ifdef OLDPPU}
-         writebyte(ibenumdef);
-{$endif}
          tdef.write;
          writelong(max);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibenumdef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -701,16 +678,11 @@
 
     procedure torddef.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(iborddef);
-{$endif}
          tdef.write;
          writebyte(byte(typ));
          writelong(low);
          writelong(high);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(iborddef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -776,14 +748,9 @@
 
     procedure tfloatdef.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(ibfloatdef);
-{$endif}
          tdef.write;
          writebyte(byte(typ));
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibfloatdef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -906,16 +873,11 @@
 
     procedure tfiledef.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(ibfiledef);
-{$endif}
          tdef.write;
          writebyte(byte(filetype));
          if filetype=ft_typed then
            writedefref(typed_as);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibfiledef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -1029,14 +991,9 @@
 
     procedure tpointerdef.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(ibpointerdef);
-{$endif}
          tdef.write;
          writedefref(definition);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibpointerdef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -1115,14 +1072,9 @@
 
     procedure tclassrefdef.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(ibclassrefdef);
-{$endif}
          tdef.write;
          writedefref(definition);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibclassrefdef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -1190,17 +1142,12 @@
 
     procedure tsetdef.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(ibsetdef);
-{$endif}
          tdef.write;
          writedefref(setof);
          writebyte(byte(settype));
          if settype=varset then
            writelong(savesize);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibsetdef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -1257,13 +1204,8 @@
     procedure tformaldef.write;
 
       begin
-{$ifdef OLDPPU}
-         writebyte(ibformaldef);
-{$endif}
          tdef.write;
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibformaldef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -1340,17 +1282,12 @@
     procedure tarraydef.write;
 
       begin
-{$ifdef OLDPPU}
-         writebyte(ibarraydef);
-{$endif}
          tdef.write;
          writedefref(definition);
          writedefref(rangedef);
          writelong(lowrange);
          writelong(highrange);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibarraydef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -1499,14 +1436,9 @@
       begin
          oldread_member:=read_member;
          read_member:=true;
-{$ifdef OLDPPU}
-         writebyte(ibrecorddef);
-{$endif}
          tdef.write;
          writelong(savesize);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibrecorddef);
-{$endif}
          self.symtable^.writeasstruct;
          read_member:=oldread_member;
       end;
@@ -1889,7 +1821,6 @@
 
 {$ifdef UseBrowser}
 
-{$ifndef OLDPPU}
 
     procedure tprocdef.load_references;
       var
@@ -1928,78 +1859,6 @@
         lastwritten:=lastref;
       end;
 
-{$else OLDPPU}
-
-    procedure tprocdef.load_references;
-      var
-        pos : tfileposinfo;
-        b   : byte;
-      begin
-         b:=readbyte;
-         while b=ibref do
-           begin
-              readposinfo(pos);
-              inc(refcount);
-              lastref:=new(pref,init(lastref,@pos));
-              if refcount=1 then
-                defref:=lastref;
-              b:=readbyte;
-           end;
-          if b <> ibend then
-           Comment(V_fatal,'error in load_reference');
-      end;
-
-
-    procedure tprocdef.write_references;
-
-      var ref : pref;
-
-      begin
-      { references do not change the ppu caracteristics      }
-      { this only save the references to variables/functions }
-      { defined in the unit what about the others            }
-         ppufile.do_crc:=false;
-         if assigned(lastwritten) then
-           ref:=lastwritten
-         else
-           ref:=defref;
-         while assigned(ref) do
-           begin
-              writebyte(ibref);
-              writeposinfo(ref^.posinfo);
-              ref:=ref^.nextref;
-           end;
-         lastwritten:=lastref;
-         writebyte(ibend);
-         ppufile.do_crc:=true;
-      end;
-
-    procedure tprocdef.write_external_references;
-
-      var ref : pref;
-
-      begin
-         ppufile.do_crc:=false;
-         if lastwritten=lastref then exit;
-         writebyte(ibextdefref);
-         writedefref(@self);
-         if assigned(lastwritten) then
-           ref:=lastwritten
-         else
-           ref:=defref;
-         while assigned(ref) do
-           begin
-              writebyte(ibref);
-              writeposinfo(ref^.posinfo);
-              ref:=ref^.nextref;
-           end;
-         lastwritten:=lastref;
-         writebyte(ibend);
-         ppufile.do_crc:=false;
-      end;
-
-
-{$endif OLDPPU}
 
     procedure tprocdef.add_to_browserlog;
       begin
@@ -2033,9 +1892,6 @@
 
     procedure tprocdef.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(ibprocdef);
-{$endif}
          inherited write;
 {$ifdef i386}
          writebyte(usedregisters);
@@ -2070,9 +1926,7 @@
                writeptree(ptree(code));
                }
            end;
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibprocdef);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -2226,9 +2080,6 @@
 
     procedure tprocvardef.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(ibprocvardef);
-{$endif}
          { here we cannot get a real good value so just give something }
          { plausible (PM) }
 {$ifdef StoreFPULevel}
@@ -2238,9 +2089,7 @@
            fpu_used:=0;
 {$endif StoreFPULevel}
          inherited write;
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibprocvardef);
-{$endif}
       end;
 
     function tprocvardef.size : longint;
@@ -2482,17 +2331,12 @@
       begin
          oldread_member:=read_member;
          read_member:=true;
-{$ifdef OLDPPU}
-         writebyte(ibobjectdef);
-{$endif}
          tdef.write;
          writelong(size);
          writestring(name^);
          writedefref(childof);
          writelong(options);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibobjectdef);
-{$endif}
          if (options and (oo_hasprivate or oo_hasprotected))<>0 then
            object_options:=true;
          publicsyms^.writeasstruct;
@@ -2666,7 +2510,10 @@
 
 {
   $Log$
-  Revision 1.21  1998-08-10 14:50:28  peter
+  Revision 1.22  1998-08-17 10:10:10  peter
+    - removed OLDPPU
+
+  Revision 1.21  1998/08/10 14:50:28  peter
     + localswitches, moduleswitches, globalswitches splitting
 
   Revision 1.20  1998/07/18 22:54:30  florian

+ 4 - 270
compiler/symppu.inc

@@ -32,8 +32,6 @@
 {$ENDIF}
 
 
-{$ifndef OLDPPU}
-
 {*****************************************************************************
                                  PPU Writing
 *****************************************************************************}
@@ -364,9 +362,7 @@
                      hs:=temp+hs;
                      Source_Time:=GetNamedFileTime(hs);
                    end;
-
                 end
-
               else }
               hs:=current_module^.path^+hs;
               if Source_Time=-1 then
@@ -443,274 +439,12 @@
          until false;
       end;
 
-
-{$else OLDPPU}
-
-
-{*****************************************************************************
-
-                               Old PPU
-
-*****************************************************************************}
-
-    function readbyte : byte;
-
-      var
-         count : longint;
-         b : byte;
-
-      begin
-         current_module^.ppufile^.read_data(b,sizeof(byte),count);
-         readbyte:=b;
-         if count<>1 then
-           Message(unit_f_ppu_read_error);
-      end;
-
-    function readword : word;
-
-      var
-         count : longint;
-         w : word;
-
-      begin
-         current_module^.ppufile^.read_data(w,sizeof(word),count);
-         readword:=w;
-         if count<>sizeof(word) then
-           Message(unit_f_ppu_read_error);
-      end;
-
-    function readlong : longint;
-
-      var
-         count,l : longint;
-
-      begin
-         current_module^.ppufile^.read_data(l,sizeof(longint),count);
-         readlong:=l;
-         if count<>sizeof(longint) then
-           Message(unit_f_ppu_read_error);
-      end;
-
-    function readdouble : double;
-
-      var
-         count : longint;
-         d : double;
-
-      begin
-         current_module^.ppufile^.read_data(d,sizeof(double),count);
-         readdouble:=d;
-         if count<>sizeof(double) then
-           Message(unit_f_ppu_read_error);
-      end;
-
-    function readstring : string;
-
-      var
-         s : string;
-         count : longint;
-
-      begin
-         s[0]:=char(readbyte);
-         current_module^.ppufile^.read_data(s[1],ord(s[0]),count);
-         if count<>ord(s[0]) then
-           Message(unit_f_ppu_read_error);
-         readstring:=s;
-      end;
-
-{***SETCONST}
-    procedure readset(var s);   {You cannot pass an array [0..31] of byte.}
-
-    var count:longint;
-
-      begin
-         current_module^.ppufile^.read_data(s,32,count);
-         if count<>32 then
-           Message(unit_f_ppu_read_error);
-      end;
-{***}
-
-    procedure readposinfo(var p:tfileposinfo);
-      begin
-        p.fileindex:=readword;
-        p.line:=readlong;
-        p.column:=readword;
-      end;
-
-
-    function readdefref : pdef;
-      var
-         hd : pdef;
-      begin
-         longint(hd):=readword;
-         longint(hd):=longint(hd) or (longint(readword) shl 16);
-         readdefref:=hd;
-      end;
-
-{$ifdef UseBrowser}
-    function readsymref : psym;
-      var
-         hd : psym;
-      begin
-         longint(hd):=readword;
-         longint(hd):=longint(hd) or (longint(readword) shl 16);
-         readsymref:=hd;
-      end;
-{$endif UseBrowser}
-
-    procedure writebyte(b:byte);
-      begin
-        ppufile.write_data(b,1);
-      end;
-
-    procedure writeword(w:word);
-      begin
-        ppufile.write_data(w,2);
-      end;
-
-    procedure writelong(l:longint);
-      begin
-        ppufile.write_data(l,4);
-      end;
-
-    procedure writedouble(d:double);
-      begin
-        ppufile.write_data(d,sizeof(double));
-      end;
-
-    procedure writestring(s : string);
-      begin
-        ppufile.write_data(s,length(s)+1);
-      end;
-
-    procedure writeset(var s); {You cannot pass an array[0..31] of byte!}
-      begin
-        ppufile.write_data(s,32);
-      end;
-
-    procedure writecontainer(var p:tstringcontainer;id:byte;hold:boolean);
-      var
-        hcontainer : tstringcontainer;
-        s          : string;
-      begin
-        if hold then
-         hcontainer.init;
-        while not p.empty do
-         begin
-           writebyte(id);
-           s:=p.get;
-           writestring(s);
-           if hold then
-            hcontainer.insert(s);
-         end;
-        if hold then
-         p:=hcontainer;
-      end;
-
-
-    procedure writeposinfo(const p:tfileposinfo);
-      begin
-        writeword(p.fileindex);
-        writelong(p.line);
-        writeword(p.column);
-      end;
-
-    procedure writedefref(p : pdef);
-      begin
-        if p=nil then
-         writelong($ffffffff)
-        else
-         begin
-           if (p^.owner^.symtabletype in [recordsymtable,objectsymtable]) then
-            writeword($ffff)
-           else
-            writeword(p^.owner^.unitid);
-           writeword(p^.indexnb);
-         end;
-      end;
-
-    procedure writesymref(p : psym);
-      begin
-        if p=nil then
-         writelong($ffffffff)
-        else
-         begin
-           if (p^.owner^.symtabletype in [recordsymtable,objectsymtable]) then
-            writeword($ffff)
-           else
-            writeword(p^.owner^.unitid);
-           writeword(p^.indexnb);
-         end;
-      end;
-
-    procedure writeunitas(const s : string;unittable : punitsymtable);
-{$ifdef UseBrowser}
-      var
-         pus : punitsymtable;
-{$endif UseBrowser}
-      begin
-         Message1(unit_u_ppu_write,s);
-
-       { create unit flags }
-         with Current_Module^ do
-          begin
-            if cs_smartlink in aktswitches then
-             begin
-               flags:=flags or uf_smartlink;
-               if SplitName(ppufilename^)<>SplitName(libfilename^) then
-                 flags:=flags or uf_in_library;
-             end;
-            if use_dbx then
-             flags:=flags or uf_has_dbx;
-            if target_os.endian=en_big_endian then
-             flags:=flags or uf_big_endian;
-{$ifdef UseBrowser}
-            if use_browser then
-             flags:=flags or uf_uses_browser;
-{$endif UseBrowser}
-          end;
-
-       { open en init ppufile }
-         ppufile.init(s,ppubufsize);
-         ppufile.change_endian:=source_os.endian<>target_os.endian;
-         ppufile.rewrite;
-         if ioresult<>0 then
-          Message(unit_f_ppu_cannot_write);
-       { create and write header }
-         unitheader[8]:=char(byte(target_info.target));
-         unitheader[9]:=char(current_module^.flags);
-         ppufile.write_data(unitheader,sizeof(unitheader));
-         ppufile.clear_crc;
-         ppufile.do_crc:=true;
-         unittable^.writeasunit;
-         ppufile.flush;
-         ppufile.do_crc:=false;
-{$ifdef UseBrowser}
-         { write all new references to old unit elements }
-         pus:=punitsymtable(unittable^.next);
-         if use_browser then
-         while assigned(pus) do
-           begin
-              if pus^.symtabletype = unitsymtable then
-                pus^.write_external_references;
-              pus:=punitsymtable(pus^.next);
-           end;
-{$endif UseBrowser}
-         { writes the checksum }
-         ppufile.seek(10);
-         current_module^.crc:=ppufile.getcrc;
-         ppufile.write_data(current_module^.crc,4);
-         ppufile.flush;
-         ppufile.done;
-      end;
-
-
-
-{$endif OLDPPU}
-
 {
   $Log$
-  Revision 1.12  1998-08-17 09:17:53  peter
+  Revision 1.13  1998-08-17 10:10:11  peter
+    - removed OLDPPU
+
+  Revision 1.12  1998/08/17 09:17:53  peter
     * static/shared linking updates
 
   Revision 1.11  1998/08/16 20:32:49  peter

+ 6 - 135
compiler/symsym.inc

@@ -73,8 +73,6 @@
 
 {$ifdef UseBrowser}
 
-{$ifndef OLDPPU}
-
     procedure tsym.load_references;
       var
         pos : tfileposinfo;
@@ -124,94 +122,6 @@
          end;
       end;
 
-{$else OLDPPU}
-
-    procedure tsym.load_references;
-
-      var fileindex : word;
-          b : byte;
-          l,c : longint;
-
-      begin
-         b:=readbyte;
-         while b=ibref do
-           begin
-              fileindex:=readword;
-              l:=readlong;
-              c:=readword;
-              inc(refcount);
-              lastref:=new(pref,load(lastref,fileindex,l,c));
-              if refcount=1 then defref:=lastref;
-              b:=readbyte;
-           end;
-         lastwritten:=lastref;
-         if b <> ibend then
-          Message(unit_f_ppu_read_error);
-      end;
-
-    procedure tsym.write_references;
-
-      var ref : pref;
-
-      begin
-      { references do not change the ppu caracteristics      }
-      { this only save the references to variables/functions }
-      { defined in the unit what about the others            }
-         ppufile.do_crc:=false;
-         if assigned(lastwritten) then
-           ref:=lastwritten
-         else
-           ref:=defref;
-         while assigned(ref) do
-           begin
-              writebyte(ibref);
-              writeword(ref^.posinfo.fileindex);
-              writelong(ref^.posinfo.line);
-              writeword(ref^.posinfo.column);
-              ref:=ref^.nextref;
-           end;
-         lastwritten:=lastref;
-         writebyte(ibend);
-         ppufile.do_crc:=true;
-      end;
-
-
-    procedure tsym.write_external_references;
-      var ref : pref;
-          prdef : pdef;
-      begin
-         ppufile.do_crc:=false;
-         if lastwritten=lastref then
-           exit;
-         writebyte(ibextsymref);
-         writesymref(@self);
-         if assigned(lastwritten) then
-           ref:=lastwritten
-         else
-           ref:=defref;
-         while assigned(ref) do
-           begin
-              writebyte(ibref);
-              writeword(ref^.posinfo.fileindex);
-              writelong(ref^.posinfo.line);
-              writeword(ref^.posinfo.column);
-              ref:=ref^.nextref;
-           end;
-         lastwritten:=lastref;
-         writebyte(ibend);
-         if typ=procsym then
-           begin
-              prdef:=pprocsym(@self)^.definition;
-              while assigned(prdef) do
-                begin
-                   pprocdef(prdef)^.write_external_references;
-                   prdef:=pprocdef(prdef)^.nextoverloaded;
-                end;
-           end;
-         ppufile.do_crc:=true;
-      end;
-
-{$endif OLDPPU}
 
     procedure tsym.add_to_browserlog;
       var
@@ -509,14 +419,9 @@
 
     procedure tprocsym.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(ibprocsym);
-{$endif}
          tsym.write;
          writedefref(pdef(definition));
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibprocsym);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -656,9 +561,6 @@
     procedure tpropertysym.write;
 
       begin
-{$ifdef OLDPPU}
-         writebyte(ibpropertysym);
-{$endif}
          tsym.write;
          writedefref(proptype);
          writelong(options);
@@ -673,9 +575,7 @@
            writestring('');
          writedefref(readaccessdef);
          writedefref(writeaccessdef);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibpropertysym);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -742,9 +642,6 @@
     procedure tabsolutesym.write;
 
       begin
-{$ifdef OLDPPU}
-         writebyte(ibabsolutesym);
-{$endif}
          tsym.write;
          writebyte(byte(varspez));
          if read_member then
@@ -756,9 +653,7 @@
            toasm : writestring(asmname^);
           toaddr : writelong(address);
          end;
-{$ifndef OLDPPU}
         current_ppu^.writeentry(ibabsolutesym);
-{$endif}
       end;
 
     procedure tabsolutesym.deref;
@@ -883,12 +778,6 @@
     procedure tvarsym.write;
 
       begin
-{$ifdef OLDPPU}
-         if (var_options and vo_is_C_var)<>0 then
-           writebyte(ibvarsym_C)
-         else
-           writebyte(ibvarsym);
-{$endif}
          tsym.write;
          writebyte(byte(varspez));
 
@@ -901,14 +790,13 @@
               writebyte(var_options);
               writestring(mangledname);
            end;
-{$ifndef OLDPPU}
          if (var_options and vo_is_C_var)<>0 then
            current_ppu^.writeentry(ibvarsym_C)
          else
-         current_ppu^.writeentry(ibvarsym);
-{$endif}
+           current_ppu^.writeentry(ibvarsym);
       end;
 
+
     function tvarsym.mangledname : string;
       var
         prefix : string;
@@ -1254,15 +1142,10 @@
     procedure ttypedconstsym.write;
 
       begin
-{$ifdef OLDPPU}
-         writebyte(ibtypedconstsym);
-{$endif}
          tsym.write;
          writedefref(definition);
          writestring(prefix^);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibtypedconstsym);
-{$endif}
       end;
 
       { for most symbol types ther is nothing to do at all }
@@ -1394,9 +1277,6 @@
 
     procedure tconstsym.write;
       begin
-{$ifdef OLDPPU}
-         writebyte(ibconstsym);
-{$endif}
          tsym.write;
          writebyte(byte(consttype));
          case consttype of
@@ -1416,9 +1296,7 @@
          else
            internalerror(13);
          end;
-{$ifndef OLDPPU}
         current_ppu^.writeentry(ibconstsym);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -1521,15 +1399,10 @@
     procedure tenumsym.write;
 
       begin
-{$ifdef OLDPPU}
-         writebyte(ibenumsym);
-{$endif}
          tsym.write;
          writedefref(definition);
          writelong(value);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibenumsym);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -1598,14 +1471,9 @@
     procedure ttypesym.write;
 
       begin
-{$ifdef OLDPPU}
-         writebyte(ibtypesym);
-{$endif}
          tsym.write;
          writedefref(definition);
-{$ifndef OLDPPU}
          current_ppu^.writeentry(ibtypesym);
-{$endif}
       end;
 
 {$ifdef GDB}
@@ -1676,7 +1544,10 @@
 
 {
   $Log$
-  Revision 1.30  1998-08-13 10:57:29  peter
+  Revision 1.31  1998-08-17 10:10:12  peter
+    - removed OLDPPU
+
+  Revision 1.30  1998/08/13 10:57:29  peter
     * constant sets are now written correctly to the ppufile
 
   Revision 1.29  1998/08/11 15:31:42  peter