Browse Source

* renamed current_library to objectlibrary

peter 23 years ago
parent
commit
425bb45ddc
51 changed files with 545 additions and 392 deletions
  1. 5 2
      compiler/aasmbase.pas
  2. 14 11
      compiler/aasmtai.pas
  3. 30 27
      compiler/assemble.pas
  4. 9 6
      compiler/cg64f32.pas
  5. 6 3
      compiler/cgbase.pas
  6. 6 3
      compiler/cgobj.pas
  7. 6 3
      compiler/cresstr.pas
  8. 5 2
      compiler/i386/ag386int.pas
  9. 5 2
      compiler/i386/ag386nsm.pas
  10. 12 9
      compiler/i386/n386add.pas
  11. 18 15
      compiler/i386/n386cal.pas
  12. 11 8
      compiler/i386/n386cnv.pas
  13. 30 27
      compiler/i386/n386flw.pas
  14. 11 8
      compiler/i386/n386mat.pas
  15. 7 4
      compiler/i386/n386mem.pas
  16. 5 2
      compiler/i386/n386obj.pas
  17. 5 2
      compiler/i386/n386opt.pas
  18. 15 12
      compiler/i386/n386set.pas
  19. 5 2
      compiler/i386/popt386.pas
  20. 6 3
      compiler/i386/ra386att.pas
  21. 6 3
      compiler/i386/ra386int.pas
  22. 6 3
      compiler/m68k/rasm.pas
  23. 8 5
      compiler/ncgbas.pas
  24. 18 15
      compiler/ncgcal.pas
  25. 11 8
      compiler/ncgcnv.pas
  26. 12 9
      compiler/ncgcon.pas
  27. 41 38
      compiler/ncgflw.pas
  28. 9 6
      compiler/ncginl.pas
  29. 18 15
      compiler/ncgld.pas
  30. 10 7
      compiler/ncgmem.pas
  31. 12 9
      compiler/ncgset.pas
  32. 16 13
      compiler/ncgutil.pas
  33. 14 11
      compiler/nobj.pas
  34. 6 3
      compiler/pdecl.pas
  35. 5 2
      compiler/pdecsub.pas
  36. 17 14
      compiler/powerpc/cgcpu.pas
  37. 10 7
      compiler/powerpc/nppcadd.pas
  38. 6 3
      compiler/pstatmnt.pas
  39. 8 5
      compiler/psub.pas
  40. 9 6
      compiler/ptconst.pas
  41. 10 7
      compiler/rautils.pas
  42. 10 7
      compiler/symdef.pas
  43. 6 3
      compiler/symppu.pas
  44. 5 2
      compiler/symsym.pas
  45. 5 2
      compiler/targets/t_beos.pas
  46. 5 2
      compiler/targets/t_fbsd.pas
  47. 5 2
      compiler/targets/t_linux.pas
  48. 5 2
      compiler/targets/t_nwm.pas
  49. 5 2
      compiler/targets/t_sunos.pas
  50. 25 22
      compiler/targets/t_win32.pas
  51. 11 8
      compiler/x86/cgx86.pas

+ 5 - 2
compiler/aasmbase.pas

@@ -205,7 +205,7 @@ interface
 
 
     var
-      current_library : tasmlibrarydata;
+      objectlibrary : tasmlibrarydata;
 
 
 implementation
@@ -839,7 +839,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.4  2002-08-11 13:24:10  peter
+  Revision 1.5  2002-08-11 14:32:25  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.4  2002/08/11 13:24:10  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 14 - 11
compiler/aasmtai.pas

@@ -361,7 +361,7 @@ uses
       begin
          inherited Create;
          typ:=ait_datablock;
-         sym:=current_library.newasmsymboltype(_name,AB_LOCAL,AT_DATA);
+         sym:=objectlibrary.newasmsymboltype(_name,AB_LOCAL,AT_DATA);
          { keep things aligned }
          if _size<=0 then
            _size:=4;
@@ -374,7 +374,7 @@ uses
       begin
          inherited Create;
          typ:=ait_datablock;
-         sym:=current_library.newasmsymboltype(_name,AB_GLOBAL,AT_DATA);
+         sym:=objectlibrary.newasmsymboltype(_name,AB_GLOBAL,AT_DATA);
          { keep things aligned }
          if _size<=0 then
            _size:=4;
@@ -400,7 +400,7 @@ uses
       begin
          inherited Create;
          typ:=ait_symbol;
-         sym:=current_library.newasmsymboltype(_name,AB_LOCAL,AT_FUNCTION);
+         sym:=objectlibrary.newasmsymboltype(_name,AB_LOCAL,AT_FUNCTION);
          size:=siz;
          is_global:=false;
       end;
@@ -409,7 +409,7 @@ uses
       begin
          inherited Create;
          typ:=ait_symbol;
-         sym:=current_library.newasmsymboltype(_name,AB_GLOBAL,AT_FUNCTION);
+         sym:=objectlibrary.newasmsymboltype(_name,AB_GLOBAL,AT_FUNCTION);
          size:=siz;
          is_global:=true;
       end;
@@ -418,7 +418,7 @@ uses
       begin
          inherited Create;
          typ:=ait_symbol;
-         sym:=current_library.newasmsymboltype(_name,AB_LOCAL,AT_DATA);
+         sym:=objectlibrary.newasmsymboltype(_name,AB_LOCAL,AT_DATA);
          size:=siz;
          is_global:=false;
       end;
@@ -427,7 +427,7 @@ uses
       begin
          inherited Create;
          typ:=ait_symbol;
-         sym:=current_library.newasmsymboltype(_name,AB_GLOBAL,AT_DATA);
+         sym:=objectlibrary.newasmsymboltype(_name,AB_GLOBAL,AT_DATA);
          size:=siz;
          is_global:=true;
       end;
@@ -448,7 +448,7 @@ uses
       begin
          inherited Create;
          typ:=ait_symbol_end;
-         sym:=current_library.newasmsymboltype(_name,AB_GLOBAL,AT_NONE);
+         sym:=objectlibrary.newasmsymboltype(_name,AB_GLOBAL,AT_NONE);
       end;
 
 
@@ -519,7 +519,7 @@ uses
       begin
          inherited Create;
          typ:=ait_const_symbol;
-         sym:=current_library.newasmsymbol(name);
+         sym:=objectlibrary.newasmsymbol(name);
          offset:=0;
          { update sym info }
          inc(sym.refs);
@@ -529,7 +529,7 @@ uses
       begin
          inherited Create;
          typ:=ait_const_symbol;
-         sym:=current_library.newasmsymbol(name);
+         sym:=objectlibrary.newasmsymbol(name);
          offset:=ofs;
          { update sym info }
          inc(sym.refs);
@@ -539,7 +539,7 @@ uses
       begin
          inherited Create;
          typ:=ait_const_rva;
-         sym:=current_library.newasmsymbol(name);
+         sym:=objectlibrary.newasmsymbol(name);
          offset:=0;
          { update sym info }
          inc(sym.refs);
@@ -983,7 +983,10 @@ uses
 end.
 {
   $Log$
-  Revision 1.3  2002-08-11 13:24:10  peter
+  Revision 1.4  2002-08-11 14:32:25  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.3  2002/08/11 13:24:10  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 30 - 27
compiler/assemble.pas

@@ -710,7 +710,7 @@ Implementation
                 { the symbol can be external
                   so we must use newasmsymbol and
                   not getasmsymbol !! PM }
-                ps:=current_library.newasmsymbol(copy(s,1,j-1));
+                ps:=objectlibrary.newasmsymbol(copy(s,1,j-1));
                 if not assigned(ps) then
                   internalerror(33006)
                 else
@@ -718,7 +718,7 @@ Implementation
                     sec:=ps.section;
                     ofs:=ps.address;
                     reloc:=true;
-                    current_library.UsedAsmSymbolListInsert(ps);
+                    objectlibrary.UsedAsmSymbolListInsert(ps);
                   end;
                 if j<256 then
                   begin
@@ -732,7 +732,7 @@ Implementation
                          i:=i+j;
                          s:=strpas(@p[i]);
                       end;
-                    ps:=current_library.getasmsymbol(s);
+                    ps:=objectlibrary.getasmsymbol(s);
                     if not assigned(ps) then
                       internalerror(33007)
                     else
@@ -741,7 +741,7 @@ Implementation
                           internalerror(33008);
                         ofs:=ofs-ps.address;
                         reloc:=false;
-                        current_library.UsedAsmSymbolListInsert(ps);
+                        objectlibrary.UsedAsmSymbolListInsert(ps);
                       end;
                   end;
               end;
@@ -817,11 +817,11 @@ Implementation
            else
             curr_n:=n_includefile;
            { get symbol for this includefile }
-           hp:=current_library.newasmsymboltype('Ltext'+ToStr(IncludeCount),AB_LOCAL,AT_FUNCTION);
+           hp:=objectlibrary.newasmsymboltype('Ltext'+ToStr(IncludeCount),AB_LOCAL,AT_FUNCTION);
            if currpass=1 then
              begin
                 hp.setaddress(currpass,objectalloc.currsec,objectalloc.sectionsize,0);
-                current_library.UsedAsmSymbolListInsert(hp);
+                objectlibrary.UsedAsmSymbolListInsert(hp);
              end
            else
              objectdata.writesymbol(hp);
@@ -865,11 +865,11 @@ Implementation
            exit;
         store_sec:=objectalloc.currsec;
         objectalloc.seTSection(sec_code);
-        hp:=current_library.newasmsymboltype('Letext',AB_LOCAL,AT_FUNCTION);
+        hp:=objectlibrary.newasmsymboltype('Letext',AB_LOCAL,AT_FUNCTION);
         if currpass=1 then
           begin
             hp.setaddress(currpass,objectalloc.currsec,objectalloc.sectionsize,0);
-            current_library.UsedAsmSymbolListInsert(hp);
+            objectlibrary.UsedAsmSymbolListInsert(hp);
           end
         else
           objectdata.writesymbol(hp);
@@ -1046,7 +1046,7 @@ Implementation
                      Tai_datablock(hp).sym.setaddress(currpass,objectalloc.currsec,objectalloc.sectionsize,Tai_datablock(hp).size);
                      objectalloc.sectionalloc(Tai_datablock(hp).size);
                    end;
-                 current_library.UsedAsmSymbolListInsert(Tai_datablock(hp).sym);
+                 objectlibrary.UsedAsmSymbolListInsert(Tai_datablock(hp).sym);
                end;
              ait_const_32bit :
                objectalloc.sectionalloc(4);
@@ -1066,7 +1066,7 @@ Implementation
              ait_const_symbol :
                begin
                  objectalloc.sectionalloc(4);
-                 current_library.UsedAsmSymbolListInsert(Tai_const_symbol(hp).sym);
+                 objectlibrary.UsedAsmSymbolListInsert(Tai_const_symbol(hp).sym);
                end;
              ait_section:
                begin
@@ -1091,8 +1091,8 @@ Implementation
                begin
                  if assigned(Tai_stab_function_name(hp).str) then
                   begin
-                    funcname:=current_library.getasmsymbol(strpas(Tai_stab_function_name(hp).str));
-                    current_library.UsedAsmSymbolListInsert(funcname);
+                    funcname:=objectlibrary.getasmsymbol(strpas(Tai_stab_function_name(hp).str));
+                    objectlibrary.UsedAsmSymbolListInsert(funcname);
                   end
                  else
                   funcname:=nil;
@@ -1103,20 +1103,20 @@ Implementation
              ait_symbol :
                begin
                  Tai_symbol(hp).sym.setaddress(currpass,objectalloc.currsec,objectalloc.sectionsize,0);
-                 current_library.UsedAsmSymbolListInsert(Tai_symbol(hp).sym);
+                 objectlibrary.UsedAsmSymbolListInsert(Tai_symbol(hp).sym);
                end;
              ait_symbol_end :
                begin
                  if target_info.system in [system_i386_linux,system_i386_beos] then
                   begin
                     Tai_symbol_end(hp).sym.size:=objectalloc.sectionsize-Tai_symbol_end(hp).sym.address;
-                    current_library.UsedAsmSymbolListInsert(Tai_symbol_end(hp).sym);
+                    objectlibrary.UsedAsmSymbolListInsert(Tai_symbol_end(hp).sym);
                   end;
                 end;
              ait_label :
                begin
                  Tai_label(hp).l.setaddress(currpass,objectalloc.currsec,objectalloc.sectionsize,0);
-                 current_library.UsedAsmSymbolListInsert(Tai_label(hp).l);
+                 objectlibrary.UsedAsmSymbolListInsert(Tai_label(hp).l);
                end;
              ait_string :
                objectalloc.sectionalloc(Tai_string(hp).len);
@@ -1134,11 +1134,11 @@ Implementation
                          top_ref :
                            begin
                              if assigned(ref^.symbol) then
-                              current_library.UsedAsmSymbolListInsert(ref^.symbol);
+                              objectlibrary.UsedAsmSymbolListInsert(ref^.symbol);
                            end;
                          top_symbol :
                            begin
-                             current_library.UsedAsmSymbolListInsert(sym);
+                             objectlibrary.UsedAsmSymbolListInsert(sym);
                            end;
                        end;
                      end;
@@ -1274,7 +1274,7 @@ Implementation
                convertstabs(Tai_stabs(hp).str);
              ait_stab_function_name :
                if assigned(Tai_stab_function_name(hp).str) then
-                 funcname:=current_library.getasmsymbol(strpas(Tai_stab_function_name(hp).str))
+                 funcname:=objectlibrary.getasmsymbol(strpas(Tai_stab_function_name(hp).str))
                else
                  funcname:=nil;
              ait_force_line :
@@ -1302,7 +1302,7 @@ Implementation
         objectdata:=objectoutput.newobjectdata(Objfile);
         objectdata.defaulTSection(sec_code);
         { reset the asmsymbol list }
-        current_library.CreateUsedAsmsymbolList;
+        objectlibrary.CreateUsedAsmsymbolList;
 
 {$ifdef MULTIPASS}
       { Pass 0 }
@@ -1342,7 +1342,7 @@ Implementation
         EndFileLineInfo;
 {$endif GDB}
         { check for undefined labels and reset }
-        current_library.UsedAsmSymbolListCheckUndefined;
+        objectlibrary.UsedAsmSymbolListCheckUndefined;
 
         { set section sizes }
         objectdata.seTSectionsizes(objectalloc.secsize);
@@ -1381,8 +1381,8 @@ Implementation
       doexit:
         { reset the used symbols back, must be after the .o has been
           written }
-        current_library.UsedAsmsymbolListReset;
-        current_library.DestroyUsedAsmsymbolList;
+        objectlibrary.UsedAsmsymbolListReset;
+        objectlibrary.DestroyUsedAsmsymbolList;
       end;
 
 
@@ -1407,7 +1407,7 @@ Implementation
         while assigned(hp) do
          begin
          { reset the asmsymbol list }
-           current_library.CreateUsedAsmSymbolList;
+           objectlibrary.CreateUsedAsmSymbolList;
 
 {$ifdef MULTIPASS}
          { Pass 0 }
@@ -1432,7 +1432,7 @@ Implementation
            EndFileLineInfo;
 {$endif GDB}
            { check for undefined labels }
-           current_Library.UsedAsmSymbolListCheckUndefined;
+           objectlibrary.UsedAsmSymbolListCheckUndefined;
 
            { set section sizes }
            objectdata.seTSectionsizes(objectalloc.secsize);
@@ -1462,8 +1462,8 @@ Implementation
 
            { reset the used symbols back, must be after the .o has been
              written }
-           current_library.UsedAsmsymbolListReset;
-           current_library.DestroyUsedAsmsymbolList;
+           objectlibrary.UsedAsmsymbolListReset;
+           objectlibrary.DestroyUsedAsmsymbolList;
 
            { end of lists? }
            if not MaybeNextList(hp) then
@@ -1598,7 +1598,10 @@ Implementation
 end.
 {
   $Log$
-  Revision 1.40  2002-08-11 13:24:10  peter
+  Revision 1.41  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.40  2002/08/11 13:24:10  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 9 - 6
compiler/cg64f32.pas

@@ -486,7 +486,7 @@ unit cg64f32;
                  got_scratch := true;
                  a_load64high_ref_reg(list,p.location.reference,hreg);
                end;
-             current_library.getlabel(poslabel);
+             objectlibrary.getlabel(poslabel);
 
              { check high dword, must be 0 (for positive numbers) }
              cg.a_cmp_const_reg_label(list,OS_32,OC_EQ,0,hreg,poslabel);
@@ -494,7 +494,7 @@ unit cg64f32;
              { It can also be $ffffffff, but only for negative numbers }
              if from_signed and to_signed then
                begin
-                 current_library.getlabel(neglabel);
+                 objectlibrary.getlabel(neglabel);
                  cg.a_cmp_const_reg_label(list,OS_32,OC_EQ,aword(-1),hreg,neglabel);
                end;
              { !!! freeing of register should happen directly after compare! (JM) }
@@ -518,7 +518,7 @@ unit cg64f32;
 
              if from_signed and to_signed then
                begin
-                 current_library.getlabel(endlabel);
+                 objectlibrary.getlabel(endlabel);
                  cg.a_jmp_always(list,endlabel);
                  { if the high dword = $ffffffff, then the low dword (when }
                  { considered as a longint) must be < 0                    }
@@ -535,7 +535,7 @@ unit cg64f32;
                      a_load64low_ref_reg(list,p.location.reference,hreg);
                    end;
                  { get a new neglabel (JM) }
-                 current_library.getlabel(neglabel);
+                 objectlibrary.getlabel(neglabel);
                  cg.a_cmp_const_reg_label(list,OS_32,OC_LT,0,hreg,neglabel);
                  { !!! freeing of register should happen directly after compare! (JM) }
                  if got_scratch then
@@ -593,7 +593,7 @@ unit cg64f32;
                    else
                      cg.a_load_ref_reg(list,opsize,p.location.reference,hreg);
                  end;
-               current_library.getlabel(poslabel);
+               objectlibrary.getlabel(poslabel);
                cg.a_cmp_const_reg_label(list,opsize,OC_GTE,0,hreg,poslabel);
 
                { !!! freeing of register should happen directly after compare! (JM) }
@@ -617,7 +617,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.23  2002-08-11 13:24:11  peter
+  Revision 1.24  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.23  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 6 - 3
compiler/cgbase.pas

@@ -436,7 +436,7 @@ implementation
          { resourcestrings }
          ResourceStrings:=TResourceStrings.Create;
          { use the librarydata from current_module }
-         current_library:=current_module.librarydata;
+         objectlibrary:=current_module.librarydata;
       end;
 
 
@@ -470,7 +470,7 @@ implementation
 {$endif}
          { resource strings }
          ResourceStrings.free;
-         current_library:=nil;
+         objectlibrary:=nil;
       end;
 
 
@@ -582,7 +582,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.23  2002-08-11 13:24:11  peter
+  Revision 1.24  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.23  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 6 - 3
compiler/cgobj.pas

@@ -1204,7 +1204,7 @@ unit cgobj;
               p.location.reference,hreg);
             a_op_const_reg(list,OP_SUB,aword(lto),hreg);
           end;
-        current_library.getlabel(neglabel);
+        objectlibrary.getlabel(neglabel);
         a_cmp_const_reg_label(list,OS_INT,OC_BE,aword(hto-lto),hreg,neglabel);
         { !!! should happen right after the compare (JM) }
         free_scratch_reg(list,hreg);
@@ -1339,7 +1339,7 @@ unit cgobj;
            { must the object be finalized ? }
            if procinfo^._class.needs_inittable then
             begin
-              current_library.getlabel(nofinal);
+              objectlibrary.getlabel(nofinal);
               reference_reset_base(href,procinfo^.framepointer,target_info.first_parm_offset);
               a_cmp_const_ref_label(list,OS_ADDR,OC_EQ,0,href,nofinal);
               reference_reset_base(href,SELF_POINTER_REG,0);
@@ -1470,7 +1470,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.46  2002-08-11 13:24:11  peter
+  Revision 1.47  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.46  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 6 - 3
compiler/cresstr.pas

@@ -154,7 +154,7 @@ procedure TResourceStrings.CreateResourceStringList;
          resourcestringlist.concat(tai_const.create_32bit(0))
        else
          begin
-            current_library.getdatalabel(l1);
+            objectlibrary.getdatalabel(l1);
             resourcestringlist.concat(tai_const_symbol.create(l1));
             consts.concat(tai_const.create_32bit(len));
             consts.concat(tai_const.create_32bit(len));
@@ -170,7 +170,7 @@ procedure TResourceStrings.CreateResourceStringList;
        resourcestringlist.concat(tai_const.create_32bit(0));
        resourcestringlist.concat(tai_const.create_32bit(hash));
        { Append the name as a ansistring. }
-       current_library.getdatalabel(l1);
+       objectlibrary.getdatalabel(l1);
        L:=Length(Name);
        resourcestringlist.concat(tai_const_symbol.create(l1));
        consts.concat(tai_const.create_32bit(l));
@@ -294,7 +294,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.15  2002-08-11 13:24:11  peter
+  Revision 1.16  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.15  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/i386/ag386int.pas

@@ -708,7 +708,7 @@ ait_stab_function_name : ;
     procedure T386IntelAssembler.WriteExternals;
       begin
         currentasmlist:=self;
-        current_library.symbolsearch.foreach_static({$ifdef fpcprocvar}@{$endif}writeexternal,nil);
+        objectlibrary.symbolsearch.foreach_static({$ifdef fpcprocvar}@{$endif}writeexternal,nil);
       end;
 
 
@@ -823,7 +823,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.24  2002-08-11 13:24:16  peter
+  Revision 1.25  2002-08-11 14:32:29  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.24  2002/08/11 13:24:16  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/i386/ag386nsm.pas

@@ -738,7 +738,7 @@ interface
     procedure T386NasmAssembler.WriteExternals;
       begin
         currentasmlist:=self;
-        current_library.symbolsearch.foreach_static({$ifdef fpcprocvar}@{$endif}writeexternal,nil);
+        objectlibrary.symbolsearch.foreach_static({$ifdef fpcprocvar}@{$endif}writeexternal,nil);
       end;
 
 
@@ -898,7 +898,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.23  2002-08-11 13:24:16  peter
+  Revision 1.24  2002-08-11 14:32:29  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.23  2002/08/11 13:24:16  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 12 - 9
compiler/i386/n386add.pas

@@ -289,7 +289,7 @@ interface
          begin
            if cs_check_overflow in aktlocalswitches  then
             begin
-              current_library.getlabel(hl4);
+              objectlibrary.getlabel(hl4);
               if unsigned then
                emitjmp(C_NB,hl4)
               else
@@ -457,9 +457,9 @@ interface
             if isjump then
               begin
                  otl:=truelabel;
-                 current_library.getlabel(truelabel);
+                 objectlibrary.getlabel(truelabel);
                  ofl:=falselabel;
-                 current_library.getlabel(falselabel);
+                 objectlibrary.getlabel(falselabel);
               end;
             secondpass(left);
             if left.location.loc in [LOC_FLAGS,LOC_JUMP] then
@@ -475,9 +475,9 @@ interface
             if isjump then
               begin
                  otl:=truelabel;
-                 current_library.getlabel(truelabel);
+                 objectlibrary.getlabel(truelabel);
                  ofl:=falselabel;
-                 current_library.getlabel(falselabel);
+                 objectlibrary.getlabel(falselabel);
               end;
             secondpass(right);
             maybe_restore(exprasmlist,left.location,pushedregs);
@@ -529,7 +529,7 @@ interface
                    andn :
                      begin
                         otl:=truelabel;
-                        current_library.getlabel(truelabel);
+                        objectlibrary.getlabel(truelabel);
                         secondpass(left);
                         maketojumpbool(exprasmlist,left,lr_load_regvars);
                         cg.a_label(exprasmlist,truelabel);
@@ -538,7 +538,7 @@ interface
                    orn :
                      begin
                         ofl:=falselabel;
-                        current_library.getlabel(falselabel);
+                        objectlibrary.getlabel(falselabel);
                         secondpass(left);
                         maketojumpbool(exprasmlist,left,lr_load_regvars);
                         cg.a_label(exprasmlist,falselabel);
@@ -1086,7 +1086,7 @@ interface
          begin
            if cs_check_overflow in aktlocalswitches  then
             begin
-              current_library.getlabel(hl4);
+              objectlibrary.getlabel(hl4);
               if unsigned then
                emitjmp(C_NB,hl4)
               else
@@ -1551,7 +1551,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.46  2002-08-11 13:24:16  peter
+  Revision 1.47  2002-08-11 14:32:29  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.46  2002/08/11 13:24:16  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 18 - 15
compiler/i386/n386cal.pas

@@ -111,8 +111,8 @@ implementation
 
          otlabel:=truelabel;
          oflabel:=falselabel;
-         current_library.getlabel(truelabel);
-         current_library.getlabel(falselabel);
+         objectlibrary.getlabel(truelabel);
+         objectlibrary.getlabel(falselabel);
          secondpass(left);
          { handle varargs first, because defcoll is not valid }
          if (nf_varargs_para in flags) then
@@ -395,7 +395,7 @@ implementation
                  (po_iocheck in procdefinition.procoptions) and
                  not(po_iocheck in aktprocdef.procoptions) then
                 begin
-                   current_library.getaddrlabel(iolabel);
+                   objectlibrary.getaddrlabel(iolabel);
                    cg.a_label(exprasmlist,iolabel);
                 end
               else
@@ -626,7 +626,7 @@ implementation
                                            cg.a_load_const_reg(exprasmlist,OS_ADDR,0,self_pointer_reg)
                                          else
                                            begin
-                                             reference_reset_symbol(href,current_library.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
+                                             reference_reset_symbol(href,objectlibrary.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
                                              cg.a_loadaddr_ref_reg(exprasmlist,href,self_pointer_reg);
                                            end;
                                          { emit_reg(A_PUSH,S_L,R_ESI);
@@ -683,7 +683,7 @@ implementation
                                     cg.a_load_const_reg(exprasmlist,OS_ADDR,0,self_pointer_reg);
                                     cg.a_param_reg(exprasmlist,OS_ADDR,self_pointer_reg,paramanager.getintparaloc(2));
                                     { insert the vmt }
-                                    reference_reset_symbol(href,current_library.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
+                                    reference_reset_symbol(href,objectlibrary.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
                                     cg.a_paramaddr_ref(exprasmlist,href,paramanager.getintparaloc(1));
                                     extended_new:=true;
                                  end;
@@ -697,7 +697,7 @@ implementation
                                     emit_ref_reg(A_LEA,S_L,methodpointer.location.reference,R_ESI);
                                     reference_release(exprasmlist,methodpointer.location.reference);
                                     cg.a_param_reg(exprasmlist,OS_ADDR,self_pointer_reg,paramanager.getintparaloc(2));
-                                    reference_reset_symbol(href,current_library.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
+                                    reference_reset_symbol(href,objectlibrary.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
                                     cg.a_paramaddr_ref(exprasmlist,href,paramanager.getintparaloc(1));
                                  end;
                                else
@@ -769,7 +769,7 @@ implementation
                                               if (procdefinition.proctypeoption=potype_constructor) then
                                                 begin
                                                   { it's no bad idea, to insert the VMT }
-                                                  reference_reset_symbol(href,current_library.newasmsymbol(
+                                                  reference_reset_symbol(href,objectlibrary.newasmsymbol(
                                                      tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
                                                   cg.a_paramaddr_ref(exprasmlist,href,paramanager.getintparaloc(1));
                                                 end
@@ -825,7 +825,7 @@ implementation
                                   if (procdefinition.proctypeoption=potype_constructor) then
                                     begin
                                       { it's no bad idea, to insert the VMT }
-                                      reference_reset_symbol(href,current_library.newasmsymbol(procinfo^._class.vmt_mangledname),0);
+                                      reference_reset_symbol(href,objectlibrary.newasmsymbol(procinfo^._class.vmt_mangledname),0);
                                       cg.a_paramaddr_ref(exprasmlist,href,paramanager.getintparaloc(1));
                                     end
                                   { destructors haven't to dispose the instance, if this is }
@@ -956,7 +956,7 @@ implementation
                      begin
                         if (cs_check_object in aktlocalswitches) then
                           begin
-                             reference_reset_symbol(hrefvmt,current_library.newasmsymbol(tprocdef(procdefinition)._class.vmt_mangledname),0);
+                             reference_reset_symbol(hrefvmt,objectlibrary.newasmsymbol(tprocdef(procdefinition)._class.vmt_mangledname),0);
                              cg.a_paramaddr_ref(exprasmlist,hrefvmt,paramanager.getintparaloc(2));
                              cg.a_param_reg(exprasmlist,OS_ADDR,href.base,paramanager.getintparaloc(1));
                              cg.a_call_name(exprasmlist,'FPC_CHECK_OBJECT_EXT');
@@ -1126,7 +1126,7 @@ implementation
            assigned(methodpointer) and
            (methodpointer.nodetype<>typen) then
            begin
-              current_library.getlabel(constructorfailed);
+              objectlibrary.getlabel(constructorfailed);
               emitjmp(C_Z,constructorfailed);
               cg.a_param_reg(exprasmlist,OS_ADDR,self_pointer_reg,paramanager.getintparaloc(1));
               reference_reset_base(href,self_pointer_reg,0);
@@ -1355,8 +1355,8 @@ implementation
           oldexitlabel:=aktexitlabel;
           oldexit2label:=aktexit2label;
           oldquickexitlabel:=quickexitlabel;
-          current_library.getlabel(aktexitlabel);
-          current_library.getlabel(aktexit2label);
+          objectlibrary.getlabel(aktexitlabel);
+          objectlibrary.getlabel(aktexit2label);
           { we're inlining a procedure }
           inlining_procedure:=true;
           { save old procinfo }
@@ -1388,8 +1388,8 @@ implementation
 {$ifdef GDB}
           if (cs_debuginfo in aktmoduleswitches) then
             begin
-              current_library.getaddrlabel(startlabel);
-              current_library.getaddrlabel(endlabel);
+              objectlibrary.getaddrlabel(startlabel);
+              objectlibrary.getaddrlabel(endlabel);
               cg.a_label(exprasmlist,startlabel);
               inlineprocdef.localst.symtabletype:=inlinelocalsymtable;
               inlineprocdef.parast.symtabletype:=inlineparasymtable;
@@ -1481,7 +1481,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.61  2002-08-11 13:24:16  peter
+  Revision 1.62  2002-08-11 14:32:30  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.61  2002/08/11 13:24:16  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 11 - 8
compiler/i386/n386cnv.pas

@@ -164,8 +164,8 @@ implementation
                 rg.ungetregisterint(exprasmlist,R_EDI);
                 reference_reset_base(href,R_ESP,0);
                 emit_ref(A_FILD,S_IQ,href);
-                current_library.getdatalabel(l1);
-                current_library.getlabel(l2);
+                objectlibrary.getdatalabel(l1);
+                objectlibrary.getlabel(l2);
                 emitjmp(C_Z,l2);
                 Consts.concat(Tai_label.Create(l1));
                 { I got this constant from a test progtram (FK) }
@@ -198,8 +198,8 @@ implementation
       begin
          oldtruelabel:=truelabel;
          oldfalselabel:=falselabel;
-         current_library.getlabel(truelabel);
-         current_library.getlabel(falselabel);
+         objectlibrary.getlabel(truelabel);
+         objectlibrary.getlabel(falselabel);
          secondpass(left);
          if codegenerror then
           exit;
@@ -255,7 +255,7 @@ implementation
             LOC_JUMP :
               begin
                 hregister:=rg.getregisterint(exprasmlist);
-                current_library.getlabel(hlabel);
+                objectlibrary.getlabel(hlabel);
                 cg.a_label(exprasmlist,truelabel);
                 cg.a_load_const_reg(exprasmlist,OS_INT,1,hregister);
                 cg.a_jmp_always(exprasmlist,hlabel);
@@ -294,14 +294,14 @@ implementation
          { NIL must be accepted !! }
          emit_reg_reg(A_OR,S_L,r^.base,r^.base);
          rg.ungetregisterint(exprasmlist,R_EDI);
-         current_library.getlabel(nillabel);
+         objectlibrary.getlabel(nillabel);
          emitjmp(C_E,nillabel);
          { this is one point where we need vmt_offset (PM) }
          r^.offset:= tobjectdef(tpointerdef(p^.resulttype.def).definition).vmt_offset;
          rg.getexplicitregisterint(exprasmlist,R_EDI);
          emit_ref_reg(A_MOV,S_L,r,R_EDI);
          emit_sym(A_PUSH,S_L,
-           current_library.newasmsymbol(tobjectdef(tpointerdef(p^.resulttype.def).definition).vmt_mangledname));
+           objectlibrary.newasmsymbol(tobjectdef(tpointerdef(p^.resulttype.def).definition).vmt_mangledname));
          emit_reg(A_PUSH,S_L,R_EDI);
          rg.ungetregister32(exprasmlist,R_EDI);
          emitcall('FPC_CHECK_OBJECT_EXT');
@@ -365,7 +365,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.46  2002-08-11 13:24:16  peter
+  Revision 1.47  2002-08-11 14:32:30  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.46  2002/08/11 13:24:16  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 30 - 27
compiler/i386/n386flw.pas

@@ -90,7 +90,7 @@ implementation
                 end
               else
                 begin
-                   current_library.getaddrlabel(a);
+                   objectlibrary.getaddrlabel(a);
                    cg.a_label(exprasmlist,a);
                    cg.a_param_reg(exprasmlist,OS_INT,R_EBP,paramanager.getintparaloc(2));
                    emit_sym(A_PUSH,S_L,a);
@@ -185,20 +185,20 @@ implementation
            end;
 
          { get new labels for the control flow statements }
-         current_library.getlabel(exittrylabel);
-         current_library.getlabel(exitexceptlabel);
+         objectlibrary.getlabel(exittrylabel);
+         objectlibrary.getlabel(exitexceptlabel);
          if assigned(aktbreaklabel) then
            begin
-              current_library.getlabel(breaktrylabel);
-              current_library.getlabel(continuetrylabel);
-              current_library.getlabel(breakexceptlabel);
-              current_library.getlabel(continueexceptlabel);
+              objectlibrary.getlabel(breaktrylabel);
+              objectlibrary.getlabel(continuetrylabel);
+              objectlibrary.getlabel(breakexceptlabel);
+              objectlibrary.getlabel(continueexceptlabel);
            end;
 
-         current_library.getlabel(exceptlabel);
-         current_library.getlabel(doexceptlabel);
-         current_library.getlabel(endexceptlabel);
-         current_library.getlabel(lastonlabel);
+         objectlibrary.getlabel(exceptlabel);
+         objectlibrary.getlabel(doexceptlabel);
+         objectlibrary.getlabel(endexceptlabel);
+         objectlibrary.getlabel(lastonlabel);
 
          tg.gettempofsizereferencepersistant(exprasmlist,24,tempbuf);
          tg.gettempofsizereferencepersistant(exprasmlist,12,tempaddr);
@@ -275,8 +275,8 @@ implementation
 
               { the destruction of the exception object must be also }
               { guarded by an exception frame                        }
-              current_library.getlabel(doobjectdestroy);
-              current_library.getlabel(doobjectdestroyandreraise);
+              objectlibrary.getlabel(doobjectdestroy);
+              objectlibrary.getlabel(doobjectdestroyandreraise);
 
               tg.gettempofsizereferencepersistant(exprasmlist,24,tempbuf);
               tg.gettempofsizereferencepersistant(exprasmlist,12,tempaddr);
@@ -422,11 +422,11 @@ implementation
       begin
          oldflowcontrol:=flowcontrol;
          flowcontrol:=[];
-         current_library.getlabel(nextonlabel);
+         objectlibrary.getlabel(nextonlabel);
 
          { push the vmt }
          emit_sym(A_PUSH,S_L,
-           current_library.newasmsymbol(excepttype.vmt_mangledname));
+           objectlibrary.newasmsymbol(excepttype.vmt_mangledname));
          cg.a_call_name(exprasmlist,'FPC_CATCHES');
          { allocate eax }
          exprasmList.concat(tai_regalloc.Alloc(R_EAX));
@@ -445,7 +445,7 @@ implementation
 
          { in the case that another exception is risen }
          { we've to destroy the old one                }
-         current_library.getlabel(doobjectdestroyandreraise);
+         objectlibrary.getlabel(doobjectdestroyandreraise);
 
          tg.gettempofsizereferencepersistant(exprasmlist,12,tempaddr);
          tg.gettempofsizereferencepersistant(exprasmlist,24,tempbuf);
@@ -468,15 +468,15 @@ implementation
            begin
               oldaktexitlabel:=aktexitlabel;
               oldaktexit2label:=aktexit2label;
-              current_library.getlabel(exitonlabel);
+              objectlibrary.getlabel(exitonlabel);
               aktexitlabel:=exitonlabel;
               aktexit2label:=exitonlabel;
               if assigned(aktbreaklabel) then
                begin
                  oldaktcontinuelabel:=aktcontinuelabel;
                  oldaktbreaklabel:=aktbreaklabel;
-                 current_library.getlabel(breakonlabel);
-                 current_library.getlabel(continueonlabel);
+                 objectlibrary.getlabel(breakonlabel);
+                 objectlibrary.getlabel(continueonlabel);
                  aktcontinuelabel:=continueonlabel;
                  aktbreaklabel:=breakonlabel;
                end;
@@ -485,7 +485,7 @@ implementation
               cg.g_maybe_loadself(exprasmlist);
               secondpass(right);
            end;
-         current_library.getlabel(doobjectdestroy);
+         objectlibrary.getlabel(doobjectdestroy);
          cg.a_label(exprasmlist,doobjectdestroyandreraise);
          cg.a_call_name(exprasmlist,'FPC_POPADDRSTACK');
          tg.ungetpersistanttempreference(exprasmlist,tempaddr);
@@ -580,23 +580,23 @@ implementation
          flowcontrol:=[];
          { we modify EAX }
          include(rg.usedinproc,R_EAX);
-         current_library.getlabel(finallylabel);
-         current_library.getlabel(endfinallylabel);
-         current_library.getlabel(reraiselabel);
+         objectlibrary.getlabel(finallylabel);
+         objectlibrary.getlabel(endfinallylabel);
+         objectlibrary.getlabel(reraiselabel);
 
          { the finally block must catch break, continue and exit }
          { statements                                            }
          oldaktexitlabel:=aktexitlabel;
          oldaktexit2label:=aktexit2label;
-         current_library.getlabel(exitfinallylabel);
+         objectlibrary.getlabel(exitfinallylabel);
          aktexitlabel:=exitfinallylabel;
          aktexit2label:=exitfinallylabel;
          if assigned(aktbreaklabel) then
           begin
             oldaktcontinuelabel:=aktcontinuelabel;
             oldaktbreaklabel:=aktbreaklabel;
-            current_library.getlabel(breakfinallylabel);
-            current_library.getlabel(continuefinallylabel);
+            objectlibrary.getlabel(breakfinallylabel);
+            objectlibrary.getlabel(continuefinallylabel);
             aktcontinuelabel:=continuefinallylabel;
             aktbreaklabel:=breakfinallylabel;
           end;
@@ -726,7 +726,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.31  2002-08-11 13:24:17  peter
+  Revision 1.32  2002-08-11 14:32:30  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.31  2002/08/11 13:24:17  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 11 - 8
compiler/i386/n386mat.pas

@@ -138,7 +138,7 @@ implementation
                         begin
                           { a jump, but less operations }
                           emit_reg_reg(A_TEST,S_L,hreg1,hreg1);
-                          current_library.getlabel(hl);
+                          objectlibrary.getlabel(hl);
                           emitjmp(C_NS,hl);
                           if power=1 then
                             emit_reg(A_INC,S_L,hreg1)
@@ -396,9 +396,9 @@ implementation
                    { so we've to do some tricks here                           }
                    if nodetype=shln then
                      begin
-                        current_library.getlabel(l1);
-                        current_library.getlabel(l2);
-                        current_library.getlabel(l3);
+                        objectlibrary.getlabel(l1);
+                        objectlibrary.getlabel(l2);
+                        objectlibrary.getlabel(l3);
                         emit_const_reg(A_CMP,S_L,64,R_ECX);
                         emitjmp(C_L,l1);
                         emit_reg_reg(A_XOR,S_L,hregisterlow,hregisterlow);
@@ -422,9 +422,9 @@ implementation
                      end
                    else
                      begin
-                        current_library.getlabel(l1);
-                        current_library.getlabel(l2);
-                        current_library.getlabel(l3);
+                        objectlibrary.getlabel(l1);
+                        objectlibrary.getlabel(l2);
+                        objectlibrary.getlabel(l3);
                         emit_const_reg(A_CMP,S_L,64,R_ECX);
                         emitjmp(C_L,l1);
                         emit_reg_reg(A_XOR,S_L,hregisterlow,hregisterlow);
@@ -830,7 +830,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.35  2002-08-11 13:24:17  peter
+  Revision 1.36  2002-08-11 14:32:30  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.35  2002/08/11 13:24:17  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 7 - 4
compiler/i386/n386mem.pas

@@ -380,9 +380,9 @@ implementation
               if isjump then
                begin
                  otl:=truelabel;
-                 current_library.getlabel(truelabel);
+                 objectlibrary.getlabel(truelabel);
                  ofl:=falselabel;
-                 current_library.getlabel(falselabel);
+                 objectlibrary.getlabel(falselabel);
                end;
               maybe_save(exprasmlist,right.registers32,location,pushedregs);
               secondpass(right);
@@ -406,7 +406,7 @@ implementation
                         firstpass(hightree);
                         secondpass(hightree);
                         location_release(exprasmlist,hightree.location);
-                        reference_reset_symbol(href,current_library.newasmsymbol(tarraydef(left.resulttype.def).getrangecheckstring),4);
+                        reference_reset_symbol(href,objectlibrary.newasmsymbol(tarraydef(left.resulttype.def).getrangecheckstring),4);
                         cg.a_load_loc_ref(exprasmlist,hightree.location,href);
                         hightree.free;
                         hightree:=nil;
@@ -507,7 +507,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.40  2002-08-11 13:24:17  peter
+  Revision 1.41  2002-08-11 14:32:30  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.40  2002/08/11 13:24:17  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/i386/n386obj.pas

@@ -216,7 +216,7 @@ begin
   { case 0 }
   else
     begin
-      lab:=current_library.newasmsymbol(procdef.mangledname);
+      lab:=objectlibrary.newasmsymbol(procdef.mangledname);
       emit_sym(A_JMP,S_NO,lab);
     end;
   exprasmlist:=oldexprasmlist;
@@ -228,7 +228,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.14  2002-08-11 13:24:17  peter
+  Revision 1.15  2002-08-11 14:32:30  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.14  2002/08/11 13:24:17  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/i386/n386opt.pas

@@ -142,7 +142,7 @@ begin
   if checklength then
     begin
       { is it already maximal? }
-      current_library.getlabel(l);
+      objectlibrary.getlabel(l);
       if tg.istemp(left.location.reference) then
         len:=255
       else
@@ -248,7 +248,10 @@ end.
 
 {
   $Log$
-  Revision 1.22  2002-08-11 13:24:17  peter
+  Revision 1.23  2002-08-11 14:32:30  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.22  2002/08/11 13:24:17  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 15 - 12
compiler/i386/n386set.pas

@@ -255,7 +255,7 @@ implementation
             else
               location.resflags:=F_E;
 
-            current_library.getlabel(l);
+            objectlibrary.getlabel(l);
 
             { how much have we already substracted from the x in the }
             { "x in [y..z]" expression                               }
@@ -438,8 +438,8 @@ implementation
                if right.location.loc=LOC_CONSTANT then
                 begin
                   location.resflags:=F_C;
-                  current_library.getlabel(l);
-                  current_library.getlabel(l2);
+                  objectlibrary.getlabel(l);
+                  objectlibrary.getlabel(l2);
 
                   { Is this treated in firstpass ?? }
                   if left.nodetype=ordconstn then
@@ -614,7 +614,7 @@ implementation
                begin
                   if opsize=S_Q then
                     begin
-                       current_library.getlabel(l1);
+                       objectlibrary.getlabel(l1);
                        emit_const_reg(A_CMP,S_L,longint(hi(int64(t^._low))),hregister2);
                        emitjmp(C_NZ,l1);
                        emit_const_reg(A_CMP,S_L,longint(lo(int64(t^._low))),hregister);
@@ -637,7 +637,7 @@ implementation
                     begin
                        if opsize=S_Q then
                          begin
-                            current_library.getlabel(l1);
+                            objectlibrary.getlabel(l1);
                             emit_const_reg(A_CMP,S_L,longint(hi(int64(t^._low))),hregister2);
                             emitjmp(jmp_le,elselabel);
                             emitjmp(jmp_gt,l1);
@@ -655,7 +655,7 @@ implementation
 
                   if opsize=S_Q then
                     begin
-                       current_library.getlabel(l1);
+                       objectlibrary.getlabel(l1);
                        emit_const_reg(A_CMP,S_L,longint(hi(int64(t^._high))),hregister2);
                        emitjmp(jmp_le,t^.statement);
                        emitjmp(jmp_gt,l1);
@@ -797,7 +797,7 @@ implementation
                 emit_const_reg(A_CMP,opsize,longint(max_),hregister);
                 emitjmp(jmp_gt,elselabel);
              end;
-           current_library.getlabel(table);
+           objectlibrary.getlabel(table);
            { extend with sign }
            if opsize=S_W then
              begin
@@ -850,8 +850,8 @@ implementation
          dist : dword;
 {$endif Delphi}
       begin
-         current_library.getlabel(endlabel);
-         current_library.getlabel(elselabel);
+         objectlibrary.getlabel(endlabel);
+         objectlibrary.getlabel(elselabel);
          if (cs_create_smart in aktmoduleswitches) then
            jumpsegment:=procinfo^.aktlocaldata
          else
@@ -875,9 +875,9 @@ implementation
          if left.location.loc=LOC_JUMP then
           begin
             otl:=truelabel;
-            current_library.getlabel(truelabel);
+            objectlibrary.getlabel(truelabel);
             ofl:=falselabel;
-            current_library.getlabel(falselabel);
+            objectlibrary.getlabel(falselabel);
             isjump:=true;
           end;
          secondpass(left);
@@ -1023,7 +1023,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.37  2002-08-11 13:24:17  peter
+  Revision 1.38  2002-08-11 14:32:30  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.37  2002/08/11 13:24:17  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/i386/popt386.pas

@@ -509,7 +509,7 @@ Var
                   insertllitem(asml,p1,p1.next,Tai_asm_comment.Create(
                     strpnew('previous label inserted'))));
   {$endif finaldestdebug}
-                  current_library.getlabel(l);
+                  objectlibrary.getlabel(l);
                   insertllitem(asml,p1,p1.next,Tai_label.Create(l));
                   dec(tasmlabel(Taicpu(hp).oper[0].sym).refs);
                   hp.oper[0].sym := l;
@@ -2044,7 +2044,10 @@ End.
 
 {
   $Log$
-  Revision 1.31  2002-08-11 13:24:17  peter
+  Revision 1.32  2002-08-11 14:32:30  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.31  2002/08/11 13:24:17  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 6 - 3
compiler/i386/ra386att.pas

@@ -1275,7 +1275,7 @@ begin
    begin
      opr.typ:=OPR_SYMBOL;
      opr.symofs:=l;
-     opr.symbol:=current_library.newasmsymbol(tempstr);
+     opr.symbol:=objectlibrary.newasmsymbol(tempstr);
    end
   else
    begin
@@ -1543,7 +1543,7 @@ Begin
                           Begin
                             { not found, finally ... add it anyways ... }
                             Message1(asmr_w_id_supposed_external,expr);
-                            opr.ref.symbol:=current_library.newasmsymbol(expr);
+                            opr.ref.symbol:=objectlibrary.newasmsymbol(expr);
                           end;
                        end
                     else
@@ -2129,7 +2129,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.27  2002-08-11 13:24:17  peter
+  Revision 1.28  2002-08-11 14:32:31  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.27  2002/08/11 13:24:17  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 6 - 3
compiler/i386/ra386int.pas

@@ -1254,7 +1254,7 @@ Begin
              if GotStar then
               Message(asmr_e_only_add_relocatable_symbol);
              if not assigned(opr.ref.symbol) then
-              opr.ref.symbol:=current_library.newasmsymbol(tempstr)
+              opr.ref.symbol:=objectlibrary.newasmsymbol(tempstr)
              else
               Message(asmr_e_cant_have_multiple_relocatable_symbols);
            end;
@@ -1310,7 +1310,7 @@ begin
    begin
      opr.typ:=OPR_SYMBOL;
      opr.symofs:=l;
-     opr.symbol:=current_library.newasmsymbol(tempstr);
+     opr.symbol:=objectlibrary.newasmsymbol(tempstr);
    end
   else
    begin
@@ -1959,7 +1959,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.30  2002-08-11 13:24:17  peter
+  Revision 1.31  2002-08-11 14:32:31  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.30  2002/08/11 13:24:17  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 6 - 3
compiler/m68k/rasm.pas

@@ -1618,7 +1618,7 @@ var
                           l:=instr.operands[operandnum]^.opr.val;
                           instr.operands[operandnum]^.opr.typ := OPR_SYMBOL;
                           instr.operands[operandnum]^.opr.symofs := l;
-                          instr.operands[operandnum]^.opr.symbol := current_library.newasmsymbol(tempstr);
+                          instr.operands[operandnum]^.opr.symbol := objectlibrary.newasmsymbol(tempstr);
                         end;
                  end;
    { // Constant memory offset .              // }
@@ -1715,7 +1715,7 @@ var
                             Begin
                              if getasmsymbol(actasmpattern) =nil then
                                Message1(asmr_w_id_supposed_external,actasmpattern);
-                             instr.operands[operandnum]^.opr.ref.symbol:=current_library.newasmsymbol(actasmpattern);
+                             instr.operands[operandnum]^.opr.ref.symbol:=objectlibrary.newasmsymbol(actasmpattern);
                             end
                            else
                              Message(asmr_e_syntax_error);
@@ -2218,7 +2218,10 @@ Begin
 end.
 {
   $Log$
-  Revision 1.2  2002-08-11 13:24:18  peter
+  Revision 1.3  2002-08-11 14:32:32  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.2  2002/08/11 13:24:18  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 8 - 5
compiler/ncgbas.pas

@@ -115,7 +115,7 @@ interface
              if not assigned(p.altsymbol) then
               begin
                 { generatealtsymbol will also increase the refs }
-                current_library.GenerateAltSymbol(p);
+                objectlibrary.GenerateAltSymbol(p);
               end
              else
               begin
@@ -135,7 +135,7 @@ interface
       begin
          if inlining_procedure then
            begin
-             current_library.CreateUsedAsmSymbolList;
+             objectlibrary.CreateUsedAsmSymbolList;
              localfixup:=aktprocdef.localst.address_fixup;
              parafixup:=aktprocdef.parast.address_fixup;
              hp:=tai(p_asm.first);
@@ -203,8 +203,8 @@ interface
                 hp:=tai(hp.next);
               end;
              { restore used symbols }
-             current_library.UsedAsmSymbolListResetAltSym;
-             current_library.DestroyUsedAsmSymbolList;
+             objectlibrary.UsedAsmSymbolListResetAltSym;
+             objectlibrary.DestroyUsedAsmSymbolList;
            end
          else
            begin
@@ -293,7 +293,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.21  2002-08-11 13:24:11  peter
+  Revision 1.22  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.21  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 18 - 15
compiler/ncgcal.pas

@@ -106,8 +106,8 @@ implementation
 
          otlabel:=truelabel;
          oflabel:=falselabel;
-         current_library.getlabel(truelabel);
-         current_library.getlabel(falselabel);
+         objectlibrary.getlabel(truelabel);
+         objectlibrary.getlabel(falselabel);
          secondpass(left);
          { handle varargs first, because defcoll is not valid }
          if (nf_varargs_para in flags) then
@@ -390,7 +390,7 @@ implementation
                  (po_iocheck in procdefinition.procoptions) and
                  not(po_iocheck in aktprocdef.procoptions) then
                 begin
-                   current_library.getaddrlabel(iolabel);
+                   objectlibrary.getaddrlabel(iolabel);
                    cg.a_label(exprasmlist,iolabel);
                 end
               else
@@ -627,7 +627,7 @@ implementation
                                            cg.a_load_const_reg(exprasmlist,OS_ADDR,0,self_pointer_reg)
                                          else
                                            begin
-                                             reference_reset_symbol(href,current_library.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
+                                             reference_reset_symbol(href,objectlibrary.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
                                              cg.a_loadaddr_ref_reg(exprasmlist,href,self_pointer_reg);
                                            end;
                                          { emit_reg(A_PUSH,S_L,R_ESI);
@@ -684,7 +684,7 @@ implementation
                                     cg.a_load_const_reg(exprasmlist,OS_ADDR,0,self_pointer_reg);
                                     cg.a_param_reg(exprasmlist,OS_ADDR,self_pointer_reg,2);
                                     { insert the vmt }
-                                    reference_reset_symbol(href,current_library.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
+                                    reference_reset_symbol(href,objectlibrary.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
                                     cg.a_paramaddr_ref(exprasmlist,href,1);
                                     extended_new:=true;
                                  end;
@@ -698,7 +698,7 @@ implementation
                                     emit_ref_reg(A_LEA,S_L,methodpointer.location.reference,R_ESI);
                                     reference_release(exprasmlist,methodpointer.location.reference);
                                     cg.a_param_reg(exprasmlist,OS_ADDR,self_pointer_reg,2);
-                                    reference_reset_symbol(href,current_library.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
+                                    reference_reset_symbol(href,objectlibrary.newasmsymbol(tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
                                     cg.a_paramaddr_ref(exprasmlist,href,1);
                                  end;
                                else
@@ -770,7 +770,7 @@ implementation
                                               if (procdefinition.proctypeoption=potype_constructor) then
                                                 begin
                                                   { it's no bad idea, to insert the VMT }
-                                                  reference_reset_symbol(href,current_library.newasmsymbol(
+                                                  reference_reset_symbol(href,objectlibrary.newasmsymbol(
                                                      tobjectdef(methodpointer.resulttype.def).vmt_mangledname),0);
                                                   cg.a_paramaddr_ref(exprasmlist,href,1);
                                                 end
@@ -826,7 +826,7 @@ implementation
                                   if (procdefinition.proctypeoption=potype_constructor) then
                                     begin
                                       { it's no bad idea, to insert the VMT }
-                                      reference_reset_symbol(href,current_library.newasmsymbol(procinfo^._class.vmt_mangledname),0);
+                                      reference_reset_symbol(href,objectlibrary.newasmsymbol(procinfo^._class.vmt_mangledname),0);
                                       cg.a_paramaddr_ref(exprasmlist,href,1);
                                     end
                                   { destructors haven't to dispose the instance, if this is }
@@ -958,7 +958,7 @@ implementation
                      begin
                         if (cs_check_object in aktlocalswitches) then
                           begin
-                             reference_reset_symbol(hrefvmt,current_library.newasmsymbol(tprocdef(procdefinition)._class.vmt_mangledname),0);
+                             reference_reset_symbol(hrefvmt,objectlibrary.newasmsymbol(tprocdef(procdefinition)._class.vmt_mangledname),0);
                              cg.a_paramaddr_ref(exprasmlist,hrefvmt,2);
                              cg.a_param_reg(exprasmlist,OS_ADDR,href.base,1);
                              cg.a_call_name(exprasmlist,'FPC_CHECK_OBJECT_EXT');
@@ -1135,7 +1135,7 @@ implementation
            assigned(methodpointer) and
            (methodpointer.nodetype<>typen) then
            begin
-              current_library.getlabel(constructorfailed);
+              objectlibrary.getlabel(constructorfailed);
               cg.a_cmp_const_reg_label(exprasmlist,OS_ADDR,OC_EQ,0,self_pointer_reg,constructorfailed);
               cg.a_param_reg(exprasmlist,OS_ADDR,accumulator,paramanager.getintparaloc(1));
               reference_reset_base(href,self_pointer_reg,0);
@@ -1374,8 +1374,8 @@ implementation
           oldexitlabel:=aktexitlabel;
           oldexit2label:=aktexit2label;
           oldquickexitlabel:=quickexitlabel;
-          current_library.getlabel(aktexitlabel);
-          current_library.getlabel(aktexit2label);
+          objectlibrary.getlabel(aktexitlabel);
+          objectlibrary.getlabel(aktexit2label);
           { we're inlining a procedure }
           inlining_procedure:=true;
           { save old procinfo }
@@ -1407,8 +1407,8 @@ implementation
 {$ifdef GDB}
           if (cs_debuginfo in aktmoduleswitches) then
             begin
-              current_library.getaddrlabel(startlabel);
-              current_library.getaddrlabel(endlabel);
+              objectlibrary.getaddrlabel(startlabel);
+              objectlibrary.getaddrlabel(endlabel);
               cg.a_label(exprasmlist,startlabel);
               inlineprocdef.localst.symtabletype:=inlinelocalsymtable;
               inlineprocdef.parast.symtabletype:=inlineparasymtable;
@@ -1500,7 +1500,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.5  2002-08-11 13:24:11  peter
+  Revision 1.6  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.5  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 11 - 8
compiler/ncgcnv.pas

@@ -120,7 +120,7 @@ interface
                   (str_length(left)=0) then
                 begin
                   reference_reset(hr);
-                  hr.symbol:=current_library.newasmsymbol('FPC_EMPTYCHAR');
+                  hr.symbol:=objectlibrary.newasmsymbol('FPC_EMPTYCHAR');
                   location.register:=rg.getregisterint(exprasmlist);
                   cg.a_loadaddr_ref_reg(exprasmlist,hr,location.register);
                 end
@@ -141,7 +141,7 @@ interface
                   (str_length(left)=0) then
                 begin
                   reference_reset(hr);
-                  hr.symbol:=current_library.newasmsymbol('FPC_EMPTYCHAR');
+                  hr.symbol:=objectlibrary.newasmsymbol('FPC_EMPTYCHAR');
                   location.register:=rg.getregisterint(exprasmlist);
                   cg.a_loadaddr_ref_reg(exprasmlist,hr,location.register);
                 end
@@ -291,8 +291,8 @@ interface
       begin
          oldtruelabel:=truelabel;
          oldfalselabel:=falselabel;
-         current_library.getlabel(truelabel);
-         current_library.getlabel(falselabel);
+         objectlibrary.getlabel(truelabel);
+         objectlibrary.getlabel(falselabel);
          secondpass(left);
          location_copy(location,left.location);
          { byte(boolean) or word(wordbool) or longint(longbool) must }
@@ -328,7 +328,7 @@ interface
          hr : treference;
       begin
          location_reset(location,LOC_REGISTER,OS_ADDR);
-         current_library.getlabel(l1);
+         objectlibrary.getlabel(l1);
          case left.location.loc of
             LOC_CREGISTER,LOC_REGISTER:
               location.register:=left.location.register;
@@ -343,7 +343,7 @@ interface
          end;
          cg.a_cmp_const_reg_label(exprasmlist,OS_32,OC_NE,0,location.register,l1);
          reference_reset(hr);
-         hr.symbol:=current_library.newasmsymbol('FPC_EMPTYCHAR');
+         hr.symbol:=objectlibrary.newasmsymbol('FPC_EMPTYCHAR');
          cg.a_loadaddr_ref_reg(exprasmlist,hr,location.register);
          cg.a_label(exprasmlist,l1);
       end;
@@ -372,7 +372,7 @@ interface
             else
               internalerror(121120001);
          end;
-         current_library.getlabel(l1);
+         objectlibrary.getlabel(l1);
          cg.a_cmp_const_reg_label(exprasmlist,OS_ADDR,OC_EQ,0,location.register,l1);
          cg.a_op_const_reg(exprasmlist,OP_ADD,aword(
            tobjectdef(left.resulttype.def).implementedinterfaces.ioffsets(
@@ -490,7 +490,10 @@ end.
 
 {
   $Log$
-  Revision 1.22  2002-08-11 13:24:11  peter
+  Revision 1.23  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.22  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 12 - 9
compiler/ncgcon.pas

@@ -123,7 +123,7 @@ implementation
              { :-(, we must generate a new entry }
              if not assigned(lab_real) then
                begin
-                  current_library.getdatalabel(lastlabel);
+                  objectlibrary.getdatalabel(lastlabel);
                   lab_real:=lastlabel;
                   if (cs_create_smart in aktmoduleswitches) then
                    Consts.concat(Tai_cut.Create);
@@ -299,7 +299,7 @@ implementation
               { :-(, we must generate a new entry }
               if not assigned(lab_str) then
                 begin
-                   current_library.getdatalabel(lastlabel);
+                   objectlibrary.getdatalabel(lastlabel);
                    lab_str:=lastlabel;
                    if (cs_create_smart in aktmoduleswitches) then
                     Consts.concat(Tai_cut.Create);
@@ -313,8 +313,8 @@ implementation
                              Consts.concat(Tai_const.Create_32bit(0))
                            else
                              begin
-                                current_library.getdatalabel(l1);
-                                current_library.getdatalabel(l2);
+                                objectlibrary.getdatalabel(l1);
+                                objectlibrary.getdatalabel(l2);
                                 Consts.concat(Tai_label.Create(l2));
                                 Consts.concat(Tai_const_symbol.Create(l1));
                                 Consts.concat(Tai_const.Create_32bit(len));
@@ -338,8 +338,8 @@ implementation
                              Consts.concat(Tai_const.Create_32bit(0))
                            else
                              begin
-                                current_library.getdatalabel(l1);
-                                current_library.getdatalabel(l2);
+                                objectlibrary.getdatalabel(l1);
+                                objectlibrary.getdatalabel(l2);
                                 Consts.concat(Tai_label.Create(l2));
                                 Consts.concat(Tai_const_symbol.Create(l1));
 
@@ -460,7 +460,7 @@ implementation
              { :-(, we must generate a new entry }
              if not assigned(lab_set) then
                begin
-                 current_library.getdatalabel(lastlabel);
+                 objectlibrary.getdatalabel(lastlabel);
                  lab_set:=lastlabel;
                  if (cs_create_smart in aktmoduleswitches) then
                   Consts.concat(Tai_cut.Create);
@@ -503,7 +503,7 @@ implementation
       begin
         location_reset(location,LOC_CREFERENCE,OS_NO);
         { label for GUID }
-        current_library.getdatalabel(tmplabel);
+        objectlibrary.getdatalabel(tmplabel);
         consts.concat(Tai_label.Create(tmplabel));
         consts.concat(Tai_const.Create_32bit(value.D1));
         consts.concat(Tai_const.Create_16bit(value.D2));
@@ -525,7 +525,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.17  2002-08-11 13:24:11  peter
+  Revision 1.18  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.17  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 41 - 38
compiler/ncgflw.pas

@@ -109,9 +109,9 @@ implementation
          otlabel,oflabel : tasmlabel;
 
       begin
-         current_library.getlabel(lloop);
-         current_library.getlabel(lcont);
-         current_library.getlabel(lbreak);
+         objectlibrary.getlabel(lloop);
+         objectlibrary.getlabel(lcont);
+         objectlibrary.getlabel(lbreak);
          { arrange continue and breaklabels: }
          oldclabel:=aktcontinuelabel;
          oldblabel:=aktbreaklabel;
@@ -182,8 +182,8 @@ implementation
       begin
          otlabel:=truelabel;
          oflabel:=falselabel;
-         current_library.getlabel(truelabel);
-         current_library.getlabel(falselabel);
+         objectlibrary.getlabel(truelabel);
+         objectlibrary.getlabel(falselabel);
          rg.cleartempgen;
          secondpass(left);
 
@@ -221,7 +221,7 @@ implementation
            begin
               if assigned(right) then
                 begin
-                   current_library.getlabel(hl);
+                   objectlibrary.getlabel(hl);
                    { do go back to if line !! }
                    if not(cs_regalloc in aktglobalswitches) then
                      aktfilepos:=exprasmList.getlasttaifilepos^
@@ -307,9 +307,9 @@ implementation
       begin
          oldclabel:=aktcontinuelabel;
          oldblabel:=aktbreaklabel;
-         current_library.getlabel(aktcontinuelabel);
-         current_library.getlabel(aktbreaklabel);
-         current_library.getlabel(l3);
+         objectlibrary.getlabel(aktcontinuelabel);
+         objectlibrary.getlabel(aktbreaklabel);
+         objectlibrary.getlabel(l3);
 
          { only calculate reference }
          rg.cleartempgen;
@@ -476,8 +476,8 @@ implementation
               allocated_acchigh := false;
               otlabel:=truelabel;
               oflabel:=falselabel;
-              current_library.getlabel(truelabel);
-              current_library.getlabel(falselabel);
+              objectlibrary.getlabel(truelabel);
+              objectlibrary.getlabel(falselabel);
               secondpass(left);
               { the result of left is not needed anymore after this
                 node }
@@ -664,7 +664,7 @@ do_jmp:
                 end
               else
                 begin
-                   current_library.getaddrlabel(a);
+                   objectlibrary.getaddrlabel(a);
                    cg.a_label(exprasmlist,a);
                    reference_reset_symbol(href2,a,0);
                    cg.a_paramaddr_ref(exprasmlist,href2,paramanager.getintparaloc(2));
@@ -765,20 +765,20 @@ do_jmp:
            end;
 
          { get new labels for the control flow statements }
-         current_library.getlabel(exittrylabel);
-         current_library.getlabel(exitexceptlabel);
+         objectlibrary.getlabel(exittrylabel);
+         objectlibrary.getlabel(exitexceptlabel);
          if assigned(aktbreaklabel) then
            begin
-              current_library.getlabel(breaktrylabel);
-              current_library.getlabel(continuetrylabel);
-              current_library.getlabel(breakexceptlabel);
-              current_library.getlabel(continueexceptlabel);
+              objectlibrary.getlabel(breaktrylabel);
+              objectlibrary.getlabel(continuetrylabel);
+              objectlibrary.getlabel(breakexceptlabel);
+              objectlibrary.getlabel(continueexceptlabel);
            end;
 
-         current_library.getlabel(exceptlabel);
-         current_library.getlabel(doexceptlabel);
-         current_library.getlabel(endexceptlabel);
-         current_library.getlabel(lastonlabel);
+         objectlibrary.getlabel(exceptlabel);
+         objectlibrary.getlabel(doexceptlabel);
+         objectlibrary.getlabel(endexceptlabel);
+         objectlibrary.getlabel(lastonlabel);
 
          try_new_exception(exprasmlist,tempbuf,tempaddr,href,1,exceptlabel);
 
@@ -834,8 +834,8 @@ do_jmp:
 
               { the destruction of the exception object must be also }
               { guarded by an exception frame                        }
-              current_library.getlabel(doobjectdestroy);
-              current_library.getlabel(doobjectdestroyandreraise);
+              objectlibrary.getlabel(doobjectdestroy);
+              objectlibrary.getlabel(doobjectdestroyandreraise);
 
               try_new_exception(exprasmlist,tempbuf,tempaddr,href,1,exceptlabel);
 
@@ -966,10 +966,10 @@ do_jmp:
       begin
          oldflowcontrol:=flowcontrol;
          flowcontrol:=[];
-         current_library.getlabel(nextonlabel);
+         objectlibrary.getlabel(nextonlabel);
 
          { send the vmt parameter }
-         reference_reset_symbol(href2,current_library.newasmsymbol(excepttype.vmt_mangledname),0);
+         reference_reset_symbol(href2,objectlibrary.newasmsymbol(excepttype.vmt_mangledname),0);
          cg.a_paramaddr_ref(exprasmlist,href2,paramanager.getintparaloc(1));
          cg.a_call_name(exprasmlist,'FPC_CATCHES');
 
@@ -986,7 +986,7 @@ do_jmp:
 
          { in the case that another exception is risen }
          { we've to destroy the old one                }
-         current_library.getlabel(doobjectdestroyandreraise);
+         objectlibrary.getlabel(doobjectdestroyandreraise);
 
          { call setjmp, and jump to finally label on non-zero result }
          try_new_exception(exprasmlist,tempbuf,tempaddr,href,1,doobjectdestroyandreraise);
@@ -995,15 +995,15 @@ do_jmp:
            begin
               oldaktexitlabel:=aktexitlabel;
               oldaktexit2label:=aktexit2label;
-              current_library.getlabel(exitonlabel);
+              objectlibrary.getlabel(exitonlabel);
               aktexitlabel:=exitonlabel;
               aktexit2label:=exitonlabel;
               if assigned(aktbreaklabel) then
                begin
                  oldaktcontinuelabel:=aktcontinuelabel;
                  oldaktbreaklabel:=aktbreaklabel;
-                 current_library.getlabel(breakonlabel);
-                 current_library.getlabel(continueonlabel);
+                 objectlibrary.getlabel(breakonlabel);
+                 objectlibrary.getlabel(continueonlabel);
                  aktcontinuelabel:=continueonlabel;
                  aktbreaklabel:=breakonlabel;
                end;
@@ -1012,7 +1012,7 @@ do_jmp:
               cg.g_maybe_loadself(exprasmlist);
               secondpass(right);
            end;
-         current_library.getlabel(doobjectdestroy);
+         objectlibrary.getlabel(doobjectdestroy);
          cg.a_label(exprasmlist,doobjectdestroyandreraise);
 
          try_free_exception(exprasmlist,tempbuf,tempaddr,href,0,doobjectdestroy,false);
@@ -1098,23 +1098,23 @@ do_jmp:
          { check if child nodes do a break/continue/exit }
          oldflowcontrol:=flowcontrol;
          flowcontrol:=[];
-         current_library.getlabel(finallylabel);
-         current_library.getlabel(endfinallylabel);
-         current_library.getlabel(reraiselabel);
+         objectlibrary.getlabel(finallylabel);
+         objectlibrary.getlabel(endfinallylabel);
+         objectlibrary.getlabel(reraiselabel);
 
          { the finally block must catch break, continue and exit }
          { statements                                            }
          oldaktexitlabel:=aktexitlabel;
          oldaktexit2label:=aktexit2label;
-         current_library.getlabel(exitfinallylabel);
+         objectlibrary.getlabel(exitfinallylabel);
          aktexitlabel:=exitfinallylabel;
          aktexit2label:=exitfinallylabel;
          if assigned(aktbreaklabel) then
           begin
             oldaktcontinuelabel:=aktcontinuelabel;
             oldaktbreaklabel:=aktbreaklabel;
-            current_library.getlabel(breakfinallylabel);
-            current_library.getlabel(continuefinallylabel);
+            objectlibrary.getlabel(breakfinallylabel);
+            objectlibrary.getlabel(continuefinallylabel);
             aktcontinuelabel:=continuefinallylabel;
             aktbreaklabel:=breakfinallylabel;
           end;
@@ -1226,7 +1226,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.33  2002-08-11 13:24:11  peter
+  Revision 1.34  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.33  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 9 - 6
compiler/ncginl.pas

@@ -184,8 +184,8 @@ implementation
           internalerror(7123458);
        otlabel:=truelabel;
        oflabel:=falselabel;
-       current_library.getlabel(truelabel);
-       current_library.getlabel(falselabel);
+       objectlibrary.getlabel(truelabel);
+       objectlibrary.getlabel(falselabel);
        secondpass(tcallparanode(left).left);
        maketojumpbool(exprasmlist,tcallparanode(left).left,lr_load_regvars);
        cg.a_label(exprasmlist,falselabel);
@@ -227,7 +227,7 @@ implementation
         if left.nodetype=typen then
           begin
             hregister:=rg.getaddressregister(exprasmlist);
-            reference_reset_symbol(href,current_library.newasmsymbol(tobjectdef(left.resulttype.def).vmt_mangledname),0);
+            reference_reset_symbol(href,objectlibrary.newasmsymbol(tobjectdef(left.resulttype.def).vmt_mangledname),0);
             cg.a_loadaddr_ref_reg(exprasmlist,href,hregister);
           end
         else
@@ -269,7 +269,7 @@ implementation
             begin
               location_force_reg(exprasmlist,left.location,OS_ADDR,false);
               hregister:=left.location.register;
-              current_library.getlabel(lengthlab);
+              objectlibrary.getlabel(lengthlab);
               cg.a_cmp_const_reg_label(exprasmlist,OS_ADDR,OC_EQ,0,hregister,lengthlab);
               reference_reset_base(href,hregister,-8);
               cg.a_load_ref_reg(exprasmlist,OS_32,href,hregister);
@@ -429,7 +429,7 @@ implementation
             end
           else
             begin
-              current_library.getlabel(ptrvalidlabel);
+              objectlibrary.getlabel(ptrvalidlabel);
               cg.a_load_const_reg(exprasmlist, OS_INT, 1, hreg);
               cg.a_cmp_const_ref_label(exprasmlist, OS_ADDR, OC_NE, 0,
                   tcallparanode(left).left.location.reference, ptrvalidlabel);
@@ -641,7 +641,10 @@ end.
 
 {
   $Log$
-  Revision 1.11  2002-08-11 13:24:11  peter
+  Revision 1.12  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.11  2002/08/11 13:24:11  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 18 - 15
compiler/ncgld.pas

@@ -92,14 +92,14 @@ implementation
                      location.reference.offset:=tabsolutesym(symtableentry).address;
                    end
                   else
-                   location.reference.symbol:=current_library.newasmsymbol(tabsolutesym(symtableentry).mangledname);
+                   location.reference.symbol:=objectlibrary.newasmsymbol(tabsolutesym(symtableentry).mangledname);
                end;
             constsym:
               begin
                  if tconstsym(symtableentry).consttyp=constresourcestring then
                    begin
                       location_reset(location,LOC_CREFERENCE,OS_ADDR);
-                      location.reference.symbol:=current_library.newasmsymbol(tconstsym(symtableentry).owner.name^+'_RESOURCESTRINGLIST');
+                      location.reference.symbol:=objectlibrary.newasmsymbol(tconstsym(symtableentry).owner.name^+'_RESOURCESTRINGLIST');
                       location.reference.offset:=tconstsym(symtableentry).resstrindex*16+8;
                    end
                  else
@@ -111,13 +111,13 @@ implementation
                   { C variable }
                   if (vo_is_C_var in tvarsym(symtableentry).varoptions) then
                     begin
-                       location.reference.symbol:=current_library.newasmsymbol(tvarsym(symtableentry).mangledname);
+                       location.reference.symbol:=objectlibrary.newasmsymbol(tvarsym(symtableentry).mangledname);
                     end
                   { DLL variable }
                   else if (vo_is_dll_var in tvarsym(symtableentry).varoptions) then
                     begin
                        hregister:=rg.getaddressregister(exprasmlist);
-                       location.reference.symbol:=current_library.newasmsymbol(tvarsym(symtableentry).mangledname);
+                       location.reference.symbol:=objectlibrary.newasmsymbol(tvarsym(symtableentry).mangledname);
                        cg.a_load_ref_reg(exprasmlist,OS_ADDR,location.reference,hregister);
                        location.reference.symbol:=nil;
                        location.reference.base:=hregister;
@@ -125,7 +125,7 @@ implementation
                   { external variable }
                   else if (vo_is_external in tvarsym(symtableentry).varoptions) then
                     begin
-                       location.reference.symbol:=current_library.newasmsymbol(tvarsym(symtableentry).mangledname);
+                       location.reference.symbol:=objectlibrary.newasmsymbol(tvarsym(symtableentry).mangledname);
                     end
                   { thread variable }
                   else if (vo_is_thread_var in tvarsym(symtableentry).varoptions) then
@@ -133,7 +133,7 @@ implementation
                        { we've to allocate the register before we save the used registers }
                        location.reference.base:=rg.getaddressregister(exprasmlist);
                        rg.saveusedregisters(exprasmlist,pushed,[accumulator]);
-                       reference_reset_symbol(href,current_library.newasmsymbol(tvarsym(symtableentry).mangledname),0);
+                       reference_reset_symbol(href,objectlibrary.newasmsymbol(tvarsym(symtableentry).mangledname),0);
                        cg.a_param_ref(exprasmlist,OS_ADDR,href,paramanager.getintparaloc(1));
                        { the called procedure isn't allowed to change }
                        { any register except EAX                    }
@@ -215,7 +215,7 @@ implementation
                                  globalsymtable,
                                  staticsymtable :
                                    begin
-                                     location.reference.symbol:=current_library.newasmsymbol(tvarsym(symtableentry).mangledname);
+                                     location.reference.symbol:=objectlibrary.newasmsymbol(tvarsym(symtableentry).mangledname);
                                    end;
                                  stt_exceptsymtable:
                                    begin
@@ -225,7 +225,7 @@ implementation
                                  objectsymtable:
                                    begin
                                       if (sp_static in tvarsym(symtableentry).symoptions) then
-                                        location.reference.symbol:=current_library.newasmsymbol(tvarsym(symtableentry).mangledname)
+                                        location.reference.symbol:=objectlibrary.newasmsymbol(tvarsym(symtableentry).mangledname)
                                       else
                                         begin
                                            rg.getexplicitregisterint(exprasmlist,SELF_POINTER_REG);
@@ -352,7 +352,7 @@ implementation
                             if freereg then
                              rg.ungetregisterint(exprasmlist,hregister);
                             { load address of the function }
-                            reference_reset_symbol(href,current_library.newasmsymbol(tprocdef(resulttype.def).mangledname),0);
+                            reference_reset_symbol(href,objectlibrary.newasmsymbol(tprocdef(resulttype.def).mangledname),0);
                             hregister:=cg.get_scratch_reg_address(exprasmlist);
                             cg.a_loadaddr_ref_reg(exprasmlist,href,hregister);
                             cg.a_load_reg_ref(exprasmlist,OS_ADDR,hregister,location.reference);
@@ -362,12 +362,12 @@ implementation
                   else
                     begin
                        {!!!!! Be aware, work on virtual methods too }
-                       location.reference.symbol:=current_library.newasmsymbol(tprocdef(resulttype.def).mangledname);
+                       location.reference.symbol:=objectlibrary.newasmsymbol(tprocdef(resulttype.def).mangledname);
                     end;
                end;
             typedconstsym :
                begin
-                  location.reference.symbol:=current_library.newasmsymbol(ttypedconstsym(symtableentry).mangledname);
+                  location.reference.symbol:=objectlibrary.newasmsymbol(ttypedconstsym(symtableentry).mangledname);
                end;
             else internalerror(4);
          end;
@@ -391,8 +391,8 @@ implementation
       begin
         otlabel:=truelabel;
         oflabel:=falselabel;
-        current_library.getlabel(truelabel);
-        current_library.getlabel(falselabel);
+        objectlibrary.getlabel(truelabel);
+        objectlibrary.getlabel(falselabel);
 
         {
           in most cases we can process first the right node which contains
@@ -614,7 +614,7 @@ implementation
               LOC_JUMP :
                 begin
                   cgsize:=def_cgsize(left.resulttype.def);
-                  current_library.getlabel(hlabel);
+                  objectlibrary.getlabel(hlabel);
                   { generate the leftnode for the true case, and
                     release the location }
                   cg.a_label(exprasmlist,truelabel);
@@ -929,7 +929,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.19  2002-08-11 13:24:12  peter
+  Revision 1.20  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.19  2002/08/11 13:24:12  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 10 - 7
compiler/ncgmem.pas

@@ -107,7 +107,7 @@ implementation
          location_reset(location,LOC_REGISTER,OS_ADDR);
          location.register:=rg.getregisterint(exprasmlist);
          cg.a_load_sym_ofs_reg(exprasmlist,
-           current_library.newasmsymbol(tobjectdef(tclassrefdef(resulttype.def).pointertype.def).vmt_mangledname),
+           objectlibrary.newasmsymbol(tobjectdef(tclassrefdef(resulttype.def).pointertype.def).vmt_mangledname),
            0,location.register);
       end;
 
@@ -407,8 +407,8 @@ implementation
                   if (cs_debuginfo in aktmoduleswitches) then
                     begin
                       inc(withlevel);
-                      current_library.getaddrlabel(withstartlabel);
-                      current_library.getaddrlabel(withendlabel);
+                      objectlibrary.getaddrlabel(withstartlabel);
+                      objectlibrary.getaddrlabel(withendlabel);
                       cg.a_label(exprasmlist,withstartlabel);
                       withdebugList.concat(Tai_stabs.Create(strpnew(
                          '"with'+tostr(withlevel)+':'+tostr(symtablestack.getnewtypecount)+
@@ -749,9 +749,9 @@ implementation
               if isjump then
                begin
                  otl:=truelabel;
-                 current_library.getlabel(truelabel);
+                 objectlibrary.getlabel(truelabel);
                  ofl:=falselabel;
-                 current_library.getlabel(falselabel);
+                 objectlibrary.getlabel(falselabel);
                end;
               maybe_save(exprasmlist,right.registers32,location,pushedregs);
               secondpass(right);
@@ -775,7 +775,7 @@ implementation
                         firstpass(hightree);
                         secondpass(hightree);
                         location_release(exprasmlist,hightree.location);
-                        reference_reset_symbol(href,current_library.newasmsymbol(tarraydef(left.resulttype.def).getrangecheckstring),4);
+                        reference_reset_symbol(href,objectlibrary.newasmsymbol(tarraydef(left.resulttype.def).getrangecheckstring),4);
                         cg.a_load_loc_ref(exprasmlist,hightree.location,href);
                         hightree.free;
                         hightree:=nil;
@@ -875,7 +875,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.22  2002-08-11 13:24:12  peter
+  Revision 1.23  2002-08-11 14:32:26  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.22  2002/08/11 13:24:12  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 12 - 9
compiler/ncgset.pas

@@ -283,7 +283,7 @@ implementation
          if genjumps then
           begin
             { Get a label to jump to the end }
-            current_library.getlabel(l);
+            objectlibrary.getlabel(l);
 
             { clear the register value, indicating result is FALSE }
             cg.a_load_const_reg(exprasmlist,OS_INT,0,location.register);
@@ -378,7 +378,7 @@ implementation
               end;
              { To compensate for not doing a second pass }
              right.location.reference.symbol:=nil;
-             current_library.getlabel(l3);
+             objectlibrary.getlabel(l3);
              cg.a_jmp_always(exprasmlist,l3);
              { Now place the end label if IN success }
              cg.a_label(exprasmlist,l);
@@ -507,8 +507,8 @@ implementation
                   { this section has not been tested!    }
                   { can it actually occur currently? CEC }
                   { yes: "if bytevar in [1,3,5,7,9,11,13,15]" (JM) }
-                  current_library.getlabel(l);
-                  current_library.getlabel(l2);
+                  objectlibrary.getlabel(l);
+                  objectlibrary.getlabel(l2);
 
                   case left.location.loc of
                      LOC_REGISTER,
@@ -812,8 +812,8 @@ implementation
          dist : cardinal;
          hp : tnode;
       begin
-         current_library.getlabel(endlabel);
-         current_library.getlabel(elselabel);
+         objectlibrary.getlabel(endlabel);
+         objectlibrary.getlabel(elselabel);
          with_sign:=is_signed(left.resulttype.def);
          if with_sign then
            begin
@@ -833,9 +833,9 @@ implementation
          if left.location.loc=LOC_JUMP then
           begin
             otl:=truelabel;
-            current_library.getlabel(truelabel);
+            objectlibrary.getlabel(truelabel);
             ofl:=falselabel;
-            current_library.getlabel(falselabel);
+            objectlibrary.getlabel(falselabel);
             isjump:=true;
           end;
          secondpass(left);
@@ -956,7 +956,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.15  2002-08-11 13:24:12  peter
+  Revision 1.16  2002-08-11 14:32:27  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.15  2002/08/11 13:24:12  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 16 - 13
compiler/ncgutil.pas

@@ -295,7 +295,7 @@ implementation
                   begin
                     cg.a_label(list,truelabel);
                     cg.a_load_const_reg(list,OS_INT,1,hregister);
-                    current_library.getlabel(hl);
+                    objectlibrary.getlabel(hl);
                     cg.a_jmp_always(list,hl);
                     cg.a_label(list,falselabel);
                     cg.a_load_const_reg(list,OS_INT,0,hregister);
@@ -383,7 +383,7 @@ implementation
                begin
                  cg.a_label(list,truelabel);
                  cg.a_load_const_reg(list,dst_size,1,hregister);
-                 current_library.getlabel(hl);
+                 objectlibrary.getlabel(hl);
                  cg.a_jmp_always(list,hl);
                  cg.a_label(list,falselabel);
                  cg.a_load_const_reg(list,dst_size,0,hregister);
@@ -437,7 +437,7 @@ implementation
                   begin
                     cg.a_label(list,truelabel);
                     cg.a_load_const_reg(list,OS_INT,1,hregister);
-                    current_library.getlabel(hl);
+                    objectlibrary.getlabel(hl);
                     cg.a_jmp_always(list,hl);
                     cg.a_label(list,falselabel);
                     cg.a_load_const_reg(list,OS_INT,0,hregister);
@@ -475,7 +475,7 @@ implementation
                begin
                  cg.a_label(list,truelabel);
                  cg.a_load_const_reg(list,dst_size,1,hregister);
-                 current_library.getlabel(hl);
+                 objectlibrary.getlabel(hl);
                  cg.a_jmp_always(list,hl);
                  cg.a_label(list,falselabel);
                  cg.a_load_const_reg(list,dst_size,0,hregister);
@@ -869,7 +869,7 @@ implementation
            (vo_is_thread_var in tvarsym(p).varoptions) then
          begin
            cg.a_param_const(list,OS_INT,tvarsym(p).getsize,paramanager.getintparaloc(2));
-           reference_reset_symbol(href,current_library.newasmsymbol(tvarsym(p).mangledname),0);
+           reference_reset_symbol(href,objectlibrary.newasmsymbol(tvarsym(p).mangledname),0);
            cg.a_paramaddr_ref(list,href,paramanager.getintparaloc(1));
            rg.saveregvars(list,all_registers);
            cg.a_call_name(list,'FPC_INIT_THREADVAR');
@@ -894,7 +894,7 @@ implementation
            if tsym(p).owner.symtabletype in [localsymtable,inlinelocalsymtable] then
             reference_reset_base(href,procinfo^.framepointer,-tvarsym(p).address+tvarsym(p).owner.address_fixup)
            else
-            reference_reset_symbol(href,current_library.newasmsymbol(tvarsym(p).mangledname),0);
+            reference_reset_symbol(href,objectlibrary.newasmsymbol(tvarsym(p).mangledname),0);
            cg.g_initialize(list,tvarsym(p).vartype.def,href,false);
          end;
       end;
@@ -915,7 +915,7 @@ implementation
            if tsym(p).owner.symtabletype in [localsymtable,inlinelocalsymtable] then
             reference_reset_base(href,procinfo^.framepointer,-tvarsym(p).address+tvarsym(p).owner.address_fixup)
            else
-            reference_reset_symbol(href,current_library.newasmsymbol(tvarsym(p).mangledname),0);
+            reference_reset_symbol(href,objectlibrary.newasmsymbol(tvarsym(p).mangledname),0);
            cg.g_finalize(list,tvarsym(p).vartype.def,href,false);
          end;
       end;
@@ -1413,7 +1413,7 @@ implementation
           begin
              { the exception helper routines modify all registers }
              aktprocdef.usedregisters:=all_registers;
-             current_library.getlabel(noreraiselabel);
+             objectlibrary.getlabel(noreraiselabel);
              free_exception(list,
                   procinfo^.exception_jmp_ref,
                   procinfo^.exception_env_ref,
@@ -1427,7 +1427,7 @@ implementation
                        pd:=procinfo^._class.searchdestructor;
                        if assigned(pd) then
                          begin
-                            current_library.getlabel(nodestroycall);
+                            objectlibrary.getlabel(nodestroycall);
                             reference_reset_base(href,procinfo^.framepointer,procinfo^.selfpointer_offset);
                             cg.a_cmp_const_ref_label(list,OS_ADDR,OC_EQ,0,href,nodestroycall);
                             if is_class(procinfo^._class) then
@@ -1438,7 +1438,7 @@ implementation
                             else if is_object(procinfo^._class) then
                              begin
                                cg.a_param_reg(list,OS_ADDR,self_pointer_reg,paramanager.getintparaloc(2));
-                               reference_reset_symbol(href,current_library.newasmsymbol(procinfo^._class.vmt_mangledname),0);
+                               reference_reset_symbol(href,objectlibrary.newasmsymbol(procinfo^._class.vmt_mangledname),0);
                                cg.a_paramaddr_ref(list,href,paramanager.getintparaloc(1));
                              end
                             else
@@ -1500,7 +1500,7 @@ implementation
                 { successful constructor deletes the zero flag }
                 { and returns self in eax                   }
                 { eax must be set to zero if the allocation failed !!! }
-                current_library.getlabel(okexitlabel);
+                objectlibrary.getlabel(okexitlabel);
                 cg.a_jmp_always(list,okexitlabel);
                 cg.a_label(list,faillabel);
                 cg.g_call_fail_helper(list);
@@ -1529,7 +1529,7 @@ implementation
 {$ifdef GDB}
         if ((cs_debuginfo in aktmoduleswitches) and not inlined) then
           begin
-            current_library.getlabel(stabsendlabel);
+            objectlibrary.getlabel(stabsendlabel);
             cg.a_label(list,stabsendlabel);
           end;
 {$endif GDB}
@@ -1705,7 +1705,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.32  2002-08-11 13:24:12  peter
+  Revision 1.33  2002-08-11 14:32:27  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.32  2002/08/11 13:24:12  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 14 - 11
compiler/nobj.pas

@@ -273,7 +273,7 @@ implementation
     procedure tclassheader.writenames(p : pprocdeftree);
 
       begin
-         current_library.getdatalabel(p^.nl);
+         objectlibrary.getdatalabel(p^.nl);
          if assigned(p^.l) then
            writenames(p^.l);
          dataSegment.concat(Tai_label.Create(p^.nl));
@@ -312,7 +312,7 @@ implementation
            writenames(root);
 
          { now start writing of the message string table }
-         current_library.getdatalabel(r);
+         objectlibrary.getdatalabel(r);
          dataSegment.concat(Tai_label.Create(r));
          genstrmsgtab:=r;
          dataSegment.concat(Tai_const.Create_32bit(count));
@@ -348,7 +348,7 @@ implementation
          _class.symtable.foreach({$ifdef FPCPROCVAR}@{$endif}insertmsgint,nil);
 
          { now start writing of the message string table }
-         current_library.getdatalabel(r);
+         objectlibrary.getdatalabel(r);
          dataSegment.concat(Tai_label.Create(r));
          genintmsgtab:=r;
          dataSegment.concat(Tai_const.Create_32bit(count));
@@ -424,7 +424,7 @@ implementation
 
          if count>0 then
            begin
-              current_library.getdatalabel(r);
+              objectlibrary.getdatalabel(r);
               gendmt:=r;
               dataSegment.concat(Tai_label.Create(r));
               { entries for caching }
@@ -466,7 +466,7 @@ implementation
               if assigned(tprocsym(p).defs^.next) then
                 internalerror(1209992);
               hp:=tprocsym(p).defs^.def;
-              current_library.getdatalabel(l);
+              objectlibrary.getdatalabel(l);
 
               Consts.concat(Tai_label.Create(l));
               Consts.concat(Tai_const.Create_8bit(length(p.name)));
@@ -487,7 +487,7 @@ implementation
          _class.symtable.foreach({$ifdef FPCPROCVAR}@{$endif}do_count,nil);
          if count>0 then
            begin
-              current_library.getdatalabel(l);
+              objectlibrary.getdatalabel(l);
               dataSegment.concat(Tai_label.Create(l));
               dataSegment.concat(Tai_const.Create_32bit(count));
               _class.symtable.foreach({$ifdef FPCPROCVAR}@{$endif}genpubmethodtableentry,nil);
@@ -820,7 +820,7 @@ implementation
         if curintf.objecttype in [odt_interfacecom] then
           begin
             { label for GUID }
-            current_library.getdatalabel(tmplabel);
+            objectlibrary.getdatalabel(tmplabel);
             rawdata.concat(Tai_label.Create(tmplabel));
             rawdata.concat(Tai_const.Create_32bit(curintf.iidguid.D1));
             rawdata.concat(Tai_const.Create_16bit(curintf.iidguid.D2));
@@ -839,7 +839,7 @@ implementation
         { IOffset field }
         dataSegment.concat(Tai_const.Create_32bit(implintf.ioffsets(contintfindex)^));
         { IIDStr }
-        current_library.getdatalabel(tmplabel);
+        objectlibrary.getdatalabel(tmplabel);
         rawdata.concat(Tai_label.Create(tmplabel));
         rawdata.concat(Tai_const.Create_8bit(length(curintf.iidstr^)));
         if curintf.objecttype=odt_interfacecom then
@@ -1064,7 +1064,7 @@ implementation
           end;
         { 2. step calc required fieldcount and their offsets in the object memory map
              and write data }
-        current_library.getdatalabel(intftable);
+        objectlibrary.getdatalabel(intftable);
         dataSegment.concat(Tai_label.Create(intftable));
         gintfwritedata;
         _class.implementedinterfaces.clearimplprocs; { release temporary information }
@@ -1177,7 +1177,7 @@ implementation
             methodnametable:=genpublishedmethodstable;
             fieldtablelabel:=_class.generate_field_table;
             { write class name }
-            current_library.getdatalabel(classnamelabel);
+            objectlibrary.getdatalabel(classnamelabel);
             dataSegment.concat(Tai_label.Create(classnamelabel));
             dataSegment.concat(Tai_const.Create_8bit(length(_class.objrealname^)));
             dataSegment.concat(Tai_string.Create(_class.objrealname^));
@@ -1293,7 +1293,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.24  2002-08-11 13:24:12  peter
+  Revision 1.25  2002-08-11 14:32:27  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.24  2002/08/11 13:24:12  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 6 - 3
compiler/pdecl.pas

@@ -250,12 +250,12 @@ implementation
              begin
                 if (cs_create_smart in aktmoduleswitches) then
                   begin
-                    current_library.getdatalabel(hl);
+                    objectlibrary.getdatalabel(hl);
                     { we still want a warning if unused }
                     hl.refs:=0;
                   end
                 else
-                  current_library.getlabel(hl);
+                  objectlibrary.getlabel(hl);
                 if token=_ID then
                  symtablestack.insert(tlabelsym.create(orgpattern,hl))
                 else
@@ -613,7 +613,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.50  2002-08-11 13:24:12  peter
+  Revision 1.51  2002-08-11 14:32:27  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.50  2002/08/11 13:24:12  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/pdecsub.pas

@@ -1840,7 +1840,7 @@ const
                    if aprocdef.has_mangledname then
                     begin
                       { rename also asmsymbol first, because the name can already be used }
-                      current_library.renameasmsymbol(hd.mangledname,aprocdef.mangledname);
+                      objectlibrary.renameasmsymbol(hd.mangledname,aprocdef.mangledname);
                       { update the mangledname }
                       hd.has_mangledname:=true;
                       hd.setmangledname(aprocdef.mangledname);
@@ -1957,7 +1957,10 @@ const
 end.
 {
   $Log$
-  Revision 1.62  2002-08-11 13:24:12  peter
+  Revision 1.63  2002-08-11 14:32:27  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.62  2002/08/11 13:24:12  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 17 - 14
compiler/powerpc/cgcpu.pas

@@ -252,7 +252,7 @@ const
          { calls or cross TOC calls, but currently done always                      }
          reference_reset_base(href,STACK_POINTER_REG,LA_RTOC);
          list.concat(taicpu.op_reg_ref(A_STW,R_TOC,href));
-         list.concat(taicpu.op_sym(A_BL,current_library.newasmsymbol(s)));
+         list.concat(taicpu.op_sym(A_BL,objectlibrary.newasmsymbol(s)));
          reference_reset_base(href,STACK_POINTER_REG,LA_RTOC);
          list.concat(taicpu.op_reg_ref(A_LWZ,R_TOC,href));
          procinfo^.flags:=procinfo^.flags or pi_do_call;
@@ -942,11 +942,11 @@ const
              { save floating-point registers }
              if (cs_create_pic in aktmoduleswitches) and not(usesgpr) then
                begin
-                  list.concat(taicpu.op_sym_ofs(A_BL,current_library.newasmsymbol('_savefpr_'+tostr(ord(firstregfpu)-ord(R_F14)+14)+'_g'),0));
+                  list.concat(taicpu.op_sym_ofs(A_BL,objectlibrary.newasmsymbol('_savefpr_'+tostr(ord(firstregfpu)-ord(R_F14)+14)+'_g'),0));
                   gotgot:=true;
                end
              else
-               list.concat(taicpu.op_sym_ofs(A_BL,current_library.newasmsymbol('_savefpr_'+tostr(ord(firstregfpu)-ord(R_F14)+14)),0));
+               list.concat(taicpu.op_sym_ofs(A_BL,objectlibrary.newasmsymbol('_savefpr_'+tostr(ord(firstregfpu)-ord(R_F14)+14)),0));
              { compute end of gpr save area }
              list.concat(taicpu.op_reg_reg_const(A_ADDI,R_11,R_11,-(ord(R_F31)-ord(firstregfpu)+1)*8));
           end;
@@ -957,11 +957,11 @@ const
              {
              if cs_create_pic in aktmoduleswitches then
                begin
-                  list.concat(taicpu.op_sym_ofs(A_BL,current_library.newasmsymbol('_savegpr_'+tostr(ord(firstreggpr)-ord(R_14)+14)+'_g'),0));
+                  list.concat(taicpu.op_sym_ofs(A_BL,objectlibrary.newasmsymbol('_savegpr_'+tostr(ord(firstreggpr)-ord(R_14)+14)+'_g'),0));
                   gotgot:=true;
                end
              else
-               list.concat(taicpu.op_sym_ofs(A_BL,current_library.newasmsymbol('_savegpr_'+tostr(ord(firstreggpr)-ord(R_14)+14)),0))
+               list.concat(taicpu.op_sym_ofs(A_BL,objectlibrary.newasmsymbol('_savegpr_'+tostr(ord(firstreggpr)-ord(R_14)+14)),0))
              }
              reference_reset_base(href,R_11,-(ord(R_31)-ord(firstreggpr)+1)*4);
              list.concat(taicpu.op_reg_ref(A_STMW,firstreggpr,href));
@@ -1036,7 +1036,7 @@ const
              { restore gprs }
              { at least for now we use LMW }
              {
-             list.concat(taicpu.op_sym_ofs(A_BL,current_library.newasmsymbol('_restgpr_14'),0));
+             list.concat(taicpu.op_sym_ofs(A_BL,objectlibrary.newasmsymbol('_restgpr_14'),0));
              }
              reference_reset_base(href,R_11,-(ord(R_31)-ord(firstreggpr)+1)*4);
              list.concat(taicpu.op_reg_ref(A_LMW,firstreggpr,href));
@@ -1048,11 +1048,11 @@ const
              { address of fpr save area to r11 }
              list.concat(taicpu.op_reg_reg_const(A_ADDI,R_11,R_11,(ord(R_F31)-ord(firstregfpu)+1)*8));
              if (procinfo^.flags and pi_do_call)<>0 then
-               list.concat(taicpu.op_sym_ofs(A_BL,current_library.newasmsymbol('_restfpr_'+tostr(ord(firstregfpu)-ord(R_F14)+14)+
+               list.concat(taicpu.op_sym_ofs(A_BL,objectlibrary.newasmsymbol('_restfpr_'+tostr(ord(firstregfpu)-ord(R_F14)+14)+
                  '_x'),0))
              else
                { leaf node => lr haven't to be restored }
-               list.concat(taicpu.op_sym_ofs(A_BL,current_library.newasmsymbol('_restfpr_'+tostr(ord(firstregfpu)-ord(R_F14)+14)+
+               list.concat(taicpu.op_sym_ofs(A_BL,objectlibrary.newasmsymbol('_restfpr_'+tostr(ord(firstregfpu)-ord(R_F14)+14)+
                  '_l'),0));
              genret:=false;
           end;
@@ -1100,7 +1100,7 @@ const
         a_reg_dealloc(list,R_0);
         { save floating-point registers }
         { !!! has to be optimized: only save registers that are used }
-        list.concat(taicpu.op_sym_ofs(A_BL,current_library.newasmsymbol('_savef14'),0));
+        list.concat(taicpu.op_sym_ofs(A_BL,objectlibrary.newasmsymbol('_savef14'),0));
         { save gprs in gpr save area }
         { !!! has to be optimized: only save registers that are used }
         reference_reset_base(href,STACK_POINTER_REG,-220);
@@ -1294,7 +1294,7 @@ const
             { explicitely allocate R_0 since it can be used safely here }
             { (for holding date that's being copied)                    }
             a_reg_alloc(list,R_F0);
-            current_library.getlabel(lab);
+            objectlibrary.getlabel(lab);
             a_label(list, lab);
             list.concat(taicpu.op_reg_reg_const(A_SUBIC_,countreg,countreg,1));
             list.concat(taicpu.op_reg_ref(A_LFDU,R_F0,src));
@@ -1366,7 +1366,7 @@ const
       begin
          if not(cs_check_overflow in aktlocalswitches) then
           exit;
-         current_library.getlabel(hl);
+         objectlibrary.getlabel(hl);
          if not ((p.resulttype.def.deftype=pointerdef) or
                 ((p.resulttype.def.deftype=orddef) and
                  (torddef(p.resulttype.def).typ in [u64bit,u16bit,u32bit,u8bit,uchar,
@@ -1405,7 +1405,7 @@ const
         reference_reset_base(href,STACK_POINTER_REG,8);
         list.concat(taicpu.op_reg_ref(A_LWZ,R_0,href));
         { ... and return from _restf14 }
-        list.concat(taicpu.op_sym_ofs(A_B,current_library.newasmsymbol('_restf14'),0));
+        list.concat(taicpu.op_sym_ofs(A_B,objectlibrary.newasmsymbol('_restf14'),0));
       end;
 
 
@@ -1561,7 +1561,7 @@ const
         p: taicpu;
 
       begin
-        p := taicpu.op_sym(op,current_library.newasmsymbol(l.name));
+        p := taicpu.op_sym(op,objectlibrary.newasmsymbol(l.name));
         if op <> A_B then
           create_cond_norm(c,crval,p.condition);
         p.is_jmp := true;
@@ -1674,7 +1674,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.39  2002-08-11 13:24:18  peter
+  Revision 1.40  2002-08-11 14:32:32  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.39  2002/08/11 13:24:18  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 10 - 7
compiler/powerpc/nppcadd.pas

@@ -293,9 +293,9 @@ interface
             if isjump then
               begin
                  otl:=truelabel;
-                 current_library.getlabel(truelabel);
+                 objectlibrary.getlabel(truelabel);
                  ofl:=falselabel;
-                 current_library.getlabel(falselabel);
+                 objectlibrary.getlabel(falselabel);
               end;
             secondpass(left);
             if left.location.loc in [LOC_FLAGS,LOC_JUMP] then
@@ -311,9 +311,9 @@ interface
             if isjump then
               begin
                  otl:=truelabel;
-                 current_library.getlabel(truelabel);
+                 objectlibrary.getlabel(truelabel);
                  ofl:=falselabel;
-                 current_library.getlabel(falselabel);
+                 objectlibrary.getlabel(falselabel);
               end;
             secondpass(right);
             maybe_restore(exprasmlist,left.location,pushedregs);
@@ -388,7 +388,7 @@ interface
                    andn :
                      begin
                         otl:=truelabel;
-                        current_library.getlabel(truelabel);
+                        objectlibrary.getlabel(truelabel);
                         secondpass(left);
                         maketojumpbool(exprasmlist,left,lr_load_regvars);
                         cg.a_label(exprasmlist,truelabel);
@@ -397,7 +397,7 @@ interface
                    orn :
                      begin
                         ofl:=falselabel;
-                        current_library.getlabel(falselabel);
+                        objectlibrary.getlabel(falselabel);
                         secondpass(left);
                         maketojumpbool(exprasmlist,left,lr_load_regvars);
                         cg.a_label(exprasmlist,falselabel);
@@ -1302,7 +1302,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.10  2002-08-11 13:24:18  peter
+  Revision 1.11  2002-08-11 14:32:32  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.10  2002/08/11 13:24:18  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 6 - 3
compiler/pstatmnt.pas

@@ -170,7 +170,7 @@ implementation
            hcaselabel^.greater:=nil;
            hcaselabel^.statement:=aktcaselabel;
            hcaselabel^.firstlabel:=first;
-           current_library.getlabel(hcaselabel^._at);
+           objectlibrary.getlabel(hcaselabel^._at);
            hcaselabel^._low:=l;
            hcaselabel^._high:=h;
            insertlabel(root);
@@ -205,7 +205,7 @@ implementation
          root:=nil;
          instruc:=nil;
          repeat
-           current_library.getlabel(aktcaselabel);
+           objectlibrary.getlabel(aktcaselabel);
            firstlabel:=true;
 
            { maybe an instruction has more case labels }
@@ -1142,7 +1142,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.69  2002-08-11 13:24:12  peter
+  Revision 1.70  2002-08-11 14:32:27  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.69  2002/08/11 13:24:12  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 8 - 5
compiler/psub.pas

@@ -233,13 +233,13 @@ implementation
          oldquickexitlabel:=quickexitlabel;
          oldfaillabel:=faillabel;
          { get new labels }
-         current_library.getlabel(aktexitlabel);
-         current_library.getlabel(aktexit2label);
+         objectlibrary.getlabel(aktexitlabel);
+         objectlibrary.getlabel(aktexit2label);
          { exit for fail in constructors }
          if (aktprocdef.proctypeoption=potype_constructor) then
            begin
-             current_library.getlabel(faillabel);
-             current_library.getlabel(quickexitlabel);
+             objectlibrary.getlabel(faillabel);
+             objectlibrary.getlabel(quickexitlabel);
            end;
          { reset break and continue labels }
          block_type:=bt_general;
@@ -814,7 +814,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.65  2002-08-11 13:24:13  peter
+  Revision 1.66  2002-08-11 14:32:27  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.65  2002/08/11 13:24:13  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 9 - 6
compiler/ptconst.pas

@@ -240,7 +240,7 @@ implementation
                       if not(tobjectdef(tclassrefdef(p.resulttype.def).pointertype.def).is_related(
                         tobjectdef(tclassrefdef(t.def).pointertype.def))) then
                         Message(cg_e_illegal_expression);
-                      curconstSegment.concat(Tai_const_symbol.Create(current_library.newasmsymbol(tobjectdef(
+                      curconstSegment.concat(Tai_const_symbol.Create(objectlibrary.newasmsymbol(tobjectdef(
                         tclassrefdef(p.resulttype.def).pointertype.def).vmt_mangledname)));
                    end;
                  niln:
@@ -282,7 +282,7 @@ implementation
                 if is_char(tpointerdef(t.def).pointertype.def) and
                    (p.nodetype<>addrn) then
                   begin
-                    current_library.getdatalabel(ll);
+                    objectlibrary.getdatalabel(ll);
                     curconstSegment.concat(Tai_const_symbol.Create(ll));
                     if p.nodetype=stringconstn then
                      varalign:=size_2_align(tstringconstnode(p).len)
@@ -313,7 +313,7 @@ implementation
                 if is_widechar(tpointerdef(t.def).pointertype.def) and
                    (p.nodetype<>addrn) then
                   begin
-                    current_library.getdatalabel(ll);
+                    objectlibrary.getdatalabel(ll);
                     curconstSegment.concat(Tai_const_symbol.Create(ll));
                     Consts.concat(Tai_label.Create(ll));
                     if (p.nodetype in [stringconstn,ordconstn]) then
@@ -563,7 +563,7 @@ implementation
                           curconstSegment.concat(Tai_const.Create_32bit(0))
                         else
                           begin
-                            current_library.getdatalabel(ll);
+                            objectlibrary.getdatalabel(ll);
                             curconstSegment.concat(Tai_const_symbol.Create(ll));
                             { first write the maximum size }
                             Consts.concat(Tai_const.Create_32bit(strlength));
@@ -590,7 +590,7 @@ implementation
                           curconstSegment.concat(Tai_const.Create_32bit(0))
                         else
                           begin
-                            current_library.getdatalabel(ll);
+                            objectlibrary.getdatalabel(ll);
                             curconstSegment.concat(Tai_const_symbol.Create(ll));
                             Consts.concat(Tai_const.Create_32bit(strlength));
                             Consts.concat(Tai_const.Create_32bit(strlength));
@@ -986,7 +986,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.54  2002-08-11 13:24:13  peter
+  Revision 1.55  2002-08-11 14:32:27  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.54  2002/08/11 13:24:13  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 10 - 7
compiler/rautils.pas

@@ -835,7 +835,7 @@ Begin
             end;
           globalsymtable,
           staticsymtable :
-            opr.ref.symbol:=current_library.newasmsymbol(tvarsym(sym).mangledname);
+            opr.ref.symbol:=objectlibrary.newasmsymbol(tvarsym(sym).mangledname);
           parasymtable :
             begin
               { if we only want the offset we don't have to care
@@ -880,7 +880,7 @@ Begin
           localsymtable :
             begin
               if (vo_is_external in tvarsym(sym).varoptions) then
-                opr.ref.symbol:=current_library.newasmsymbol(tvarsym(sym).mangledname)
+                opr.ref.symbol:=objectlibrary.newasmsymbol(tvarsym(sym).mangledname)
               else
                 begin
                   { if we only want the offset we don't have to care
@@ -941,7 +941,7 @@ Begin
       end;
     typedconstsym :
       begin
-        opr.ref.symbol:=current_library.newasmsymbol(ttypedconstsym(sym).mangledname);
+        opr.ref.symbol:=objectlibrary.newasmsymbol(ttypedconstsym(sym).mangledname);
         case ttypedconstsym(sym).typedconsttype.def.deftype of
           orddef,
           enumdef,
@@ -989,7 +989,7 @@ Begin
           Message(asmr_w_calling_overload_func);
         l:=opr.ref.offset;
         opr.typ:=OPR_SYMBOL;
-        opr.symbol:=current_library.newasmsymbol(tprocsym(sym).defs^.def.mangledname);
+        opr.symbol:=objectlibrary.newasmsymbol(tprocsym(sym).defs^.def.mangledname);
         opr.symofs:=l;
         hasvar:=true;
         SetupVar:=TRUE;
@@ -1010,7 +1010,7 @@ var
   p : tasmsymbol;
 begin
   SetupDirectVar:=false;
-  p:=current_library.getasmsymbol(hs);
+  p:=objectlibrary.getasmsymbol(hs);
   if assigned(p) then
    begin
      opr.ref.symbol:=p;
@@ -1129,7 +1129,7 @@ function TLocalLabel.Gettasmlabel:tasmlabel;
 begin
   if not assigned(lab) then
    begin
-     current_library.getlabel(lab);
+     objectlibrary.getlabel(lab);
      { this label is forced to be used so it's always written }
      inc(lab.refs);
    end;
@@ -1592,7 +1592,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.39  2002-08-11 13:24:13  peter
+  Revision 1.40  2002-08-11 14:32:27  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.39  2002/08/11 13:24:13  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 10 - 7
compiler/symdef.pas

@@ -1103,7 +1103,7 @@ implementation
           begin
             if not assigned(localrttilab[rt]) then
              begin
-               current_library.getdatalabel(localrttilab[rt]);
+               objectlibrary.getdatalabel(localrttilab[rt]);
                write_child_rtti_data(rt);
                if (cs_create_smart in aktmoduleswitches) then
                 rttiList.concat(Tai_cut.Create);
@@ -1523,7 +1523,7 @@ implementation
          if rangenr=0 then
            begin
               { generate two constant for bounds }
-              current_library.getlabelnr(rangenr);
+              objectlibrary.getlabelnr(rangenr);
               if (cs_create_smart in aktmoduleswitches) then
                 dataSegment.concat(Tai_symbol.Createname_global(getrangecheckstring,8))
               else
@@ -1743,7 +1743,7 @@ implementation
               else
                rangechecksize:=16;
               { generate two constant for bounds }
-              current_library.getlabelnr(rangenr);
+              objectlibrary.getlabelnr(rangenr);
               if (cs_create_smart in aktmoduleswitches) then
                 dataSegment.concat(Tai_symbol.Createname_global(getrangecheckstring,rangechecksize))
               else
@@ -2622,7 +2622,7 @@ implementation
          if rangenr=0 then
            begin
               { generates the data for range checking }
-              current_library.getlabelnr(rangenr);
+              objectlibrary.getlabelnr(rangenr);
               if (cs_create_smart in aktmoduleswitches) then
                 dataSegment.concat(Tai_symbol.Createname_global(getrangecheckstring,8))
               else
@@ -4922,8 +4922,8 @@ implementation
 
       begin
          classtablelist:=TLinkedList.Create;
-         current_library.getdatalabel(fieldtable);
-         current_library.getdatalabel(classtable);
+         objectlibrary.getdatalabel(fieldtable);
+         objectlibrary.getdatalabel(classtable);
          count:=0;
          tablecount:=0;
          symtable.foreach({$ifdef FPC}@{$endif}count_published_fields,nil);
@@ -5501,7 +5501,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.87  2002-08-11 13:24:13  peter
+  Revision 1.88  2002-08-11 14:32:28  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.87  2002/08/11 13:24:13  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 6 - 3
compiler/symppu.pas

@@ -401,8 +401,8 @@ implementation
       begin
         if s.ppuidx=-1 then
          begin
-           s.ppuidx:=current_library.asmsymbolppuidx;
-           inc(current_library.asmsymbolppuidx);
+           s.ppuidx:=objectlibrary.asmsymbolppuidx;
+           inc(objectlibrary.asmsymbolppuidx);
          end;
         putlongint(s.ppuidx);
       end;
@@ -411,7 +411,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.13  2002-08-11 13:24:14  peter
+  Revision 1.14  2002-08-11 14:32:28  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.13  2002/08/11 13:24:14  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/symsym.pas

@@ -2592,7 +2592,7 @@ implementation
       begin
         { the label is always a global label }
         if not assigned(lab) then
-         lab:=current_library.newasmsymboltype(mangledname,AB_GLOBAL,AT_DATA);
+         lab:=objectlibrary.newasmsymboltype(mangledname,AB_GLOBAL,AT_DATA);
         get_label:=lab;
       end;
 
@@ -2672,7 +2672,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.47  2002-08-11 13:24:14  peter
+  Revision 1.48  2002-08-11 14:32:28  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.47  2002/08/11 13:24:14  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/targets/t_beos.pas

@@ -172,7 +172,7 @@ begin
            { place jump in codesegment }
            codesegment.concat(Tai_align.Create_op(4,$90));
            codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
-           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,current_library.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
+           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
            codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
 {$endif i386}
          end;
@@ -465,7 +465,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.21  2002-08-11 13:24:19  peter
+  Revision 1.22  2002-08-11 14:32:32  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.21  2002/08/11 13:24:19  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/targets/t_fbsd.pas

@@ -174,7 +174,7 @@ begin
            { place jump in codesegment }
            codesegment.concat(Tai_align.Create_op(4,$90));
            codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
-           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,current_library.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
+           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
            codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
 {$endif i386}
          end;
@@ -514,7 +514,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.26  2002-08-11 13:24:19  peter
+  Revision 1.27  2002-08-11 14:32:32  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.26  2002/08/11 13:24:19  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/targets/t_linux.pas

@@ -181,7 +181,7 @@ begin
            { place jump in codesegment }
            codesegment.concat(Tai_align.Create_op(4,$90));
            codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
-           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,current_library.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
+           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
            codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
 {$endif i386}
          end;
@@ -524,7 +524,10 @@ end.
 
 {
   $Log$
-  Revision 1.30  2002-08-11 13:24:19  peter
+  Revision 1.31  2002-08-11 14:32:32  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.30  2002/08/11 13:24:19  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/targets/t_nwm.pas

@@ -239,7 +239,7 @@ begin
            { place jump in codesegment }
            codesegment.concat(Tai_align.Create_op(4,$90));
            codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
-           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,current_library.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
+           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
            codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
 {$endif i386}
          end;
@@ -484,7 +484,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.27  2002-08-11 13:24:20  peter
+  Revision 1.28  2002-08-11 14:32:32  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.27  2002/08/11 13:24:20  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 5 - 2
compiler/targets/t_sunos.pas

@@ -188,7 +188,7 @@ begin
            { place jump in codesegment }
            codesegment.concat(Tai_align.Create_op(4,$90));
            codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
-           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,current_library.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
+           codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
            codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
 {$endif i386}
          end;
@@ -486,7 +486,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.26  2002-08-11 13:24:20  peter
+  Revision 1.27  2002-08-11 14:32:32  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.26  2002/08/11 13:24:20  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 25 - 22
compiler/targets/t_win32.pas

@@ -249,10 +249,10 @@ const
          while assigned(hp1) do
            begin
            { Get labels for the sections }
-             current_library.getdatalabel(lhead);
-             current_library.getdatalabel(lname);
-             current_library.getaddrlabel(lidata4);
-             current_library.getaddrlabel(lidata5);
+             objectlibrary.getdatalabel(lhead);
+             objectlibrary.getdatalabel(lname);
+             objectlibrary.getaddrlabel(lidata4);
+             objectlibrary.getaddrlabel(lidata5);
            { create header for this importmodule }
              importsSection.concat(Tai_cut.Create_begin);
              importsSection.concat(Tai_section.Create(sec_idata2));
@@ -284,7 +284,7 @@ const
                  { create indirect jump }
                  if not hp2.is_var then
                   begin
-                    current_library.getlabel(lcode);
+                    objectlibrary.getlabel(lcode);
                     reference_reset_symbol(href,lcode,0);
                     { place jump in codesegment, insert a code section in the
                       imporTSection to reduce the amount of .s files (PFV) }
@@ -301,7 +301,7 @@ const
                  importsSection.concat(Tai_section.Create(sec_idata7));
                  importsSection.concat(Tai_const_symbol.Create_rva(lhead));
                  { fixup }
-                 current_library.getlabel(tasmlabel(hp2.lab));
+                 objectlibrary.getlabel(tasmlabel(hp2.lab));
                  importsSection.concat(Tai_section.Create(sec_idata4));
                  importsSection.concat(Tai_const_symbol.Create_rva(hp2.lab));
                  { add jump field to imporTSection }
@@ -317,7 +317,7 @@ const
                       begin
                         importname:='__imp_'+hp2.name^;
                         suffix:=0;
-                        while assigned(current_library.getasmsymbol(importname)) do
+                        while assigned(objectlibrary.getasmsymbol(importname)) do
                          begin
                            inc(suffix);
                            importname:='__imp_'+hp2.name^+'_'+tostr(suffix);
@@ -328,7 +328,7 @@ const
                       begin
                         importname:='__imp_by_ordinal'+tostr(hp2.ordnr);
                         suffix:=0;
-                        while assigned(current_library.getasmsymbol(importname)) do
+                        while assigned(objectlibrary.getasmsymbol(importname)) do
                          begin
                            inc(suffix);
                            importname:='__imp_by_ordinal'+tostr(hp2.ordnr)+'_'+tostr(suffix);
@@ -391,9 +391,9 @@ const
               importsSection.concat(Tai_section.Create(sec_code));
               importsSection.concat(Tai_align.Create_op(4,$90));
               { Get labels for the sections }
-              current_library.getlabel(l1);
-              current_library.getlabel(l2);
-              current_library.getlabel(l3);
+              objectlibrary.getlabel(l1);
+              objectlibrary.getlabel(l2);
+              objectlibrary.getlabel(l3);
               importsSection.concat(Tai_section.Create(sec_idata2));
               { pointer to procedure names }
               importsSection.concat(Tai_const_symbol.Create_rva(l2));
@@ -415,7 +415,7 @@ const
               hp2:=timported_item(hp1.imported_items.first);
               while assigned(hp2) do
                 begin
-                   current_library.getlabel(tasmlabel(hp2.lab));
+                   objectlibrary.getlabel(tasmlabel(hp2.lab));
                    if hp2.name^<>'' then
                      importsSection.concat(Tai_const_symbol.Create_rva(hp2.lab))
                    else
@@ -433,7 +433,7 @@ const
                 begin
                    if not hp2.is_var then
                     begin
-                      current_library.getlabel(l4);
+                      objectlibrary.getlabel(l4);
                       { create indirect jump }
                       reference_reset_symbol(href,l4,0);
                       { place jump in codesegment }
@@ -450,7 +450,7 @@ const
                           begin
                             importname:='__imp_'+hp2.name^;
                             suffix:=0;
-                            while assigned(current_library.getasmsymbol(importname)) do
+                            while assigned(objectlibrary.getasmsymbol(importname)) do
                              begin
                                inc(suffix);
                                importname:='__imp_'+hp2.name^+'_'+tostr(suffix);
@@ -461,7 +461,7 @@ const
                           begin
                             importname:='__imp_by_ordinal'+tostr(hp2.ordnr);
                             suffix:=0;
-                            while assigned(current_library.getasmsymbol(importname)) do
+                            while assigned(objectlibrary.getasmsymbol(importname)) do
                              begin
                                inc(suffix);
                                importname:='__imp_by_ordinal'+tostr(hp2.ordnr)+'_'+tostr(suffix);
@@ -513,7 +513,7 @@ const
          if not(assigned(exportssection)) then
            exportssection:=TAAsmoutput.create;
          last_index:=0;
-         current_library.getdatalabel(edatalabel);
+         objectlibrary.getdatalabel(edatalabel);
       end;
 
 
@@ -609,10 +609,10 @@ const
          ordinal_min:=$7FFFFFFF;
          entries:=0;
          named_entries:=0;
-         current_library.getlabel(dll_name_label);
-         current_library.getlabel(export_address_table);
-         current_library.getlabel(export_name_table_pointers);
-         current_library.getlabel(export_ordinal_table);
+         objectlibrary.getlabel(dll_name_label);
+         objectlibrary.getlabel(export_address_table);
+         objectlibrary.getlabel(export_name_table_pointers);
+         objectlibrary.getlabel(export_ordinal_table);
 
          { count entries }
          while assigned(hp) do
@@ -684,7 +684,7 @@ const
            begin
               if (hp.options and eo_name)<>0 then
                 begin
-                   current_library.getlabel(name_label);
+                   objectlibrary.getlabel(name_label);
                    name_table_pointers.concat(Tai_const_symbol.Create_rva(name_label));
                    ordinal_table.concat(Tai_const.Create_16bit(hp.index-ordinal_base));
                    name_table.concat(Tai_align.Create_op(2,0));
@@ -1553,7 +1553,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.37  2002-08-11 13:24:20  peter
+  Revision 1.38  2002-08-11 14:32:32  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.37  2002/08/11 13:24:20  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which

+ 11 - 8
compiler/x86/cgx86.pas

@@ -401,7 +401,7 @@ unit cgx86;
     procedure tcgx86.a_call_name(list : taasmoutput;const s : string);
 
       begin
-        list.concat(taicpu.op_sym(A_CALL,S_NO,current_library.newasmsymbol(s)));
+        list.concat(taicpu.op_sym(A_CALL,S_NO,objectlibrary.newasmsymbol(s)));
       end;
 
     procedure tcgx86.a_call_ref(list : taasmoutput;const ref : treference);
@@ -1268,8 +1268,8 @@ unit cgx86;
         { so we have to access every page first              }
         if target_info.system=system_i386_win32 then
           begin
-             current_library.getlabel(again);
-             current_library.getlabel(ok);
+             objectlibrary.getlabel(again);
+             objectlibrary.getlabel(ok);
              a_label(list,again);
              list.concat(Taicpu.op_const_reg(A_CMP,S_L,winstackpagesize,R_EDI));
              a_jmp_cond(list,OC_B,ok);
@@ -1401,7 +1401,7 @@ unit cgx86;
            system_i386_wdosx,
            system_i386_linux:
              begin
-                current_library.getaddrlabel(pl);
+                objectlibrary.getaddrlabel(pl);
                 list.concat(Tai_section.Create(sec_data));
                 list.concat(Tai_align.Create(4));
                 list.concat(Tai_label.Create(pl));
@@ -1448,7 +1448,7 @@ unit cgx86;
                  end
                else
                  begin
-                    current_library.getlabel(again);
+                    objectlibrary.getlabel(again);
                     rg.getexplicitregisterint(list,R_EDI);
                     list.concat(Taicpu.op_const_reg(A_MOV,S_L,localsize div winstackpagesize,R_EDI));
                     a_label(list,again);
@@ -1531,7 +1531,7 @@ unit cgx86;
            { must the object be finalized ? }
            if procinfo^._class.needs_inittable then
             begin
-              current_library.getlabel(nofinal);
+              objectlibrary.getlabel(nofinal);
               reference_reset_base(href,R_EBP,8);
               a_cmp_const_ref_label(list,OS_ADDR,OC_EQ,0,href,nofinal);
               reference_reset_base(href,R_ESI,0);
@@ -1630,7 +1630,7 @@ unit cgx86;
       begin
          if not(cs_check_overflow in aktlocalswitches) then
           exit;
-         current_library.getlabel(hl);
+         objectlibrary.getlabel(hl);
          if not ((p.resulttype.def.deftype=pointerdef) or
                 ((p.resulttype.def.deftype=orddef) and
                  (torddef(p.resulttype.def).typ in [u64bit,u16bit,u32bit,u8bit,uchar,
@@ -1651,7 +1651,10 @@ unit cgx86;
 end.
 {
   $Log$
-  Revision 1.8  2002-08-11 13:24:20  peter
+  Revision 1.9  2002-08-11 14:32:33  peter
+    * renamed current_library to objectlibrary
+
+  Revision 1.8  2002/08/11 13:24:20  peter
     * saving of asmsymbols in ppu supported
     * asmsymbollist global is removed and moved into a new class
       tasmlibrarydata that will hold the info of a .a file which