mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 12:26:07 +02:00
* change RecInitTable into a direct reference to avoid an unnecessary indirection as both the full and init RTTI of a record always reside inside the same unit
git-svn-id: trunk@35128 -
This commit is contained in:
parent
e580e22576
commit
7089677a22
@ -863,7 +863,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ point to more optimal init table }
|
{ point to more optimal init table }
|
||||||
include(def.defstates,ds_init_table_used);
|
include(def.defstates,ds_init_table_used);
|
||||||
write_rtti_reference(tcb,def,initrtti);
|
{ we use a direct reference as the init RTTI is always in the same
|
||||||
|
unit as the full RTTI }
|
||||||
|
tcb.emit_tai(Tai_const.Create_sym(ref_rtti(def,initrtti,false)),voidpointertype);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tcb.emit_ord_const(def.size,u32inttype);
|
tcb.emit_ord_const(def.size,u32inttype);
|
||||||
|
@ -49,7 +49,7 @@ type
|
|||||||
{$endif USE_PACKED}
|
{$endif USE_PACKED}
|
||||||
record
|
record
|
||||||
{$ifndef VER3_0}
|
{$ifndef VER3_0}
|
||||||
InitTable: PPointer;
|
InitTable: Pointer;
|
||||||
{$endif VER3_0}
|
{$endif VER3_0}
|
||||||
Size: Longint;
|
Size: Longint;
|
||||||
Count: Longint;
|
Count: Longint;
|
||||||
@ -116,7 +116,7 @@ begin
|
|||||||
{ check terminator, maybe we are already in init table }
|
{ check terminator, maybe we are already in init table }
|
||||||
if Assigned(PRecordInfoInit(typeInfo)^.Terminator) then
|
if Assigned(PRecordInfoInit(typeInfo)^.Terminator) then
|
||||||
{ point to more optimal initrtti }
|
{ point to more optimal initrtti }
|
||||||
result:=PRecordInfoFull(result)^.InitTable^;
|
result:=PRecordInfoFull(result)^.InitTable;
|
||||||
{$endif VER3_0}
|
{$endif VER3_0}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ unit typinfo;
|
|||||||
tkRecord:
|
tkRecord:
|
||||||
(
|
(
|
||||||
{$ifndef VER3_0}
|
{$ifndef VER3_0}
|
||||||
RecInitTable: PPointer;
|
RecInitTable: Pointer; { points to TTypeInfo followed by init table }
|
||||||
{$endif VER3_0}
|
{$endif VER3_0}
|
||||||
RecSize: Integer;
|
RecSize: Integer;
|
||||||
ManagedFldCount: Integer;
|
ManagedFldCount: Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user