mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 02:29:12 +02:00
* committed wrong file in r2614 (ncal.pas instead of pexpr.pas)
git-svn-id: trunk@2616 -
This commit is contained in:
parent
feb8de2d67
commit
791be20f28
@ -703,7 +703,7 @@ type
|
|||||||
(tloadnode(left).is_addr_param_load)
|
(tloadnode(left).is_addr_param_load)
|
||||||
)
|
)
|
||||||
) then
|
) then
|
||||||
make_not_regable(left,false);
|
make_not_regable(left);
|
||||||
|
|
||||||
if do_count then
|
if do_count then
|
||||||
begin
|
begin
|
||||||
@ -2218,12 +2218,9 @@ type
|
|||||||
)
|
)
|
||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
{ make sure records which could be written to are not }
|
{ in theory, this is always regable, but ncgcall can't }
|
||||||
{ kept in a register }
|
{ handle it yet in all situations (JM) }
|
||||||
tempnode := ctempcreatenode.create(para.parasym.vartype,para.parasym.vartype.def.size,tt_persistent,
|
tempnode := ctempcreatenode.create(para.parasym.vartype,para.parasym.vartype.def.size,tt_persistent,tparavarsym(para.parasym).varregable <> vr_none);
|
||||||
(tparavarsym(para.parasym).varregable <> vr_none) and
|
|
||||||
((para.parasym.vartype.def.deftype <> recorddef) or
|
|
||||||
not(para.parasym.varspez in [vs_var,vs_out])));
|
|
||||||
addstatement(createstatement,tempnode);
|
addstatement(createstatement,tempnode);
|
||||||
{ assign the value of the parameter to the temp, except in case of the function result }
|
{ assign the value of the parameter to the temp, except in case of the function result }
|
||||||
{ (in that case, para.left is a block containing the creation of a new temp, while we }
|
{ (in that case, para.left is a block containing the creation of a new temp, while we }
|
||||||
@ -2257,16 +2254,7 @@ type
|
|||||||
caddrnode.create_internal(para.left)));
|
caddrnode.create_internal(para.left)));
|
||||||
para.left := ctypeconvnode.create_internal(cderefnode.create(ctemprefnode.create(tempnode)),para.left.resulttype);
|
para.left := ctypeconvnode.create_internal(cderefnode.create(ctemprefnode.create(tempnode)),para.left.resulttype);
|
||||||
addstatement(deletestatement,ctempdeletenode.create(tempnode));
|
addstatement(deletestatement,ctempdeletenode.create(tempnode));
|
||||||
end
|
end;
|
||||||
{ the regvar status of vs_var/vs_out paras is never changed, }
|
|
||||||
{ so in case the are records turn of regvarability of the }
|
|
||||||
{ para (because we can't write to regvar records yet) }
|
|
||||||
else if (para.parasym.vartype.def.deftype = recorddef) and
|
|
||||||
(para.parasym.varspez in [vs_var,vs_out]) then
|
|
||||||
if (para.left.nodetype = blockn) then
|
|
||||||
make_not_regable(laststatement(tblocknode(para.left)),true)
|
|
||||||
else
|
|
||||||
make_not_regable(para.left,true);
|
|
||||||
end;
|
end;
|
||||||
para := tcallparanode(para.right);
|
para := tcallparanode(para.right);
|
||||||
end;
|
end;
|
||||||
|
@ -663,10 +663,11 @@ implementation
|
|||||||
consume(_LKLAMMER);
|
consume(_LKLAMMER);
|
||||||
in_args:=true;
|
in_args:=true;
|
||||||
p1:=comp_expr(true);
|
p1:=comp_expr(true);
|
||||||
if try_to_consume(_COMMA) then
|
Consume(_COMMA);
|
||||||
|
if not(codegenerror) then
|
||||||
p2:=ccallparanode.create(comp_expr(true),nil)
|
p2:=ccallparanode.create(comp_expr(true),nil)
|
||||||
else
|
else
|
||||||
p2:=nil;
|
p2:=cerrornode.create;
|
||||||
p2:=ccallparanode.create(p1,p2);
|
p2:=ccallparanode.create(p1,p2);
|
||||||
statement_syssym:=geninlinenode(l,false,p2);
|
statement_syssym:=geninlinenode(l,false,p2);
|
||||||
consume(_RKLAMMER);
|
consume(_RKLAMMER);
|
||||||
|
Loading…
Reference in New Issue
Block a user