mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 05:59:30 +02:00
* put data that's used by the VMT into the same section (that also means changing some sections from rodata_norel to rodata); this way the amount of sections per class is reduced (e.g. two for classes that inherited from a class with interfaces)
git-svn-id: trunk@35364 -
This commit is contained in:
parent
deb86a9e70
commit
b813fc641f
@ -244,7 +244,7 @@ implementation
|
||||
begin
|
||||
if assigned(p^.l) then
|
||||
writenames(tcb,p^.l);
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata_norel,'',datatcb,p^.nl);
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,_class.vmt_mangledname,datatcb,p^.nl);
|
||||
len:=length(p^.data.messageinf.str^);
|
||||
datatcb.maybe_begin_aggregate(carraydef.getreusable(cansichartype,len+1));
|
||||
datatcb.emit_tai(tai_const.create_8bit(len),cansichartype);
|
||||
@ -292,7 +292,7 @@ implementation
|
||||
writenames(tcb,root);
|
||||
|
||||
{ now start writing the message string table }
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,'',datatcb,lab);
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,_class.vmt_mangledname,datatcb,lab);
|
||||
{
|
||||
TStringMessageTable = record
|
||||
count : longint;
|
||||
@ -363,7 +363,7 @@ implementation
|
||||
msgs : array[0..0] of TMsgIntTable;
|
||||
end;
|
||||
}
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,'',datatcb,lab);
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,_class.vmt_mangledname,datatcb,lab);
|
||||
gettabledef(itp_vmt_msgint_table_entries,s32inttype,msginttabledef,count,0,msgintdef,msgintarrdef);
|
||||
datatcb.maybe_begin_aggregate(msgintdef);
|
||||
datatcb.emit_tai(Tai_const.Create_32bit(count),s32inttype);
|
||||
@ -509,7 +509,7 @@ implementation
|
||||
(pd.visibility=vis_published) then
|
||||
begin
|
||||
{ l: name_of_method }
|
||||
lists^.pubmethodstcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata_norel,'',datatcb,l);
|
||||
lists^.pubmethodstcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,_class.vmt_mangledname,datatcb,l);
|
||||
namedef:=datatcb.emit_shortstring_const(tsym(p).realname);
|
||||
lists^.pubmethodstcb.finish_internal_data_builder(datatcb,l,namedef,sizeof(pint));
|
||||
{ the tmethodnamerec }
|
||||
@ -556,7 +556,7 @@ implementation
|
||||
entries : packed array[0..0] of tmethodnamerec;
|
||||
end;
|
||||
}
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,'',lists.pubmethodstcb,lab);
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,_class.vmt_mangledname,lists.pubmethodstcb,lab);
|
||||
gettabledef(itp_vmt_intern_tmethodnametable,u32inttype,lists.methodnamerec,count,1,pubmethodsdef,pubmethodsarraydef);
|
||||
{ begin tmethodnametable }
|
||||
lists.pubmethodstcb.maybe_begin_aggregate(pubmethodsdef);
|
||||
@ -620,7 +620,7 @@ implementation
|
||||
packrecords:=1;
|
||||
|
||||
{ generate the class table }
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,'',datatcb,classtable);
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,_class.vmt_mangledname,datatcb,classtable);
|
||||
datatcb.begin_anonymous_record('$fpc_intern_classtable_'+tostr(classtablelist.Count-1),
|
||||
packrecords,1,
|
||||
targetinfos[target_info.system]^.alignment.recordalignmin,
|
||||
@ -651,7 +651,7 @@ implementation
|
||||
Fields: array[0..0] of TFieldInfo
|
||||
end;
|
||||
}
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,'',datatcb,lab);
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,_class.vmt_mangledname,datatcb,lab);
|
||||
{ can't easily specify a name here for reuse of the constructed def,
|
||||
since it's full of variable length shortstrings (-> all of those
|
||||
lengths and their order would have to incorporated in the name,
|
||||
@ -838,7 +838,7 @@ implementation
|
||||
fintfvtablelabels[i]:=fintfvtablelabels[_class.ImplementedInterfaces.IndexOf(ImplIntf.VtblImplIntf)];
|
||||
end;
|
||||
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,'',datatcb,lab);
|
||||
tcb.start_internal_data_builder(current_asmdata.AsmLists[al_const],sec_rodata,_class.vmt_mangledname,datatcb,lab);
|
||||
datatcb.begin_anonymous_record('',default_settings.packrecords,1,
|
||||
targetinfos[target_info.system]^.alignment.recordalignmin,
|
||||
targetinfos[target_info.system]^.alignment.maxCrecordalign);
|
||||
@ -1113,7 +1113,7 @@ implementation
|
||||
if is_class(_class) then
|
||||
begin
|
||||
{ write class name }
|
||||
tcb.start_internal_data_builder(current_asmdata.asmlists[al_const],sec_rodata_norel,'',datatcb,classnamelabel);
|
||||
tcb.start_internal_data_builder(current_asmdata.asmlists[al_const],sec_rodata,_class.vmt_mangledname,datatcb,classnamelabel);
|
||||
classnamedef:=datatcb.emit_shortstring_const(_class.RttiName);
|
||||
tcb.finish_internal_data_builder(datatcb,classnamelabel,classnamedef,sizeof(pint));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user