浏览代码

* 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 12 年之前
父节点
当前提交
ac2006898f
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      compiler/psub.pas

+ 4 - 2
compiler/psub.pas

@@ -1817,8 +1817,10 @@ implementation
         if tsym(p).typ<>paravarsym then
          exit;
         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);
       end;