[fpc-devel] RTTI for ProcVar types

Steve Hildebrandt Steve.Kassel at web.de
Sun Mar 24 22:49:23 CET 2013


Am 24.03.2013 22:26, schrieb Sven Barth:
> I don't know immediately how you can differentiate between anonymous 
> types and named ones, but that would be the key difference.
Since the function building the name usied to access the RTTI table uses 
only the smytables to decide weather the type is annonymous or 
referenced by it's name I thought that approach was ok.
(symdef.pas 1434)
     function Tstoreddef.rtti_mangledname(rt:trttitype):string;
      ...
         if assigned(typesym) and
            (owner.symtabletype in [staticsymtable,globalsymtable]) then
           result:=make_mangledname(prefix,owner,typesym.name)
         else
result:=make_mangledname(prefix,findunitsymtable(owner),'DEF'+tostr(DefId))
       end;
Or are nested types also referenced by the definition id?(I had 
something on my mind like Unit Type SubType with some seperators("$") in 
between)
> Also if you should do a bug report please reformat your patch first, 
> so that it adheres to the compiler's format style (and don't change 
> the formatting of other code like the one in the case except for 
> overall indentation). E.g. for the above code from your patch
Is there some template to use with code tools oder some formatter you 
use.(For this I think I can manage manually but if further issues 
arrise. It would be better to know if there an easier way to do this^^)

mfg Necem



More information about the fpc-devel mailing list