mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-06 15:55:58 +02:00
* do callparatemp stuff only after the parameters have been firstpassed,
because some nodes are turned into calls during the firstpass
This commit is contained in:
parent
887d64f038
commit
b19a9cfc0a
@ -2022,19 +2022,17 @@ type
|
|||||||
end;
|
end;
|
||||||
temp := ctempcreatenode.create(curpara.left.resulttype,curpara.left.resulttype.def.size,true);
|
temp := ctempcreatenode.create(curpara.left.resulttype,curpara.left.resulttype.def.size,true);
|
||||||
addstatement(newstatement,temp);
|
addstatement(newstatement,temp);
|
||||||
resulttypepass(newstatement);
|
|
||||||
addstatement(newstatement,
|
addstatement(newstatement,
|
||||||
cassignmentnode.create(ctemprefnode.create(temp),curpara.left));
|
cassignmentnode.create(ctemprefnode.create(temp),curpara.left));
|
||||||
resulttypepass(newstatement);
|
|
||||||
{ after the assignment, turn the temp into a non-persistent one, so }
|
{ after the assignment, turn the temp into a non-persistent one, so }
|
||||||
{ that it will be freed once it's used as parameter }
|
{ that it will be freed once it's used as parameter }
|
||||||
addstatement(newstatement,ctempdeletenode.create_normal_temp(temp));
|
addstatement(newstatement,ctempdeletenode.create_normal_temp(temp));
|
||||||
resulttypepass(newstatement);
|
|
||||||
curpara.left := ctemprefnode.create(temp);
|
curpara.left := ctemprefnode.create(temp);
|
||||||
{ the para's themselves are "resulttypepassed" in in tcallnode.pass_1 }
|
|
||||||
end;
|
end;
|
||||||
curpara := tcallparanode(curpara.right);
|
curpara := tcallparanode(curpara.right);
|
||||||
end;
|
end;
|
||||||
|
if assigned(newblock) then
|
||||||
|
firstpass(newblock);
|
||||||
result := newblock;
|
result := newblock;
|
||||||
end;
|
end;
|
||||||
{$endif callparatemp}
|
{$endif callparatemp}
|
||||||
@ -2059,14 +2057,14 @@ type
|
|||||||
inlined:=false;
|
inlined:=false;
|
||||||
inlinecode := nil;
|
inlinecode := nil;
|
||||||
|
|
||||||
{$ifdef callparatemp}
|
|
||||||
callparatemps := extract_functioncall_paras;
|
|
||||||
{$endif callparatemp}
|
|
||||||
|
|
||||||
{ work trough all parameters to get the register requirements }
|
{ work trough all parameters to get the register requirements }
|
||||||
if assigned(left) then
|
if assigned(left) then
|
||||||
tcallparanode(left).det_registers;
|
tcallparanode(left).det_registers;
|
||||||
|
|
||||||
|
{$ifdef callparatemp}
|
||||||
|
callparatemps := extract_functioncall_paras;
|
||||||
|
{$endif callparatemp}
|
||||||
|
|
||||||
{ function result node }
|
{ function result node }
|
||||||
if assigned(funcretnode) then
|
if assigned(funcretnode) then
|
||||||
firstpass(funcretnode);
|
firstpass(funcretnode);
|
||||||
@ -2525,7 +2523,11 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.145 2003-04-27 07:29:50 peter
|
Revision 1.146 2003-04-27 09:08:44 jonas
|
||||||
|
* do callparatemp stuff only after the parameters have been firstpassed,
|
||||||
|
because some nodes are turned into calls during the firstpass
|
||||||
|
|
||||||
|
Revision 1.145 2003/04/27 07:29:50 peter
|
||||||
* aktprocdef cleanup, aktprocdef is now always nil when parsing
|
* aktprocdef cleanup, aktprocdef is now always nil when parsing
|
||||||
a new procdef declaration
|
a new procdef declaration
|
||||||
* aktprocsym removed
|
* aktprocsym removed
|
||||||
|
Loading…
Reference in New Issue
Block a user