mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 11:40:36 +02:00
decr refcnt for out paras
This commit is contained in:
parent
58202bd7d5
commit
5db9200128
@ -313,6 +313,7 @@ implementation
|
|||||||
|
|
||||||
procedure tcgcallparanode.secondcallparan;
|
procedure tcgcallparanode.secondcallparan;
|
||||||
var
|
var
|
||||||
|
href : treference;
|
||||||
otlabel,
|
otlabel,
|
||||||
oflabel : tasmlabel;
|
oflabel : tasmlabel;
|
||||||
begin
|
begin
|
||||||
@ -329,6 +330,14 @@ implementation
|
|||||||
objectlibrary.getlabel(falselabel);
|
objectlibrary.getlabel(falselabel);
|
||||||
secondpass(left);
|
secondpass(left);
|
||||||
|
|
||||||
|
{ release memory for refcnt out parameters }
|
||||||
|
if (parasym.varspez=vs_out) and
|
||||||
|
(left.resulttype.def.needs_inittable) then
|
||||||
|
begin
|
||||||
|
location_get_data_ref(exprasmlist,left.location,href,false);
|
||||||
|
cg.g_decrrefcount(exprasmlist,left.resulttype.def,href);
|
||||||
|
end;
|
||||||
|
|
||||||
{$ifdef PASS2INLINE}
|
{$ifdef PASS2INLINE}
|
||||||
if assigned(aktcallnode.inlinecode) then
|
if assigned(aktcallnode.inlinecode) then
|
||||||
paramanager.duplicateparaloc(exprasmlist,aktcallnode.procdefinition.proccalloption,parasym,tempcgpara)
|
paramanager.duplicateparaloc(exprasmlist,aktcallnode.procdefinition.proccalloption,parasym,tempcgpara)
|
||||||
@ -1245,7 +1254,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.203 2005-04-05 21:06:44 peter
|
Revision 1.204 2005-04-25 09:41:28 peter
|
||||||
|
decr refcnt for out paras
|
||||||
|
|
||||||
|
Revision 1.203 2005/04/05 21:06:44 peter
|
||||||
* support typecasting a ordinal const to 8 byte record. a_param_loc
|
* support typecasting a ordinal const to 8 byte record. a_param_loc
|
||||||
can't be used. Instead force the location to memory so it uses
|
can't be used. Instead force the location to memory so it uses
|
||||||
a_param_ref
|
a_param_ref
|
||||||
|
Loading…
Reference in New Issue
Block a user