* don't create the nestedvars struct for pure assembler routines, as

those will never call a nested routine using Pascal-level support
    for accessing local variables (even if the nestedvars stayed empty,
    this caused a stack frame to be allocated because a temp of 0
    bytes is rounded up to 4 bytes)

git-svn-id: trunk@32739 -
This commit is contained in:
Jonas Maebe 2015-12-26 20:01:14 +00:00
parent aef6120438
commit 5a8c151a72

View File

@ -1166,13 +1166,16 @@ implementation
symtablestack.free;
symtablestack:=old_symtablestack.getcopyuntil(pd.localst);
pnestedvarsdef:=cpointerdef.getreusable(nestedvarsdef);
nestedvars:=clocalvarsym.create('$nestedvars',vs_var,nestedvarsdef,[],true);
pd.localst.insert(nestedvars);
pd.parentfpstruct:=nestedvars;
if not(po_assembler in pd.procoptions) then
begin
nestedvars:=clocalvarsym.create('$nestedvars',vs_var,nestedvarsdef,[],true);
pd.localst.insert(nestedvars);
pd.parentfpstruct:=nestedvars;
pd.parentfpinitblock:=cblocknode.create(nil);
end;
symtablestack.free;
pd.parentfpstructptrtype:=pnestedvarsdef;
pd.parentfpinitblock:=cblocknode.create(nil);
symtablestack.free;
symtablestack:=old_symtablestack;
end;