mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 07:09:09 +02:00
* don't reuse defs when writing RTTI for stored properties, as their layout
depends on how exactly they are stored git-svn-id: trunk@32757 -
This commit is contained in:
parent
3509a247d4
commit
5201547043
@ -356,6 +356,7 @@ implementation
|
|||||||
sym : tsym;
|
sym : tsym;
|
||||||
proctypesinfo : byte;
|
proctypesinfo : byte;
|
||||||
propnameitem : tpropnamelistitem;
|
propnameitem : tpropnamelistitem;
|
||||||
|
propdefname : string;
|
||||||
|
|
||||||
procedure writeaccessproc(pap:tpropaccesslisttypes; shiftvalue : byte; unsetvalue: byte);
|
procedure writeaccessproc(pap:tpropaccesslisttypes; shiftvalue : byte; unsetvalue: byte);
|
||||||
var
|
var
|
||||||
@ -460,10 +461,17 @@ implementation
|
|||||||
if (sym.typ=propertysym) and
|
if (sym.typ=propertysym) and
|
||||||
(sym.visibility=vis_published) then
|
(sym.visibility=vis_published) then
|
||||||
begin
|
begin
|
||||||
|
{ we can only easily reuse defs if the property is not stored,
|
||||||
|
because otherwise the rtti layout depends on how the "stored"
|
||||||
|
is defined (field, indexed expression, virtual method, ...) }
|
||||||
|
if not(ppo_stored in tpropertysym(sym).propoptions) then
|
||||||
|
propdefname:=internaltypeprefixName[itp_rtti_prop]+tostr(length(tpropertysym(sym).realname))
|
||||||
|
else
|
||||||
|
propdefname:='';
|
||||||
{ TPropInfo is a packed record (even on targets that require
|
{ TPropInfo is a packed record (even on targets that require
|
||||||
alignment), but it starts aligned }
|
alignment), but it starts aligned }
|
||||||
tcb.begin_anonymous_record(
|
tcb.begin_anonymous_record(
|
||||||
internaltypeprefixName[itp_rtti_prop]+tostr(length(tpropertysym(sym).realname)),
|
propdefname,
|
||||||
1,reqalign,
|
1,reqalign,
|
||||||
targetinfos[target_info.system]^.alignment.recordalignmin,
|
targetinfos[target_info.system]^.alignment.recordalignmin,
|
||||||
targetinfos[target_info.system]^.alignment.maxCrecordalign);
|
targetinfos[target_info.system]^.alignment.maxCrecordalign);
|
||||||
|
Loading…
Reference in New Issue
Block a user