فهرست منبع

* change TObjData.sectiontype2options to a class function so that it can be called without an instance of TObjData

git-svn-id: trunk@43265 -
svenbarth 5 سال پیش
والد
کامیت
e5de269664
4فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 2 2
      compiler/ogbase.pas
  2. 2 2
      compiler/ogcoff.pas
  3. 2 2
      compiler/ogmacho.pas
  4. 2 2
      compiler/ogomf.pas

+ 2 - 2
compiler/ogbase.pas

@@ -395,7 +395,7 @@ interface
        destructor  destroy;override;
        destructor  destroy;override;
        { Sections }
        { Sections }
        function  sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;virtual;abstract;
        function  sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;virtual;abstract;
-       function  sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;virtual;
+       class function sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;virtual;
        function  sectiontype2align(atype:TAsmSectiontype):longint;virtual;
        function  sectiontype2align(atype:TAsmSectiontype):longint;virtual;
        function  createsection(atype:TAsmSectionType;const aname:string='';aorder:TAsmSectionOrder=secorder_default):TObjSection;virtual;
        function  createsection(atype:TAsmSectionType;const aname:string='';aorder:TAsmSectionOrder=secorder_default):TObjSection;virtual;
        function  createsection(atype:TAsmSectionType;secflags:TSectionFlags;aprogbits:TSectionProgbits;const aname:string='';aorder:TAsmSectionOrder=secorder_default):TObjSection;virtual;
        function  createsection(atype:TAsmSectionType;secflags:TSectionFlags;aprogbits:TSectionProgbits;const aname:string='';aorder:TAsmSectionOrder=secorder_default):TObjSection;virtual;
@@ -1201,7 +1201,7 @@ implementation
       end;
       end;
 
 
 
 
-    function TObjData.sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;
+    class function TObjData.sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;
       const
       const
         secoptions : array[TAsmSectiontype] of TObjSectionOptions = ([],
         secoptions : array[TAsmSectiontype] of TObjSectionOptions = ([],
           {user} [oso_Data,oso_load,oso_write],
           {user} [oso_Data,oso_load,oso_write],

+ 2 - 2
compiler/ogcoff.pas

@@ -133,7 +133,7 @@ interface
          constructor createcoff(const n:string;awin32:boolean;acObjSection:TObjSectionClass);
          constructor createcoff(const n:string;awin32:boolean;acObjSection:TObjSectionClass);
          procedure CreateDebugSections;override;
          procedure CreateDebugSections;override;
          function  sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
          function  sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
-         function  sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;override;
+         class function sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;override;
          procedure writereloc(data:aint;len:aword;p:TObjSymbol;reloctype:TObjRelocationType);override;
          procedure writereloc(data:aint;len:aword;p:TObjSymbol;reloctype:TObjRelocationType);override;
        end;
        end;
 
 
@@ -1126,7 +1126,7 @@ const pemagic : array[0..3] of byte = (
       end;
       end;
 
 
 
 
-    function TCoffObjData.sectiontype2options(aType:TAsmSectionType): TObjSectionOptions;
+    class function TCoffObjData.sectiontype2options(aType:TAsmSectionType): TObjSectionOptions;
       begin
       begin
         if (aType in [sec_rodata,sec_rodata_norel]) then
         if (aType in [sec_rodata,sec_rodata_norel]) then
           begin
           begin

+ 2 - 2
compiler/ogmacho.pas

@@ -75,7 +75,7 @@ type
         procedure CreateDebugSections; override;
         procedure CreateDebugSections; override;
         function sectionname(atype:TAsmSectiontype; const aname:string; aorder:TAsmSectionOrder):string;override;
         function sectionname(atype:TAsmSectiontype; const aname:string; aorder:TAsmSectionOrder):string;override;
         function sectiontype2align(atype:TAsmSectiontype):longint;override;
         function sectiontype2align(atype:TAsmSectiontype):longint;override;
-        function sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;override;
+        class function sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;override;
         procedure writereloc(data:aint; len:aword; p:TObjSymbol; reltype:TObjRelocationType);override;
         procedure writereloc(data:aint; len:aword; p:TObjSymbol; reltype:TObjRelocationType);override;
       public
       public
       end;
       end;
@@ -344,7 +344,7 @@ uses
     end;
     end;
 
 
 
 
-  function TmachoObjData.sectiontype2options(atype: TAsmSectiontype): TObjSectionOptions;
+  class function TmachoObjData.sectiontype2options(atype: TAsmSectiontype): TObjSectionOptions;
     begin
     begin
       case atype of
       case atype of
         sec_objc_meth_var_names,
         sec_objc_meth_var_names,

+ 2 - 2
compiler/ogomf.pas

@@ -128,7 +128,7 @@ interface
       public
       public
         constructor create(const n:string);override;
         constructor create(const n:string);override;
         destructor destroy;override;
         destructor destroy;override;
-        function sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;override;
+        class function sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;override;
         function sectiontype2align(atype:TAsmSectiontype):longint;override;
         function sectiontype2align(atype:TAsmSectiontype):longint;override;
         function sectiontype2class(atype:TAsmSectiontype):string;
         function sectiontype2class(atype:TAsmSectiontype):string;
         function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
         function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
@@ -1070,7 +1070,7 @@ implementation
         inherited destroy;
         inherited destroy;
       end;
       end;
 
 
-    function TOmfObjData.sectiontype2options(atype: TAsmSectiontype): TObjSectionOptions;
+    class function TOmfObjData.sectiontype2options(atype: TAsmSectiontype): TObjSectionOptions;
       begin
       begin
         Result:=inherited sectiontype2options(atype);
         Result:=inherited sectiontype2options(atype);
         { in the huge memory model, BSS data is actually written in the regular
         { in the huge memory model, BSS data is actually written in the regular