mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 08:29:32 +01:00
* fixed check for whether or not a high parameter was already generated
* no type checking/conversions for invisible parameters
This commit is contained in:
parent
75a0d4154d
commit
ed5a4a6977
@ -576,22 +576,28 @@ type
|
||||
if not assigned(left.resulttype.def) then
|
||||
resulttypepass(left);
|
||||
|
||||
{ Handle varargs directly, no typeconvs or typechecking needed }
|
||||
if (nf_varargs_para in flags) then
|
||||
{ Handle varargs and hidden paras directly, no typeconvs or }
|
||||
{ typechecking needed }
|
||||
if (nf_varargs_para in flags) or
|
||||
(paraitem.paratyp = vs_hidden) then
|
||||
begin
|
||||
{ convert pascal to C types }
|
||||
case left.resulttype.def.deftype of
|
||||
stringdef :
|
||||
inserttypeconv(left,charpointertype);
|
||||
floatdef :
|
||||
inserttypeconv(left,s64floattype);
|
||||
end;
|
||||
if (paraitem.paratyp <> vs_hidden) then
|
||||
begin
|
||||
{ convert pascal to C types }
|
||||
case left.resulttype.def.deftype of
|
||||
stringdef :
|
||||
inserttypeconv(left,charpointertype);
|
||||
floatdef :
|
||||
inserttypeconv(left,s64floattype);
|
||||
end;
|
||||
end;
|
||||
set_varstate(left,true);
|
||||
resulttype:=left.resulttype;
|
||||
dec(parsing_para_level);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
{ Do we need arrayconstructor -> set conversion, then insert
|
||||
it here before the arrayconstructor node breaks the tree
|
||||
with its conversions of enum->ord }
|
||||
@ -793,7 +799,10 @@ type
|
||||
loadconst : boolean;
|
||||
hightree : tnode;
|
||||
begin
|
||||
if assigned(hightree) then
|
||||
{ if assigned(hightree) then
|
||||
exit;
|
||||
}
|
||||
if (nf_hightree_generated in flags) then
|
||||
exit;
|
||||
len:=-1;
|
||||
loadconst:=true;
|
||||
@ -848,6 +857,7 @@ type
|
||||
temp:=ccallparanode.create(hightree,right);
|
||||
|
||||
right:=temp;
|
||||
include(flags,nf_hightree_generated);
|
||||
end;
|
||||
{$else VS_HIDDEN}
|
||||
procedure tcallparanode.gen_high_tree(openstring:boolean);
|
||||
@ -2276,7 +2286,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.122 2002-12-15 22:50:00 florian
|
||||
Revision 1.123 2002-12-26 18:24:33 jonas
|
||||
* fixed check for whether or not a high parameter was already generated
|
||||
* no type checking/conversions for invisible parameters
|
||||
|
||||
Revision 1.122 2002/12/15 22:50:00 florian
|
||||
+ some stuff for the new hidden parameter handling added
|
||||
|
||||
Revision 1.121 2002/12/15 21:34:15 peter
|
||||
|
||||
@ -226,6 +226,7 @@ interface
|
||||
|
||||
{ flags used by tcallparanode }
|
||||
nf_varargs_para, { belongs this para to varargs }
|
||||
nf_hightree_generated, { has the hightree for thispara been generated }
|
||||
|
||||
{ taddrnode }
|
||||
nf_procvarload,
|
||||
@ -973,7 +974,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.45 2002-11-28 11:17:04 florian
|
||||
Revision 1.46 2002-12-26 18:24:33 jonas
|
||||
* fixed check for whether or not a high parameter was already generated
|
||||
* no type checking/conversions for invisible parameters
|
||||
|
||||
Revision 1.45 2002/11/28 11:17:04 florian
|
||||
* loop node flags from node flags splitted
|
||||
|
||||
Revision 1.44 2002/10/05 00:48:57 peter
|
||||
|
||||
Loading…
Reference in New Issue
Block a user