* free the calleeside paraloc information after a unit has been compiled

git-svn-id: trunk@32519 -
This commit is contained in:
Jonas Maebe 2015-11-24 20:10:32 +00:00
parent 2342ee467b
commit ba92fdafcc
2 changed files with 32 additions and 0 deletions

View File

@ -552,6 +552,7 @@ implementation
pd.localst:=nil;
end;
pd.freeimplprocdefinfo;
pd.done_paraloc_info(calleeside);
end;
end;
end;

View File

@ -624,6 +624,7 @@ interface
function compatible_with_pointerdef_size(ptr: tpointerdef): boolean; virtual;
procedure check_mark_as_nested;
procedure init_paraloc_info(side: tcallercallee);
procedure done_paraloc_info(side: tcallercallee);
function stack_tainting_parameter(side: tcallercallee): boolean;
function is_pushleftright: boolean;virtual;
function address_type:tdef;virtual;
@ -5026,6 +5027,36 @@ implementation
end;
procedure tabstractprocdef.done_paraloc_info(side: tcallercallee);
var
i: longint;
begin
if (side in [callerside,callbothsides]) and
(has_paraloc_info in [callerside,callbothsides]) then
begin
funcretloc[callerside].done;
for i:=0 to paras.count-1 do
tparavarsym(paras[i]).paraloc[callerside].done;
if has_paraloc_info=callerside then
has_paraloc_info:=callnoside
else
has_paraloc_info:=calleeside;
end;
if (side in [calleeside,callbothsides]) and
(has_paraloc_info in [calleeside,callbothsides]) then
begin
funcretloc[calleeside].done;
for i:=0 to paras.count-1 do
tparavarsym(paras[i]).paraloc[calleeside].done;
if has_paraloc_info=calleeside then
has_paraloc_info:=callnoside
else
has_paraloc_info:=callerside;
end;
end;
function tabstractprocdef.stack_tainting_parameter(side: tcallercallee): boolean;
var
p: tparavarsym;