mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 23:49:29 +02:00
* insert vmt as hidden field in objectdefs
* don't output hidden fields in the debug info git-svn-id: trunk@11334 -
This commit is contained in:
parent
98e843c092
commit
c00108009d
@ -1870,7 +1870,7 @@ implementation
|
||||
fieldoffset,
|
||||
fieldnatsize: aint;
|
||||
begin
|
||||
if sp_static in sym.symoptions then
|
||||
if ([sp_static,sp_hidden] * sym.symoptions <> []) then
|
||||
exit;
|
||||
|
||||
if (tabstractrecordsymtable(sym.owner).usefieldalignment<>bit_alignment) or
|
||||
|
@ -351,6 +351,8 @@ implementation
|
||||
newss : ansistring;
|
||||
ss : pansistring absolute arg;
|
||||
begin
|
||||
if (sp_hidden in tsym(p).symoptions) then
|
||||
exit;
|
||||
{ static variables from objects are like global objects }
|
||||
if (Tsym(p).typ=fieldvarsym) and
|
||||
not(sp_static in Tsym(p).symoptions) then
|
||||
|
@ -3968,6 +3968,8 @@ implementation
|
||||
|
||||
|
||||
procedure tobjectdef.insertvmt;
|
||||
var
|
||||
vs: tfieldvarsym;
|
||||
begin
|
||||
if objecttype in [odt_interfacecom,odt_interfacecorba,odt_dispinterface] then
|
||||
exit;
|
||||
@ -3986,8 +3988,10 @@ implementation
|
||||
end;
|
||||
|
||||
vmt_offset:=tObjectSymtable(symtable).datasize;
|
||||
tObjectSymtable(symtable).datasize:=
|
||||
tObjectSymtable(symtable).datasize+sizeof(pint);
|
||||
vs:=tfieldvarsym.create('_vptr$'+objname^,vs_value,voidpointertype,[]);
|
||||
hidesym(vs);
|
||||
tObjectSymtable(symtable).insert(vs);
|
||||
tObjectSymtable(symtable).addfield(vs);
|
||||
include(objectoptions,oo_has_vmt);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user