Explorar o código

* Mark procedures with shortstring value parameters as non-leaf, because such parameters generate a call (to fpc_shortstr_assign).

git-svn-id: trunk@25082 -
sergei %!s(int64=12) %!d(string=hai) anos
pai
achega
ac2006898f
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      compiler/psub.pas

+ 4 - 2
compiler/psub.pas

@@ -1817,8 +1817,10 @@ implementation
         if tsym(p).typ<>paravarsym then
         if tsym(p).typ<>paravarsym then
          exit;
          exit;
         with tparavarsym(p) do
         with tparavarsym(p) do
-          if is_managed_type(vardef) and
-             (varspez in [vs_value,vs_out]) then
+          if (is_managed_type(vardef) and
+             (varspez in [vs_value,vs_out])) or
+             (is_shortstring(vardef) and
+             (varspez=vs_value)) then
             include(current_procinfo.flags,pi_do_call);
             include(current_procinfo.flags,pi_do_call);
       end;
       end;