Explorar o código

* 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 %!s(int64=11) %!d(string=hai) anos
pai
achega
bf617cb389
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  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
              by the compiler for any purpose other than parameter passing/function
              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
              has been loaded in a register.
@@ -723,7 +723,7 @@ implementation
       cg.translate_register(reg);
     end;
 
-  function thlcgobj.def2regtyp(def: tdef): tregistertype;
+  class function thlcgobj.def2regtyp(def: tdef): tregistertype;
     begin
         case def.typ of
           enumdef,

+ 2 - 2
compiler/jvm/hlcgcpu.pas

@@ -47,7 +47,7 @@ uses
       procedure incstack(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;
 
@@ -288,7 +288,7 @@ implementation
         list.concat(tai_comment.Create(strpnew('    freed '+tostr(slots)+', stack height = '+tostr(fevalstackheight))));
     end;
 
-  function thlcgjvm.def2regtyp(def: tdef): tregistertype;
+  class function thlcgjvm.def2regtyp(def: tdef): tregistertype;
     begin
       case def.typ of
         { records and enums are implemented via classes }