Browse Source

* disable reg. vars in subroutines with interprocedural used labels

git-svn-id: trunk@15713 -
florian 15 năm trước cách đây
mục cha
commit
bacd6fb71b
3 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 3 1
      compiler/globtype.pas
  2. 3 0
      compiler/nflw.pas
  3. 1 0
      compiler/symsym.pas

+ 3 - 1
compiler/globtype.pas

@@ -426,7 +426,9 @@ interface
          { set if the procedure has at least one register saved on the stack }
          pi_has_saved_regs,
          { dfa was generated for this proc }
-         pi_dfaavailable
+         pi_dfaavailable,
+         { subroutine contains interprocedural used labels }
+         pi_has_interproclabel
        );
        tprocinfoflags=set of tprocinfoflag;
 

+ 3 - 0
compiler/nflw.pas

@@ -1830,6 +1830,9 @@ implementation
 
         include(current_procinfo.flags,pi_has_label);
 
+        if labsym.nonlocal then
+          include(current_procinfo.flags,pi_has_interproclabel);
+
         if assigned(left) then
           firstpass(left);
         if (m_iso in current_settings.modeswitches) and

+ 1 - 0
compiler/symsym.pas

@@ -1058,6 +1058,7 @@ implementation
         result:=(cs_opt_regvar in current_settings.optimizerswitches) and
                 not(pi_has_assembler_block in current_procinfo.flags) and
                 not(pi_uses_exceptions in current_procinfo.flags) and
+                not(pi_has_interproclabel in current_procinfo.flags) and
                 not(vo_has_local_copy in varoptions) and
                 ((refpara and
                   (varregable <> vr_none)) or