mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-05 18:09:28 +01:00
* Tarrayconstructornode sets pi_do_call if a call is possible
This commit is contained in:
parent
38328193f6
commit
cfd870ed59
@ -1051,7 +1051,9 @@ implementation
|
|||||||
function tarrayconstructornode.pass_1 : tnode;
|
function tarrayconstructornode.pass_1 : tnode;
|
||||||
var
|
var
|
||||||
hp : tarrayconstructornode;
|
hp : tarrayconstructornode;
|
||||||
|
do_variant:boolean;
|
||||||
begin
|
begin
|
||||||
|
do_variant:=(nf_forcevaria in flags) or tarraydef(resulttype.def).isvariant;
|
||||||
result:=nil;
|
result:=nil;
|
||||||
{ Insert required type convs, this must be
|
{ Insert required type convs, this must be
|
||||||
done in pass 1, because the call must be
|
done in pass 1, because the call must be
|
||||||
@ -1063,7 +1065,15 @@ implementation
|
|||||||
hp:=self;
|
hp:=self;
|
||||||
while assigned(hp) do
|
while assigned(hp) do
|
||||||
begin
|
begin
|
||||||
|
if hp.left<>nil then
|
||||||
|
begin
|
||||||
|
{This check is pessimistic; a call will happen depending
|
||||||
|
on the location in which the elements will be found in
|
||||||
|
pass 2.}
|
||||||
|
if not do_variant then
|
||||||
|
include(procinfo.flags,pi_do_call);
|
||||||
firstpass(hp.left);
|
firstpass(hp.left);
|
||||||
|
end;
|
||||||
hp:=tarrayconstructornode(hp.right);
|
hp:=tarrayconstructornode(hp.right);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1073,9 +1083,9 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
function tarrayconstructornode.docompare(p: tnode): boolean;
|
function tarrayconstructornode.docompare(p: tnode): boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
docompare :=
|
docompare:=inherited docompare(p);
|
||||||
inherited docompare(p);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1246,7 +1256,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.121 2004-02-03 22:32:54 peter
|
Revision 1.122 2004-02-20 20:21:16 daniel
|
||||||
|
* Tarrayconstructornode sets pi_do_call if a call is possible
|
||||||
|
|
||||||
|
Revision 1.121 2004/02/03 22:32:54 peter
|
||||||
* renamed xNNbittype to xNNinttype
|
* renamed xNNbittype to xNNinttype
|
||||||
* renamed registers32 to registersint
|
* renamed registers32 to registersint
|
||||||
* replace some s32bit,u32bit with torddef([su]inttype).def.typ
|
* replace some s32bit,u32bit with torddef([su]inttype).def.typ
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user