* allow accessing locals in other lexlevel when the current assembler

routine doesn't have locals.
This commit is contained in:
peter 2002-01-29 21:32:03 +00:00
parent 7ed7eebed9
commit cdf0df1808
2 changed files with 15 additions and 4 deletions

View File

@ -1129,6 +1129,9 @@ implementation
{ but with another name, so that recursive calls are possible }
symtablestack.insert(aktprocdef.funcretsym);
symtablestack.rename(aktprocdef.funcretsym.name,'$result');
{ update the symtablesize back to 0 if there were no locals }
if not haslocals then
symtablestack.datasize:=0;
{ set the used flag for the return }
if ret_in_acc(aktprocdef.rettype.def) then
begin
@ -1185,7 +1188,11 @@ implementation
end.
{
$Log$
Revision 1.45 2002-01-24 18:25:49 peter
Revision 1.46 2002-01-29 21:32:03 peter
* allow accessing locals in other lexlevel when the current assembler
routine doesn't have locals.
Revision 1.45 2002/01/24 18:25:49 peter
* implicit result variable generation for assembler routines
* removed m_tp modeswitch, use m_tp7 or not(m_fpc) instead

View File

@ -844,7 +844,7 @@ Begin
end
else
begin
if (procinfo^.framepointer=stack_pointer) and
if (aktprocdef.localst.datasize=0) and
assigned(procinfo^.parent) and
(lexlevel=tvarsym(sym).owner.symtablelevel+1) and
{ same problem as above !!
@ -884,7 +884,7 @@ Begin
opr.ref.base:=procinfo^.framepointer
else
begin
if (procinfo^.framepointer=stack_pointer) and
if (aktprocdef.localst.datasize=0) and
assigned(procinfo^.parent) and
(lexlevel=tvarsym(sym).owner.symtablelevel+1) and
{(procinfo^.parent^.sym.definition.localst=tvarsym(sym).owner) and}
@ -1585,7 +1585,11 @@ end;
end.
{
$Log$
Revision 1.26 2002-01-24 18:25:50 peter
Revision 1.27 2002-01-29 21:32:03 peter
* allow accessing locals in other lexlevel when the current assembler
routine doesn't have locals.
Revision 1.26 2002/01/24 18:25:50 peter
* implicit result variable generation for assembler routines
* removed m_tp modeswitch, use m_tp7 or not(m_fpc) instead