|
@@ -1357,21 +1357,17 @@ implementation
|
|
|
|
|
|
procedure recorddef_rtti(def:trecorddef);
|
|
procedure recorddef_rtti(def:trecorddef);
|
|
|
|
|
|
- procedure write_record_operators;
|
|
|
|
|
|
+ procedure write_record_operators(rttilab:tasmlabel);
|
|
var
|
|
var
|
|
- rttilab: Tasmsymbol;
|
|
|
|
rttidef: tdef;
|
|
rttidef: tdef;
|
|
tcb: ttai_typedconstbuilder;
|
|
tcb: ttai_typedconstbuilder;
|
|
mop: tmanagementoperator;
|
|
mop: tmanagementoperator;
|
|
procdef: tprocdef;
|
|
procdef: tprocdef;
|
|
begin
|
|
begin
|
|
- rttilab := current_asmdata.DefineAsmSymbol(
|
|
|
|
- internaltypeprefixName[itp_init_record_operators]+def.rtti_mangledname(rt),
|
|
|
|
- AB_GLOBAL,AT_DATA,def);
|
|
|
|
tcb:=ctai_typedconstbuilder.create([tcalo_make_dead_strippable]);
|
|
tcb:=ctai_typedconstbuilder.create([tcalo_make_dead_strippable]);
|
|
|
|
|
|
tcb.begin_anonymous_record(
|
|
tcb.begin_anonymous_record(
|
|
- rttilab.Name,
|
|
|
|
|
|
+ '',
|
|
defaultpacking,min(reqalign,SizeOf(PInt)),
|
|
defaultpacking,min(reqalign,SizeOf(PInt)),
|
|
targetinfos[target_info.system]^.alignment.recordalignmin
|
|
targetinfos[target_info.system]^.alignment.recordalignmin
|
|
);
|
|
);
|
|
@@ -1400,6 +1396,8 @@ implementation
|
|
tcb.free;
|
|
tcb.free;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+ var
|
|
|
|
+ oplab : tasmlabel;
|
|
begin
|
|
begin
|
|
write_header(tcb,def,tkRecord);
|
|
write_header(tcb,def,tkRecord);
|
|
{ need extra reqalign record, because otherwise the u32 int will
|
|
{ need extra reqalign record, because otherwise the u32 int will
|
|
@@ -1426,6 +1424,7 @@ implementation
|
|
|
|
|
|
tcb.emit_ord_const(def.size,u32inttype);
|
|
tcb.emit_ord_const(def.size,u32inttype);
|
|
|
|
|
|
|
|
+ oplab:=nil;
|
|
{ store rtti management operators only for init table }
|
|
{ store rtti management operators only for init table }
|
|
if rt=initrtti then
|
|
if rt=initrtti then
|
|
begin
|
|
begin
|
|
@@ -1434,9 +1433,12 @@ implementation
|
|
if (trecordsymtable(def.symtable).managementoperators=[]) then
|
|
if (trecordsymtable(def.symtable).managementoperators=[]) then
|
|
tcb.emit_tai(Tai_const.Create_nil_dataptr,voidpointertype)
|
|
tcb.emit_tai(Tai_const.Create_nil_dataptr,voidpointertype)
|
|
else
|
|
else
|
|
- tcb.emit_tai(Tai_const.Createname(
|
|
|
|
- internaltypeprefixName[itp_init_record_operators]+def.rtti_mangledname(rt),
|
|
|
|
- AT_DATA_FORCEINDIRECT,0),voidpointertype);
|
|
|
|
|
|
+ begin
|
|
|
|
+ current_asmdata.getlocaldatalabel(oplab);
|
|
|
|
+ tcb.emit_tai(Tai_const.Createname(
|
|
|
|
+ oplab.name,
|
|
|
|
+ AT_DATA_FORCEINDIRECT,0),voidpointertype);
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
|
|
|
|
fields_write_rtti_data(tcb,def,rt);
|
|
fields_write_rtti_data(tcb,def,rt);
|
|
@@ -1445,7 +1447,7 @@ implementation
|
|
|
|
|
|
{ write pointers to operators if needed }
|
|
{ write pointers to operators if needed }
|
|
if (rt=initrtti) and (trecordsymtable(def.symtable).managementoperators<>[]) then
|
|
if (rt=initrtti) and (trecordsymtable(def.symtable).managementoperators<>[]) then
|
|
- write_record_operators;
|
|
|
|
|
|
+ write_record_operators(oplab);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|