فهرست منبع

Merged revisions 11334 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r11334 | jonas | 2008-07-06 10:41:56 +0100 (Sun, 06 Jul 2008) | 3 lines

* insert vmt as hidden field in objectdefs
* don't output hidden fields in the debug info

........

git-svn-id: branches/llvm@11335 -

Jonas Maebe 17 سال پیش
والد
کامیت
54aeb154eb
3فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 1 1
      compiler/dbgdwarf.pas
  2. 2 0
      compiler/dbgstabs.pas
  3. 6 2
      compiler/symdef.pas

+ 1 - 1
compiler/dbgdwarf.pas

@@ -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

+ 2 - 0
compiler/dbgstabs.pas

@@ -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

+ 6 - 2
compiler/symdef.pas

@@ -4055,6 +4055,8 @@ implementation
 
 
    procedure tobjectdef.insertvmt;
+     var
+       vs: tfieldvarsym;
      begin
         if objecttype in [odt_interfacecom,odt_interfacecorba,odt_dispinterface] then
           exit;
@@ -4073,8 +4075,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;