* never make vs_var or vs_out variabled non-regable, unless it's an

access from a nested procedure. This allows keeping the address
    of large function results like shortstrings in a register,
    because they were always made non-regable by a typeconversionnode
    due to the fact that they are aliased by an absolute alias.

git-svn-id: trunk@2140 -
This commit is contained in:
Jonas Maebe 2006-01-03 15:37:49 +00:00
parent fd18504fea
commit 9bb86eb411

View File

@ -643,7 +643,11 @@ implementation
typeconvn :
make_not_regable(ttypeconvnode(p).left);
loadn :
if tloadnode(p).symtableentry.typ in [globalvarsym,localvarsym,paravarsym] then
if (tloadnode(p).symtableentry.typ in [globalvarsym,localvarsym]) or
((tloadnode(p).symtableentry.typ = paravarsym) and
{ not a nested variable }
(assigned(tloadnode(p).left) or
not(tparavarsym(tloadnode(p).symtableentry).varspez in [vs_var,vs_out]))) then
tabstractvarsym(tloadnode(p).symtableentry).varregable:=vr_none;
end;
end;