Browse Source

- removed g_indirect_sym_load() from hlcgobj/hlcg2ll because this cgobj
method is only used anymore internally in cgobj.tcg and its descendants
* made tcg.g_indirect_sym_load() protected to ensure it stays that way

git-svn-id: trunk@21392 -

Jonas Maebe 13 years ago
parent
commit
f2c82e32cd
4 changed files with 4 additions and 9 deletions
  1. 3 1
      compiler/cgobj.pas
  2. 0 6
      compiler/hlcg2ll.pas
  3. 0 1
      compiler/hlcgobj.pas
  4. 1 1
      compiler/ppcgen/cgppc.pas

+ 3 - 1
compiler/cgobj.pas

@@ -459,7 +459,6 @@ unit cgobj;
           procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);virtual;abstract;
           procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);virtual;abstract;
           procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: tcgint);virtual;
           procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: tcgint);virtual;
 
 
-          function g_indirect_sym_load(list:TAsmList;const symname: string; const flags: tindsymflags): tregister;virtual;
           { generate a stub which only purpose is to pass control the given external method,
           { generate a stub which only purpose is to pass control the given external method,
           setting up any additional environment before doing so (if required).
           setting up any additional environment before doing so (if required).
 
 
@@ -473,6 +472,9 @@ unit cgobj;
           { Generate code to exit an unwind-protected region. The default implementation
           { Generate code to exit an unwind-protected region. The default implementation
             produces a simple jump to destination label. }
             produces a simple jump to destination label. }
           procedure g_local_unwind(list: TAsmList; l: TAsmLabel);virtual;
           procedure g_local_unwind(list: TAsmList; l: TAsmLabel);virtual;
+
+         protected
+          function g_indirect_sym_load(list:TAsmList;const symname: string; const flags: tindsymflags): tregister;virtual;
        end;
        end;
 
 
 {$ifndef cpu64bitalu}
 {$ifndef cpu64bitalu}

+ 0 - 6
compiler/hlcg2ll.pas

@@ -328,7 +328,6 @@ unit hlcg2ll;
           procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
           procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
           procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint);override;
           procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint);override;
 
 
-          function g_indirect_sym_load(list:TAsmList;const symname: string; const flags: tindsymflags): tregister;override;
           { generate a stub which only purpose is to pass control the given external method,
           { generate a stub which only purpose is to pass control the given external method,
           setting up any additional environment before doing so (if required).
           setting up any additional environment before doing so (if required).
 
 
@@ -1024,11 +1023,6 @@ implementation
       cg.g_adjust_self_value(list,procdef,ioffset);
       cg.g_adjust_self_value(list,procdef,ioffset);
     end;
     end;
 
 
-  function thlcg2ll.g_indirect_sym_load(list: TAsmList; const symname: string; const flags: tindsymflags): tregister;
-    begin
-      result:=cg.g_indirect_sym_load(list,symname,flags);
-    end;
-
   procedure thlcg2ll.g_local_unwind(list: TAsmList; l: TAsmLabel);
   procedure thlcg2ll.g_local_unwind(list: TAsmList; l: TAsmLabel);
     begin
     begin
       cg.g_local_unwind(list, l);
       cg.g_local_unwind(list, l);

+ 0 - 1
compiler/hlcgobj.pas

@@ -437,7 +437,6 @@ unit hlcgobj;
           procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);virtual; abstract;
           procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);virtual; abstract;
           procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint);virtual; abstract;
           procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint);virtual; abstract;
 
 
-          function g_indirect_sym_load(list:TAsmList;const symname: string; const flags: tindsymflags): tregister;virtual; abstract;
           { generate a stub which only purpose is to pass control the given external method,
           { generate a stub which only purpose is to pass control the given external method,
           setting up any additional environment before doing so (if required).
           setting up any additional environment before doing so (if required).
 
 

+ 1 - 1
compiler/ppcgen/cgppc.pas

@@ -62,7 +62,6 @@ unit cgppc;
 
 
         procedure g_maybe_got_init(list: TAsmList); override;
         procedure g_maybe_got_init(list: TAsmList); override;
 
 
-        function g_indirect_sym_load(list:TAsmList;const symname: string; const flags: tindsymflags): tregister; override;
         { Transform unsupported methods into Internal errors }
         { Transform unsupported methods into Internal errors }
         procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; size: TCGSize; src, dst: TRegister); override;
         procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; size: TCGSize; src, dst: TRegister); override;
         procedure g_stackpointer_alloc(list : TAsmList;localsize : longint);override;
         procedure g_stackpointer_alloc(list : TAsmList;localsize : longint);override;
@@ -71,6 +70,7 @@ unit cgppc;
         procedure g_load_check_simple(list: TAsmList; const ref: treference; size: aint);
         procedure g_load_check_simple(list: TAsmList; const ref: treference; size: aint);
         procedure g_external_wrapper(list: TAsmList; pd: TProcDef; const externalname: string); override;
         procedure g_external_wrapper(list: TAsmList; pd: TProcDef; const externalname: string); override;
        protected
        protected
+        function g_indirect_sym_load(list:TAsmList;const symname: string; const flags: tindsymflags): tregister; override;
         function  get_darwin_call_stub(const s: string; weak: boolean): tasmsymbol;
         function  get_darwin_call_stub(const s: string; weak: boolean): tasmsymbol;
         { Make sure ref is a valid reference for the PowerPC and sets the }
         { Make sure ref is a valid reference for the PowerPC and sets the }
         { base to the value of the index if (base = R_NO).                }
         { base to the value of the index if (base = R_NO).                }