|
@@ -118,7 +118,7 @@ interface
|
|
{$endif WITHDMT}
|
|
{$endif WITHDMT}
|
|
{ interfaces }
|
|
{ interfaces }
|
|
function genintftable: tasmlabel;
|
|
function genintftable: tasmlabel;
|
|
- { write the VMT to al_data }
|
|
|
|
|
|
+ { write the VMT to al_globals }
|
|
procedure writevmt;
|
|
procedure writevmt;
|
|
procedure writeinterfaceids;
|
|
procedure writeinterfaceids;
|
|
end;
|
|
end;
|
|
@@ -263,13 +263,13 @@ implementation
|
|
objectlibrary.getdatalabel(p^.nl);
|
|
objectlibrary.getdatalabel(p^.nl);
|
|
if assigned(p^.l) then
|
|
if assigned(p^.l) then
|
|
writenames(p^.l);
|
|
writenames(p^.l);
|
|
- asmlist[al_data].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
- asmlist[al_data].concat(Tai_label.Create(p^.nl));
|
|
|
|
|
|
+ asmlist[al_globals].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
+ asmlist[al_globals].concat(Tai_label.Create(p^.nl));
|
|
len:=strlen(p^.data.messageinf.str);
|
|
len:=strlen(p^.data.messageinf.str);
|
|
- asmlist[al_data].concat(tai_const.create_8bit(len));
|
|
|
|
|
|
+ asmlist[al_globals].concat(tai_const.create_8bit(len));
|
|
getmem(ca,len+1);
|
|
getmem(ca,len+1);
|
|
move(p^.data.messageinf.str^,ca^,len+1);
|
|
move(p^.data.messageinf.str^,ca^,len+1);
|
|
- asmlist[al_data].concat(Tai_string.Create_pchar(ca));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_string.Create_pchar(ca));
|
|
if assigned(p^.r) then
|
|
if assigned(p^.r) then
|
|
writenames(p^.r);
|
|
writenames(p^.r);
|
|
end;
|
|
end;
|
|
@@ -281,8 +281,8 @@ implementation
|
|
writestrentry(p^.l);
|
|
writestrentry(p^.l);
|
|
|
|
|
|
{ write name label }
|
|
{ write name label }
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(p^.nl));
|
|
|
|
- asmlist[al_data].concat(Tai_const.Createname(p^.data.mangledname,AT_FUNCTION,0));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(p^.nl));
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Createname(p^.data.mangledname,AT_FUNCTION,0));
|
|
|
|
|
|
if assigned(p^.r) then
|
|
if assigned(p^.r) then
|
|
writestrentry(p^.r);
|
|
writestrentry(p^.r);
|
|
@@ -305,10 +305,10 @@ implementation
|
|
|
|
|
|
{ now start writing of the message string table }
|
|
{ now start writing of the message string table }
|
|
objectlibrary.getdatalabel(r);
|
|
objectlibrary.getdatalabel(r);
|
|
- asmlist[al_data].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
- asmlist[al_data].concat(Tai_label.Create(r));
|
|
|
|
|
|
+ asmlist[al_globals].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
+ asmlist[al_globals].concat(Tai_label.Create(r));
|
|
genstrmsgtab:=r;
|
|
genstrmsgtab:=r;
|
|
- asmlist[al_data].concat(Tai_const.Create_32bit(count));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_32bit(count));
|
|
if assigned(root) then
|
|
if assigned(root) then
|
|
begin
|
|
begin
|
|
writestrentry(root);
|
|
writestrentry(root);
|
|
@@ -323,8 +323,8 @@ implementation
|
|
writeintentry(p^.l);
|
|
writeintentry(p^.l);
|
|
|
|
|
|
{ write name label }
|
|
{ write name label }
|
|
- asmlist[al_data].concat(Tai_const.Create_32bit(p^.data.messageinf.i));
|
|
|
|
- asmlist[al_data].concat(Tai_const.Createname(p^.data.mangledname,AT_FUNCTION,0));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_32bit(p^.data.messageinf.i));
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Createname(p^.data.mangledname,AT_FUNCTION,0));
|
|
|
|
|
|
if assigned(p^.r) then
|
|
if assigned(p^.r) then
|
|
writeintentry(p^.r);
|
|
writeintentry(p^.r);
|
|
@@ -343,10 +343,10 @@ implementation
|
|
|
|
|
|
{ now start writing of the message string table }
|
|
{ now start writing of the message string table }
|
|
objectlibrary.getdatalabel(r);
|
|
objectlibrary.getdatalabel(r);
|
|
- asmlist[al_data].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
- asmlist[al_data].concat(Tai_label.Create(r));
|
|
|
|
|
|
+ asmlist[al_globals].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
+ asmlist[al_globals].concat(Tai_label.Create(r));
|
|
genintmsgtab:=r;
|
|
genintmsgtab:=r;
|
|
- asmlist[al_data].concat(Tai_const.Create_32bit(count));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_32bit(count));
|
|
if assigned(root) then
|
|
if assigned(root) then
|
|
begin
|
|
begin
|
|
writeintentry(root);
|
|
writeintentry(root);
|
|
@@ -390,7 +390,7 @@ implementation
|
|
begin
|
|
begin
|
|
if assigned(p^.l) then
|
|
if assigned(p^.l) then
|
|
writedmtindexentry(p^.l);
|
|
writedmtindexentry(p^.l);
|
|
- al_data.concat(Tai_const.Create_32bit(p^.data.messageinf.i));
|
|
|
|
|
|
+ al_globals.concat(Tai_const.Create_32bit(p^.data.messageinf.i));
|
|
if assigned(p^.r) then
|
|
if assigned(p^.r) then
|
|
writedmtindexentry(p^.r);
|
|
writedmtindexentry(p^.r);
|
|
end;
|
|
end;
|
|
@@ -400,7 +400,7 @@ implementation
|
|
begin
|
|
begin
|
|
if assigned(p^.l) then
|
|
if assigned(p^.l) then
|
|
writedmtaddressentry(p^.l);
|
|
writedmtaddressentry(p^.l);
|
|
- al_data.concat(Tai_const_symbol.Createname(p^.data.mangledname,AT_FUNCTION,0));
|
|
|
|
|
|
+ al_globals.concat(Tai_const_symbol.Createname(p^.data.mangledname,AT_FUNCTION,0));
|
|
if assigned(p^.r) then
|
|
if assigned(p^.r) then
|
|
writedmtaddressentry(p^.r);
|
|
writedmtaddressentry(p^.r);
|
|
end;
|
|
end;
|
|
@@ -421,13 +421,13 @@ implementation
|
|
begin
|
|
begin
|
|
objectlibrary.getdatalabel(r);
|
|
objectlibrary.getdatalabel(r);
|
|
gendmt:=r;
|
|
gendmt:=r;
|
|
- al_data.concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
- al_data.concat(Tai_label.Create(r));
|
|
|
|
|
|
+ al_globals.concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
+ al_globals.concat(Tai_label.Create(r));
|
|
{ entries for caching }
|
|
{ entries for caching }
|
|
- al_data.concat(Tai_const.Create_ptr(0));
|
|
|
|
- al_data.concat(Tai_const.Create_ptr(0));
|
|
|
|
|
|
+ al_globals.concat(Tai_const.Create_ptr(0));
|
|
|
|
+ al_globals.concat(Tai_const.Create_ptr(0));
|
|
|
|
|
|
- al_data.concat(Tai_const.Create_32bit(count));
|
|
|
|
|
|
+ al_globals.concat(Tai_const.Create_32bit(count));
|
|
if assigned(root) then
|
|
if assigned(root) then
|
|
begin
|
|
begin
|
|
writedmtindexentry(root);
|
|
writedmtindexentry(root);
|
|
@@ -482,11 +482,11 @@ implementation
|
|
asmlist[al_typedconsts].concat(Tai_const.Create_8bit(length(tsym(p).realname)));
|
|
asmlist[al_typedconsts].concat(Tai_const.Create_8bit(length(tsym(p).realname)));
|
|
asmlist[al_typedconsts].concat(Tai_string.Create(tsym(p).realname));
|
|
asmlist[al_typedconsts].concat(Tai_string.Create(tsym(p).realname));
|
|
|
|
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(l));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(l));
|
|
if po_abstractmethod in pd.procoptions then
|
|
if po_abstractmethod in pd.procoptions then
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(nil))
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(nil))
|
|
else
|
|
else
|
|
- asmlist[al_data].concat(Tai_const.Createname(pd.mangledname,AT_FUNCTION,0));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Createname(pd.mangledname,AT_FUNCTION,0));
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -505,9 +505,9 @@ implementation
|
|
if count>0 then
|
|
if count>0 then
|
|
begin
|
|
begin
|
|
objectlibrary.getdatalabel(l);
|
|
objectlibrary.getdatalabel(l);
|
|
- asmlist[al_data].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
- asmlist[al_data].concat(Tai_label.Create(l));
|
|
|
|
- asmlist[al_data].concat(Tai_const.Create_32bit(count));
|
|
|
|
|
|
+ asmlist[al_globals].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
+ asmlist[al_globals].concat(Tai_label.Create(l));
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_32bit(count));
|
|
_class.symtable.foreach(@do_gen_published_methods,nil);
|
|
_class.symtable.foreach(@do_gen_published_methods,nil);
|
|
genpublishedmethodstable:=l;
|
|
genpublishedmethodstable:=l;
|
|
end
|
|
end
|
|
@@ -868,11 +868,8 @@ implementation
|
|
begin
|
|
begin
|
|
implintf:=_class.implementedinterfaces;
|
|
implintf:=_class.implementedinterfaces;
|
|
curintf:=implintf.interfaces(intfindex);
|
|
curintf:=implintf.interfaces(intfindex);
|
|
- rawdata.concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
- if maybe_smartlink_symbol then
|
|
|
|
- rawdata.concat(Tai_symbol.Createname_global(gintfgetvtbllabelname(intfindex),AT_DATA ,0))
|
|
|
|
- else
|
|
|
|
- rawdata.concat(Tai_symbol.Createname(gintfgetvtbllabelname(intfindex),AT_DATA,0));
|
|
|
|
|
|
+
|
|
|
|
+ section_symbol_start(rawdata,gintfgetvtbllabelname(intfindex),AT_DATA,true,sec_data,const_align(sizeof(aint)));
|
|
proccount:=implintf.implproccount(intfindex);
|
|
proccount:=implintf.implproccount(intfindex);
|
|
for i:=1 to proccount do
|
|
for i:=1 to proccount do
|
|
begin
|
|
begin
|
|
@@ -882,6 +879,7 @@ implementation
|
|
{ create reference }
|
|
{ create reference }
|
|
rawdata.concat(Tai_const.Createname(tmps,AT_FUNCTION,0));
|
|
rawdata.concat(Tai_const.Createname(tmps,AT_FUNCTION,0));
|
|
end;
|
|
end;
|
|
|
|
+ section_symbol_end(rawdata,gintfgetvtbllabelname(intfindex));
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -906,17 +904,17 @@ implementation
|
|
rawdata.concat(Tai_const.Create_16bit(curintf.iidguid^.D3));
|
|
rawdata.concat(Tai_const.Create_16bit(curintf.iidguid^.D3));
|
|
for i:=Low(curintf.iidguid^.D4) to High(curintf.iidguid^.D4) do
|
|
for i:=Low(curintf.iidguid^.D4) to High(curintf.iidguid^.D4) do
|
|
rawdata.concat(Tai_const.Create_8bit(curintf.iidguid^.D4[i]));
|
|
rawdata.concat(Tai_const.Create_8bit(curintf.iidguid^.D4[i]));
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(tmplabel));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(tmplabel));
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
{ nil for Corba interfaces }
|
|
{ nil for Corba interfaces }
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(nil));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(nil));
|
|
end;
|
|
end;
|
|
{ VTable }
|
|
{ VTable }
|
|
- asmlist[al_data].concat(Tai_const.Createname(gintfgetvtbllabelname(contintfindex),AT_DATA,0));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Createname(gintfgetvtbllabelname(contintfindex),AT_DATA,0));
|
|
{ IOffset field }
|
|
{ IOffset field }
|
|
- asmlist[al_data].concat(Tai_const.Create_32bit(implintf.ioffsets(contintfindex)));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_32bit(implintf.ioffsets(contintfindex)));
|
|
{ IIDStr }
|
|
{ IIDStr }
|
|
objectlibrary.getdatalabel(tmplabel);
|
|
objectlibrary.getdatalabel(tmplabel);
|
|
rawdata.concat(cai_align.create(const_align(sizeof(aint))));
|
|
rawdata.concat(cai_align.create(const_align(sizeof(aint))));
|
|
@@ -926,7 +924,7 @@ implementation
|
|
rawdata.concat(Tai_string.Create(upper(curintf.iidstr^)))
|
|
rawdata.concat(Tai_string.Create(upper(curintf.iidstr^)))
|
|
else
|
|
else
|
|
rawdata.concat(Tai_string.Create(curintf.iidstr^));
|
|
rawdata.concat(Tai_string.Create(curintf.iidstr^));
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(tmplabel));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(tmplabel));
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -1037,7 +1035,7 @@ implementation
|
|
max:=_class.implementedinterfaces.count;
|
|
max:=_class.implementedinterfaces.count;
|
|
|
|
|
|
rawdata:=TAAsmOutput.Create;
|
|
rawdata:=TAAsmOutput.Create;
|
|
- asmlist[al_data].concat(Tai_const.Create_16bit(max));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_16bit(max));
|
|
{ Two pass, one for allocation and vtbl creation }
|
|
{ Two pass, one for allocation and vtbl creation }
|
|
for i:=1 to max do
|
|
for i:=1 to max do
|
|
begin
|
|
begin
|
|
@@ -1062,7 +1060,7 @@ implementation
|
|
_class.implementedinterfaces.setioffsets(i,_class.implementedinterfaces.ioffsets(j));
|
|
_class.implementedinterfaces.setioffsets(i,_class.implementedinterfaces.ioffsets(j));
|
|
gintfgenentry(i,j,rawdata);
|
|
gintfgenentry(i,j,rawdata);
|
|
end;
|
|
end;
|
|
- asmlist[al_data].concatlist(rawdata);
|
|
|
|
|
|
+ asmlist[al_globals].concatlist(rawdata);
|
|
rawdata.free;
|
|
rawdata.free;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1160,8 +1158,8 @@ implementation
|
|
{ 2. step calc required fieldcount and their offsets in the object memory map
|
|
{ 2. step calc required fieldcount and their offsets in the object memory map
|
|
and write data }
|
|
and write data }
|
|
objectlibrary.getdatalabel(intftable);
|
|
objectlibrary.getdatalabel(intftable);
|
|
- asmlist[al_data].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
- asmlist[al_data].concat(Tai_label.Create(intftable));
|
|
|
|
|
|
+ asmlist[al_globals].concat(cai_align.create(const_align(sizeof(aint))));
|
|
|
|
+ asmlist[al_globals].concat(Tai_label.Create(intftable));
|
|
{ Optimize interface tables to reuse wrappers }
|
|
{ Optimize interface tables to reuse wrappers }
|
|
gintfoptimizevtbls;
|
|
gintfoptimizevtbls;
|
|
{ Write interface tables }
|
|
{ Write interface tables }
|
|
@@ -1179,21 +1177,21 @@ implementation
|
|
if assigned(_class.iidguid) then
|
|
if assigned(_class.iidguid) then
|
|
begin
|
|
begin
|
|
s:=make_mangledname('IID',_class.owner,_class.objname^);
|
|
s:=make_mangledname('IID',_class.owner,_class.objname^);
|
|
- maybe_new_object_file(asmlist[al_data]);
|
|
|
|
- new_section(asmlist[al_data],sec_rodata,s,const_align(sizeof(aint)));
|
|
|
|
- asmlist[al_data].concat(Tai_symbol.Createname_global(s,AT_DATA,0));
|
|
|
|
- asmlist[al_data].concat(Tai_const.Create_32bit(longint(_class.iidguid^.D1)));
|
|
|
|
- asmlist[al_data].concat(Tai_const.Create_16bit(_class.iidguid^.D2));
|
|
|
|
- asmlist[al_data].concat(Tai_const.Create_16bit(_class.iidguid^.D3));
|
|
|
|
|
|
+ maybe_new_object_file(asmlist[al_globals]);
|
|
|
|
+ new_section(asmlist[al_globals],sec_rodata,s,const_align(sizeof(aint)));
|
|
|
|
+ asmlist[al_globals].concat(Tai_symbol.Createname_global(s,AT_DATA,0));
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_32bit(longint(_class.iidguid^.D1)));
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_16bit(_class.iidguid^.D2));
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_16bit(_class.iidguid^.D3));
|
|
for i:=Low(_class.iidguid^.D4) to High(_class.iidguid^.D4) do
|
|
for i:=Low(_class.iidguid^.D4) to High(_class.iidguid^.D4) do
|
|
- asmlist[al_data].concat(Tai_const.Create_8bit(_class.iidguid^.D4[i]));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_8bit(_class.iidguid^.D4[i]));
|
|
end;
|
|
end;
|
|
- maybe_new_object_file(asmlist[al_data]);
|
|
|
|
|
|
+ maybe_new_object_file(asmlist[al_globals]);
|
|
s:=make_mangledname('IIDSTR',_class.owner,_class.objname^);
|
|
s:=make_mangledname('IIDSTR',_class.owner,_class.objname^);
|
|
- new_section(asmlist[al_data],sec_rodata,s,0);
|
|
|
|
- asmlist[al_data].concat(Tai_symbol.Createname_global(s,AT_DATA,0));
|
|
|
|
- asmlist[al_data].concat(Tai_const.Create_8bit(length(_class.iidstr^)));
|
|
|
|
- asmlist[al_data].concat(Tai_string.Create(_class.iidstr^));
|
|
|
|
|
|
+ new_section(asmlist[al_globals],sec_rodata,s,0);
|
|
|
|
+ asmlist[al_globals].concat(Tai_symbol.Createname_global(s,AT_DATA,0));
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_8bit(length(_class.iidstr^)));
|
|
|
|
+ asmlist[al_globals].concat(Tai_string.Create(_class.iidstr^));
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -1258,8 +1256,8 @@ implementation
|
|
if is_class(_class) then
|
|
if is_class(_class) then
|
|
begin
|
|
begin
|
|
objectlibrary.getdatalabel(classnamelabel);
|
|
objectlibrary.getdatalabel(classnamelabel);
|
|
- maybe_new_object_file(asmlist[al_data]);
|
|
|
|
- new_section(asmlist[al_data],sec_rodata,classnamelabel.name,const_align(sizeof(aint)));
|
|
|
|
|
|
+ maybe_new_object_file(asmlist[al_globals]);
|
|
|
|
+ new_section(asmlist[al_globals],sec_rodata,classnamelabel.name,const_align(sizeof(aint)));
|
|
|
|
|
|
{ interface table }
|
|
{ interface table }
|
|
if _class.implementedinterfaces.count>0 then
|
|
if _class.implementedinterfaces.count>0 then
|
|
@@ -1268,9 +1266,9 @@ implementation
|
|
methodnametable:=genpublishedmethodstable;
|
|
methodnametable:=genpublishedmethodstable;
|
|
fieldtablelabel:=_class.generate_field_table;
|
|
fieldtablelabel:=_class.generate_field_table;
|
|
{ write class name }
|
|
{ write class name }
|
|
- asmlist[al_data].concat(Tai_label.Create(classnamelabel));
|
|
|
|
- asmlist[al_data].concat(Tai_const.Create_8bit(length(_class.objrealname^)));
|
|
|
|
- asmlist[al_data].concat(Tai_string.Create(_class.objrealname^));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_label.Create(classnamelabel));
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_8bit(length(_class.objrealname^)));
|
|
|
|
+ asmlist[al_globals].concat(Tai_string.Create(_class.objrealname^));
|
|
|
|
|
|
{ generate message and dynamic tables }
|
|
{ generate message and dynamic tables }
|
|
if (oo_has_msgstr in _class.objectoptions) then
|
|
if (oo_has_msgstr in _class.objectoptions) then
|
|
@@ -1280,30 +1278,30 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
{ write debug info }
|
|
{ write debug info }
|
|
- maybe_new_object_file(asmlist[al_data]);
|
|
|
|
- new_section(asmlist[al_data],sec_rodata,_class.vmt_mangledname,const_align(sizeof(aint)));
|
|
|
|
|
|
+ maybe_new_object_file(asmlist[al_globals]);
|
|
|
|
+ new_section(asmlist[al_globals],sec_rodata,_class.vmt_mangledname,const_align(sizeof(aint)));
|
|
{$ifdef GDB}
|
|
{$ifdef GDB}
|
|
if (cs_debuginfo in aktmoduleswitches) then
|
|
if (cs_debuginfo in aktmoduleswitches) then
|
|
begin
|
|
begin
|
|
do_count_dbx:=true;
|
|
do_count_dbx:=true;
|
|
if assigned(_class.owner) and assigned(_class.owner.name) then
|
|
if assigned(_class.owner) and assigned(_class.owner.name) then
|
|
- asmlist[al_data].concat(Tai_stabs.Create(strpnew('"vmt_'+_class.owner.name^+_class.name+':S'+
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_stabs.Create(strpnew('"vmt_'+_class.owner.name^+_class.name+':S'+
|
|
tstoreddef(vmttype.def).numberstring+'",'+tostr(N_STSYM)+',0,0,'+_class.vmt_mangledname)));
|
|
tstoreddef(vmttype.def).numberstring+'",'+tostr(N_STSYM)+',0,0,'+_class.vmt_mangledname)));
|
|
end;
|
|
end;
|
|
{$endif GDB}
|
|
{$endif GDB}
|
|
- asmlist[al_data].concat(Tai_symbol.Createname_global(_class.vmt_mangledname,AT_DATA,0));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_symbol.Createname_global(_class.vmt_mangledname,AT_DATA,0));
|
|
|
|
|
|
{ determine the size with symtable.datasize, because }
|
|
{ determine the size with symtable.datasize, because }
|
|
{ size gives back 4 for classes }
|
|
{ size gives back 4 for classes }
|
|
- asmlist[al_data].concat(Tai_const.Create(ait_const_ptr,tobjectsymtable(_class.symtable).datasize));
|
|
|
|
- asmlist[al_data].concat(Tai_const.Create(ait_const_ptr,-int64(tobjectsymtable(_class.symtable).datasize)));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create(ait_const_ptr,tobjectsymtable(_class.symtable).datasize));
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create(ait_const_ptr,-int64(tobjectsymtable(_class.symtable).datasize)));
|
|
{$ifdef WITHDMT}
|
|
{$ifdef WITHDMT}
|
|
if _class.classtype=ct_object then
|
|
if _class.classtype=ct_object then
|
|
begin
|
|
begin
|
|
if assigned(dmtlabel) then
|
|
if assigned(dmtlabel) then
|
|
- asmlist[al_data].concat(Tai_const_symbol.Create(dmtlabel)))
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const_symbol.Create(dmtlabel)))
|
|
else
|
|
else
|
|
- asmlist[al_data].concat(Tai_const.Create_ptr(0));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_ptr(0));
|
|
end;
|
|
end;
|
|
{$endif WITHDMT}
|
|
{$endif WITHDMT}
|
|
{ write pointer to parent VMT, this isn't implemented in TP }
|
|
{ write pointer to parent VMT, this isn't implemented in TP }
|
|
@@ -1312,52 +1310,52 @@ implementation
|
|
{ it is not written for parents that don't have any vmt !! }
|
|
{ it is not written for parents that don't have any vmt !! }
|
|
if assigned(_class.childof) and
|
|
if assigned(_class.childof) and
|
|
(oo_has_vmt in _class.childof.objectoptions) then
|
|
(oo_has_vmt in _class.childof.objectoptions) then
|
|
- asmlist[al_data].concat(Tai_const.Createname(_class.childof.vmt_mangledname,AT_DATA,0))
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Createname(_class.childof.vmt_mangledname,AT_DATA,0))
|
|
else
|
|
else
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(nil));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(nil));
|
|
|
|
|
|
{ write extended info for classes, for the order see rtl/inc/objpash.inc }
|
|
{ write extended info for classes, for the order see rtl/inc/objpash.inc }
|
|
if is_class(_class) then
|
|
if is_class(_class) then
|
|
begin
|
|
begin
|
|
{ pointer to class name string }
|
|
{ pointer to class name string }
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(classnamelabel));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(classnamelabel));
|
|
{ pointer to dynamic table or nil }
|
|
{ pointer to dynamic table or nil }
|
|
if (oo_has_msgint in _class.objectoptions) then
|
|
if (oo_has_msgint in _class.objectoptions) then
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(intmessagetable))
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(intmessagetable))
|
|
else
|
|
else
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(nil));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(nil));
|
|
{ pointer to method table or nil }
|
|
{ pointer to method table or nil }
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(methodnametable));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(methodnametable));
|
|
{ pointer to field table }
|
|
{ pointer to field table }
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(fieldtablelabel));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(fieldtablelabel));
|
|
{ pointer to type info of published section }
|
|
{ pointer to type info of published section }
|
|
if (oo_can_have_published in _class.objectoptions) then
|
|
if (oo_can_have_published in _class.objectoptions) then
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(_class.get_rtti_label(fullrtti)))
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(_class.get_rtti_label(fullrtti)))
|
|
else
|
|
else
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(nil));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(nil));
|
|
{ inittable for con-/destruction }
|
|
{ inittable for con-/destruction }
|
|
if _class.members_need_inittable then
|
|
if _class.members_need_inittable then
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(_class.get_rtti_label(initrtti)))
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(_class.get_rtti_label(initrtti)))
|
|
else
|
|
else
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(nil));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(nil));
|
|
{ auto table }
|
|
{ auto table }
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(nil));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(nil));
|
|
{ interface table }
|
|
{ interface table }
|
|
if _class.implementedinterfaces.count>0 then
|
|
if _class.implementedinterfaces.count>0 then
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(interfacetable))
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(interfacetable))
|
|
else
|
|
else
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(nil));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(nil));
|
|
{ table for string messages }
|
|
{ table for string messages }
|
|
if (oo_has_msgstr in _class.objectoptions) then
|
|
if (oo_has_msgstr in _class.objectoptions) then
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(strmessagetable))
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(strmessagetable))
|
|
else
|
|
else
|
|
- asmlist[al_data].concat(Tai_const.Create_sym(nil));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.Create_sym(nil));
|
|
end;
|
|
end;
|
|
{ write virtual methods }
|
|
{ write virtual methods }
|
|
- writevirtualmethods(asmlist[al_data]);
|
|
|
|
- asmlist[al_data].concat(Tai_const.create(ait_const_ptr,0));
|
|
|
|
|
|
+ writevirtualmethods(asmlist[al_globals]);
|
|
|
|
+ asmlist[al_globals].concat(Tai_const.create(ait_const_ptr,0));
|
|
{ write the size of the VMT }
|
|
{ write the size of the VMT }
|
|
- asmlist[al_data].concat(Tai_symbol_end.Createname(_class.vmt_mangledname));
|
|
|
|
|
|
+ asmlist[al_globals].concat(Tai_symbol_end.Createname(_class.vmt_mangledname));
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|