mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-26 03:09:08 +02:00
* two bugs reported by Romio (bugs 13) are fixed:
- empty array constructors are now handled correctly (e.g. for sysutils.format) - comparsion of ansistrings was sometimes coded wrong
This commit is contained in:
parent
79e64c8e75
commit
ba314dab05
@ -196,6 +196,7 @@ implementation
|
|||||||
ltn,lten,gtn,gten,
|
ltn,lten,gtn,gten,
|
||||||
equaln,unequaln:
|
equaln,unequaln:
|
||||||
begin
|
begin
|
||||||
|
cmpop:=true;
|
||||||
secondpass(p^.left);
|
secondpass(p^.left);
|
||||||
pushed:=maybe_push(p^.right^.registers32,p);
|
pushed:=maybe_push(p^.right^.registers32,p);
|
||||||
secondpass(p^.right);
|
secondpass(p^.right);
|
||||||
@ -2028,7 +2029,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.58 1999-05-18 21:58:22 florian
|
Revision 1.59 1999-05-19 10:31:53 florian
|
||||||
|
* two bugs reported by Romio (bugs 13) are fixed:
|
||||||
|
- empty array constructors are now handled correctly (e.g. for sysutils.format)
|
||||||
|
- comparsion of ansistrings was sometimes coded wrong
|
||||||
|
|
||||||
|
Revision 1.58 1999/05/18 21:58:22 florian
|
||||||
* fixed some bugs related to temp. ansistrings and functions results
|
* fixed some bugs related to temp. ansistrings and functions results
|
||||||
which return records/objects/arrays which need init/final.
|
which return records/objects/arrays which need init/final.
|
||||||
|
|
||||||
|
@ -76,8 +76,16 @@ implementation
|
|||||||
p^.hightree:=genloadnode(pvarsym(srsym),st);
|
p^.hightree:=genloadnode(pvarsym(srsym),st);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
len:=parraydef(p^.left^.resulttype)^.highrange-
|
begin
|
||||||
parraydef(p^.left^.resulttype)^.lowrange;
|
{ this is an empty constructor
|
||||||
|
if (parraydef(p^.left^.resulttype)^.highrange=-1)
|
||||||
|
and (parraydef(p^.left^.resulttype)^.lowrange=0) then
|
||||||
|
len:=0
|
||||||
|
else
|
||||||
|
}
|
||||||
|
len:=parraydef(p^.left^.resulttype)^.highrange-
|
||||||
|
parraydef(p^.left^.resulttype)^.lowrange;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
stringdef :
|
stringdef :
|
||||||
begin
|
begin
|
||||||
@ -113,8 +121,8 @@ implementation
|
|||||||
else
|
else
|
||||||
len:=0;
|
len:=0;
|
||||||
end;
|
end;
|
||||||
if len>=0 then
|
{ if len>=0 then }
|
||||||
p^.hightree:=genordinalconstnode(len,s32bitdef);
|
p^.hightree:=genordinalconstnode(len,s32bitdef);
|
||||||
firstpass(p^.hightree);
|
firstpass(p^.hightree);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1156,7 +1164,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.44 1999-05-18 21:58:33 florian
|
Revision 1.45 1999-05-19 10:31:54 florian
|
||||||
|
* two bugs reported by Romio (bugs 13) are fixed:
|
||||||
|
- empty array constructors are now handled correctly (e.g. for sysutils.format)
|
||||||
|
- comparsion of ansistrings was sometimes coded wrong
|
||||||
|
|
||||||
|
Revision 1.44 1999/05/18 21:58:33 florian
|
||||||
* fixed some bugs related to temp. ansistrings and functions results
|
* fixed some bugs related to temp. ansistrings and functions results
|
||||||
which return records/objects/arrays which need init/final.
|
which return records/objects/arrays which need init/final.
|
||||||
|
|
||||||
|
@ -427,6 +427,9 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
calcregisters(p,0,0,0);
|
calcregisters(p,0,0,0);
|
||||||
|
{ looks a little bit dangerous to me }
|
||||||
|
{ len-1 gives problems with is_open_array if len=0, }
|
||||||
|
{ is_open_array checks now for isconstructor (FK) }
|
||||||
p^.resulttype:=new(parraydef,init(0,len-1,s32bitdef));
|
p^.resulttype:=new(parraydef,init(0,len-1,s32bitdef));
|
||||||
parraydef(p^.resulttype)^.definition:=pd;
|
parraydef(p^.resulttype)^.definition:=pd;
|
||||||
parraydef(p^.resulttype)^.IsConstructor:=true;
|
parraydef(p^.resulttype)^.IsConstructor:=true;
|
||||||
@ -449,7 +452,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.29 1999-05-17 23:51:45 peter
|
Revision 1.30 1999-05-19 10:31:55 florian
|
||||||
|
* two bugs reported by Romio (bugs 13) are fixed:
|
||||||
|
- empty array constructors are now handled correctly (e.g. for sysutils.format)
|
||||||
|
- comparsion of ansistrings was sometimes coded wrong
|
||||||
|
|
||||||
|
Revision 1.29 1999/05/17 23:51:45 peter
|
||||||
* with temp vars now use a reference with a persistant temp instead
|
* with temp vars now use a reference with a persistant temp instead
|
||||||
of setting datasize
|
of setting datasize
|
||||||
|
|
||||||
|
@ -286,7 +286,8 @@ implementation
|
|||||||
begin
|
begin
|
||||||
is_open_array:=(p^.deftype=arraydef) and
|
is_open_array:=(p^.deftype=arraydef) and
|
||||||
(parraydef(p)^.lowrange=0) and
|
(parraydef(p)^.lowrange=0) and
|
||||||
(parraydef(p)^.highrange=-1);
|
(parraydef(p)^.highrange=-1) and
|
||||||
|
not(is_array_constructor(p));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -810,7 +811,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.60 1999-05-18 14:16:01 peter
|
Revision 1.61 1999-05-19 10:31:56 florian
|
||||||
|
* two bugs reported by Romio (bugs 13) are fixed:
|
||||||
|
- empty array constructors are now handled correctly (e.g. for sysutils.format)
|
||||||
|
- comparsion of ansistrings was sometimes coded wrong
|
||||||
|
|
||||||
|
Revision 1.60 1999/05/18 14:16:01 peter
|
||||||
* containsself fixes
|
* containsself fixes
|
||||||
* checktypes()
|
* checktypes()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user