Prechádzať zdrojové kódy

* changed hlcgobj.def2reg() into a class method so it can also be called
when there's no instantiated tlhcg

git-svn-id: branches/hlcgllvm@28115 -

Jonas Maebe 11 rokov pred
rodič
commit
bf617cb389
2 zmenil súbory, kde vykonal 4 pridanie a 4 odobranie
  1. 2 2
      compiler/hlcgobj.pas
  2. 2 2
      compiler/jvm/hlcgcpu.pas

+ 2 - 2
compiler/hlcgobj.pas

@@ -106,7 +106,7 @@ unit hlcgobj;
              check whether this is actually possible, but if it's loaded in a register
              check whether this is actually possible, but if it's loaded in a register
              by the compiler for any purpose other than parameter passing/function
              by the compiler for any purpose other than parameter passing/function
              result loading, this is the register type used }
              result loading, this is the register type used }
-          function def2regtyp(def: tdef): tregistertype; virtual;
+          class function def2regtyp(def: tdef): tregistertype; virtual;
 
 
           {# Returns a reference with its base address set from a pointer that
           {# Returns a reference with its base address set from a pointer that
              has been loaded in a register.
              has been loaded in a register.
@@ -723,7 +723,7 @@ implementation
       cg.translate_register(reg);
       cg.translate_register(reg);
     end;
     end;
 
 
-  function thlcgobj.def2regtyp(def: tdef): tregistertype;
+  class function thlcgobj.def2regtyp(def: tdef): tregistertype;
     begin
     begin
         case def.typ of
         case def.typ of
           enumdef,
           enumdef,

+ 2 - 2
compiler/jvm/hlcgcpu.pas

@@ -47,7 +47,7 @@ uses
       procedure incstack(list : TAsmList;slots: longint);
       procedure incstack(list : TAsmList;slots: longint);
       procedure decstack(list : TAsmList;slots: longint);
       procedure decstack(list : TAsmList;slots: longint);
 
 
-      function def2regtyp(def: tdef): tregistertype; override;
+      class function def2regtyp(def: tdef): tregistertype; override;
 
 
       procedure a_load_const_cgpara(list : TAsmList;tosize : tdef;a : tcgint;const cgpara : TCGPara);override;
       procedure a_load_const_cgpara(list : TAsmList;tosize : tdef;a : tcgint;const cgpara : TCGPara);override;
 
 
@@ -288,7 +288,7 @@ implementation
         list.concat(tai_comment.Create(strpnew('    freed '+tostr(slots)+', stack height = '+tostr(fevalstackheight))));
         list.concat(tai_comment.Create(strpnew('    freed '+tostr(slots)+', stack height = '+tostr(fevalstackheight))));
     end;
     end;
 
 
-  function thlcgjvm.def2regtyp(def: tdef): tregistertype;
+  class function thlcgjvm.def2regtyp(def: tdef): tregistertype;
     begin
     begin
       case def.typ of
       case def.typ of
         { records and enums are implemented via classes }
         { records and enums are implemented via classes }