mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 12:31:01 +02:00
* 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:
parent
fd18504fea
commit
9bb86eb411
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user