Jelajahi Sumber

* changed fix for webtbs/tw20075 so that we don't check the need for
parameter/local finalization at all in pure assembler routines;
the routines that check this also set pi_needs_got, which should
not be set either for pure assembler routines (fixes tw20075 on
Darwin/i386, where PIC code is enabled by default)

git-svn-id: trunk@31622 -

Jonas Maebe 10 tahun lalu
induk
melakukan
2205549316
1 mengubah file dengan 5 tambahan dan 4 penghapusan
  1. 5 4
      compiler/psub.pas

+ 5 - 4
compiler/psub.pas

@@ -879,7 +879,6 @@ implementation
            (pi_needs_implicit_finally in flags) and
            { but it's useless in init/final code of units }
            not(procdef.proctypeoption in [potype_unitfinalize,potype_unitinit]) and
-           not(po_assembler in procdef.procoptions) and
            not(target_info.system in systems_garbage_collected_managed_types) then
           begin
             { Any result of managed type must be returned in parameter }
@@ -1315,8 +1314,11 @@ implementation
           end;
 
         { set implicit_finally flag when there are locals/paras to be finalized }
-        procdef.parast.SymList.ForEachCall(@check_finalize_paras,nil);
-        procdef.localst.SymList.ForEachCall(@check_finalize_locals,nil);
+        if not(po_assembler in current_procinfo.procdef.procoptions) then
+          begin
+            procdef.parast.SymList.ForEachCall(@check_finalize_paras,nil);
+            procdef.localst.SymList.ForEachCall(@check_finalize_locals,nil);
+          end;
 
 {$ifdef SUPPORT_SAFECALL}
         { set implicit_finally flag for if procedure is safecall }
@@ -1638,7 +1640,6 @@ implementation
             if (cs_implicit_exceptions in current_settings.moduleswitches) and
                not(procdef.proctypeoption in [potype_unitfinalize,potype_unitinit]) and
                (pi_needs_implicit_finally in flags) and
-               not(po_assembler in procdef.procoptions) and
                not(pi_has_implicit_finally in flags) and
                not(target_info.system in systems_garbage_collected_managed_types) then
              internalerror(200405231);