mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-05 06:13:20 +01:00
* fixed init table generation for classes and arrays
This commit is contained in:
parent
7304829f53
commit
a44fb4a474
@ -1134,10 +1134,16 @@ uses
|
|||||||
else
|
else
|
||||||
datasegment^.concat(new(pai_const,init_32bit(0)));
|
datasegment^.concat(new(pai_const,init_32bit(0)));
|
||||||
{ inittable for con-/destruction }
|
{ inittable for con-/destruction }
|
||||||
|
{
|
||||||
if aktclass^.needs_inittable then
|
if aktclass^.needs_inittable then
|
||||||
datasegment^.concat(new(pai_const_symbol,init(aktclass^.get_inittable_label)))
|
}
|
||||||
|
{ we generate the init table for classes always, because needs_inittable }
|
||||||
|
{ for classes is always false, it applies only for objects }
|
||||||
|
datasegment^.concat(new(pai_const_symbol,init(aktclass^.get_inittable_label)));
|
||||||
|
{
|
||||||
else
|
else
|
||||||
datasegment^.concat(new(pai_const,init_32bit(0)));
|
datasegment^.concat(new(pai_const,init_32bit(0)));
|
||||||
|
}
|
||||||
{ auto table }
|
{ auto table }
|
||||||
datasegment^.concat(new(pai_const,init_32bit(0)));
|
datasegment^.concat(new(pai_const,init_32bit(0)));
|
||||||
{ interface table }
|
{ interface table }
|
||||||
@ -1535,7 +1541,10 @@ uses
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.16 2000-01-28 23:17:53 florian
|
Revision 1.17 2000-02-05 14:33:32 florian
|
||||||
|
* fixed init table generation for classes and arrays
|
||||||
|
|
||||||
|
Revision 1.16 2000/01/28 23:17:53 florian
|
||||||
* virtual XXXX; support for objects, only if -dWITHDMT is defined
|
* virtual XXXX; support for objects, only if -dWITHDMT is defined
|
||||||
|
|
||||||
Revision 1.15 2000/01/27 16:31:40 florian
|
Revision 1.15 2000/01/27 16:31:40 florian
|
||||||
|
|||||||
@ -1947,7 +1947,7 @@
|
|||||||
|
|
||||||
procedure tarraydef.write_rtti_data;
|
procedure tarraydef.write_rtti_data;
|
||||||
begin
|
begin
|
||||||
rttilist^.concat(new(pai_const,init_8bit(13)));
|
rttilist^.concat(new(pai_const,init_8bit(tkarray)));
|
||||||
write_rtti_name;
|
write_rtti_name;
|
||||||
{ size of elements }
|
{ size of elements }
|
||||||
rttilist^.concat(new(pai_const,init_32bit(elementtype.def^.size)));
|
rttilist^.concat(new(pai_const,init_32bit(elementtype.def^.size)));
|
||||||
@ -2169,6 +2169,7 @@
|
|||||||
|
|
||||||
var
|
var
|
||||||
count : longint;
|
count : longint;
|
||||||
|
|
||||||
procedure count_inittable_fields(sym : pnamedindexobject);{$ifndef fpc}far;{$endif}
|
procedure count_inittable_fields(sym : pnamedindexobject);{$ifndef fpc}far;{$endif}
|
||||||
begin
|
begin
|
||||||
if ((psym(sym)^.typ=varsym) and
|
if ((psym(sym)^.typ=varsym) and
|
||||||
@ -3623,15 +3624,20 @@ Const local_symtable_index : longint = $8001;
|
|||||||
var
|
var
|
||||||
oldb : boolean;
|
oldb : boolean;
|
||||||
begin
|
begin
|
||||||
{ there are recursive calls to needs_inittable possible, }
|
if is_class then
|
||||||
{ so we have to change to old value how else should }
|
needs_inittable:=false
|
||||||
{ we do that ? check_rec_rtti can't be a nested }
|
else
|
||||||
{ procedure of needs_rtti ! }
|
begin
|
||||||
oldb:=binittable;
|
{ there are recursive calls to needs_inittable possible, }
|
||||||
binittable:=false;
|
{ so we have to change to old value how else should }
|
||||||
symtable^.foreach({$ifndef TP}@{$endif}check_rec_inittable);
|
{ we do that ? check_rec_rtti can't be a nested }
|
||||||
needs_inittable:=binittable;
|
{ procedure of needs_rtti ! }
|
||||||
binittable:=oldb;
|
oldb:=binittable;
|
||||||
|
binittable:=false;
|
||||||
|
symtable^.foreach({$ifndef TP}@{$endif}check_rec_inittable);
|
||||||
|
needs_inittable:=binittable;
|
||||||
|
binittable:=oldb;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -3915,7 +3921,10 @@ Const local_symtable_index : longint = $8001;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.192 2000-02-04 20:00:22 florian
|
Revision 1.193 2000-02-05 14:33:32 florian
|
||||||
|
* fixed init table generation for classes and arrays
|
||||||
|
|
||||||
|
Revision 1.192 2000/02/04 20:00:22 florian
|
||||||
* an exception in a construcor calls now the destructor (this applies only
|
* an exception in a construcor calls now the destructor (this applies only
|
||||||
to classes)
|
to classes)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user