Przeglądaj źródła

* remove obsolete code already in comments

peter 22 lat temu
rodzic
commit
f8bb9785e0
3 zmienionych plików z 12 dodań i 99 usunięć
  1. 4 31
      compiler/cgbase.pas
  2. 4 60
      compiler/ncgutil.pas
  3. 4 8
      compiler/psub.pas

+ 4 - 31
compiler/cgbase.pas

@@ -376,36 +376,6 @@ implementation
            current_procinfo.firsttemp_offset := tg.direction*symtablestack.datasize
          else
            current_procinfo.firsttemp_offset := 0;
-(*
-         THe registers are also allocated when loading the result
-
-         { include return value registers }
-         if not is_void(procdef.rettype.def) then
-           begin
-             paramloc:=procdef.funcret_paraloc[calleeside];
-             case paramloc.loc of
-               LOC_FPUREGISTER,
-               LOC_CFPUREGISTER,
-               LOC_MMREGISTER,
-               LOC_CMMREGISTER :
-                 begin
-                   regidx:=findreg_by_number(paramloc.register);
-                   include(used_regs_fpu,regidx);
-                 end;
-               LOC_REGISTER,LOC_CREGISTER :
-                 begin
-                   if ((paramloc.size in [OS_S64,OS_64]) and
-                      (sizeof(aword) < 8)) then
-                     begin
-                       include(used_regs_int,getsupreg(paramloc.registerhigh));
-                       include(used_regs_fpu,getsupreg(paramloc.registerlow));
-                     end
-                   else
-                     include(used_regs_fpu,getsupreg(paramloc.register));
-                 end;
-             end;
-           end;
-*)
       end;
 
 
@@ -576,7 +546,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.62  2003-09-07 22:09:34  peter
+  Revision 1.63  2003-09-14 19:18:10  peter
+    * remove obsolete code already in comments
+
+  Revision 1.62  2003/09/07 22:09:34  peter
     * preparations for different default calling conventions
     * various RA fixes
 

+ 4 - 60
compiler/ncgutil.pas

@@ -1083,36 +1083,6 @@ implementation
       end;
 
 
-(*
-    Return value is in the localst/parast and will be initialized by the
-    foreach loop (PFV)
-
-    procedure initretvalue(list:taasmoutput);
-      var
-        href    : treference;
-      begin
-        if not is_void(current_procinfo.procdef.rettype.def) then
-          begin
-             { initialize return value }
-             if (current_procinfo.procdef.rettype.def.needs_inittable) then
-               begin
-{$ifdef powerpc}
-                  if (po_assembler in current_procinfo.procdef.procoptions) then
-                    internalerror(200304161);
-{$endif powerpc}
-                  if (cs_implicit_exceptions in aktmoduleswitches) then
-                    include(current_procinfo.flags,pi_needs_implicit_finally);
-                  reference_reset_base(href,current_procinfo.framepointer,tvarsym(current_procinfo.procdef.funcretsym).adjusted_address);
-                  cg.g_initialize(list,current_procinfo.procdef.rettype.def,href,paramanager.ret_in_param(current_procinfo.procdef.rettype.def,current_procinfo.procdef.proccalloption));
-                  { load the pointer to the initialized retvalue in te register }
-                  if (tvarsym(current_procinfo.procdef.funcretsym).reg<>NR_NO) then
-                    cg.a_load_ref_reg(list,OS_ADDR,def_cgsize(current_procinfo.procdef.rettype.def),href,tvarsym(current_procinfo.procdef.funcretsym).reg);
-               end;
-          end;
-      end;
-*)
-
-
     procedure gen_load_return_value(list:TAAsmoutput; var uses_acc,uses_acchi,uses_fpu : boolean);
       var
         ressym : tvarsym;
@@ -1251,11 +1221,6 @@ implementation
               cg.g_profilecode(list);
           end;
 
-(*
-        { initialize return value }
-        initretvalue(list);
-*)
-
         { initialize local data like ansistrings }
         case current_procinfo.procdef.proctypeoption of
            potype_unitinit:
@@ -1457,18 +1422,6 @@ implementation
         else
           if current_procinfo.procdef.proccalloption in savestdregs_pocalls then
             cg.g_save_standard_registers(list,rg.used_in_proc_int);
-
-(*
-        { Save stackpointer value }
-        if not inlined and
-           (current_procinfo.framepointer<>NR_STACK_POINTER_REG) and
-           ((po_savestdregs in current_procinfo.procdef.procoptions) or
-            (po_saveregisters in current_procinfo.procdef.procoptions)) then
-         begin
-           tg.GetTemp(list,POINTER_SIZE,tt_noreuse,current_procinfo.save_stackptr_ref);
-           cg.a_load_reg_ref(list,OS_ADDR,OS_ADDR,NR_STACK_POINTER_REG,current_procinfo.save_stackptr_ref);
-         end;
-*)
       end;
 
 
@@ -1478,18 +1431,6 @@ implementation
         if (po_assembler in current_procinfo.procdef.procoptions) then
           exit;
 
-(*
-        { Restore stackpointer if it was saved }
-        if not inlined and
-           (current_procinfo.framepointer<>NR_STACK_POINTER_REG) and
-           ((po_savestdregs in current_procinfo.procdef.procoptions) or
-            (po_saveregisters in current_procinfo.procdef.procoptions)) then
-         begin
-           cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,current_procinfo.save_stackptr_ref,NR_STACK_POINTER_REG);
-           tg.UngetTemp(list,current_procinfo.save_stackptr_ref);
-         end;
-*)
-
         { for the save all registers we can simply use a pusha,popa which
           push edi,esi,ebp,esp(ignored),ebx,edx,ecx,eax }
         if (po_saveregisters in current_procinfo.procdef.procoptions) then
@@ -1824,7 +1765,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.142  2003-09-11 11:54:59  florian
+  Revision 1.143  2003-09-14 19:18:10  peter
+    * remove obsolete code already in comments
+
+  Revision 1.142  2003/09/11 11:54:59  florian
     * improved arm code generation
     * move some protected and private field around
     * the temp. register for register parameters/arguments are now released

+ 4 - 8
compiler/psub.pas

@@ -725,13 +725,6 @@ implementation
         gen_exit_code(templist,false,usesacc,usesacchi);
         aktproccode.concatlist(templist);
 
-(*
-        { now all the registers used are known }
-        { Remove all imaginary registers from the used list.}
-        procdef.usedintregisters:=rg.used_in_proc_int*paramanager.get_volatile_registers_int(pocall_default)-rg.preserved_by_proc_int;
-        procdef.usedotherregisters:=rg.used_in_proc_other;
-*)
-
         { save local data (casetable) also in the same file }
         if assigned(aktlocaldata) and
            (not aktlocaldata.empty) then
@@ -1309,7 +1302,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.147  2003-09-14 12:58:00  peter
+  Revision 1.148  2003-09-14 19:18:10  peter
+    * remove obsolete code already in comments
+
+  Revision 1.147  2003/09/14 12:58:00  peter
     * support mulitple overloads in implementation, this is delphi
       compatible
     * procsym only stores the overloads available in the interface