Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2026-10

published versus advanced rtti

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Frb

Afaik the published keywords only purpose is to add RTTI (or do nothing, depending on $M).

Afaik using advanced rtti (I haven't done yet) you can add RTTI to other fields too?

If so, is there any difference in the result?

The reason for asking is that this is under discussion for adding Dwarf representation. Originally based on the idea to mark published fields. But since other language have rtti too, using the name "published" would be to limiting (as Pascal only). So the idea now is to add a flag, that a field has rtti => in Pascal to be used to point out published.

If advanced RTTi is effectively the same as published (albeit possible with extended info), then its likely going to be the one flag. If there are reasons where the difference between published and advanced needs to be known, then this may be the time to make it known.

Reply by email

Martin Frb
to Martin Frb

btw, would it make sense to ask a dwarf rtti attribute to be more than a flag (ie. a pointer to the location?)

I know the class has the pointer as first entry.

fields... How is the rtti for TMyClass.MyPulbishedInt found? by name?

And for other types? Rtti for an enum?

Martin Frb wrote 26 lines
Afaik the published keywords only purpose is to add RTTI (or do nothing, depending on $M). Afaik using advanced rtti (I haven't done yet) you can add RTTI to other fields too? If so, is there any difference in the result? The reason for asking is that this is under discussion for adding Dwarf representation. Originally based on the idea to mark published fields. But since other language have rtti too, using the name "published" would be to limiting (as Pascal only). So the idea now is to add a flag, that a field has rtti => in Pascal to be used to point out published. If advanced RTTi is effectively the same as published (albeit possible with extended info), then its likely going to be the one flag. If there are reasons where the difference between published and advanced needs to be known, then this may be the time to make it known. _______________________________________________ fpc-devel maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Michael Van Canneyt
to Martin Frb: Afaik the published keywords only purpose is to add RTTI (or do nothing, depending on $M).
Martin Frb wrote 5 lines
Afaik the published keywords only purpose is to add RTTI (or do nothing, depending on $M). Afaik using advanced rtti (I haven't done yet) you can add RTTI to other fields too?

Yes.

If so, is there any difference in the result?

Yes. Extended RTTI is put in separate tables, although we try to re-use existing data for published property RTTI.

Show quoted text 7 lines
The reason for asking is that this is under discussion for adding Dwarf representation. Originally based on the idea to mark published fields. But since other language have rtti too, using the name "published" would be to limiting (as Pascal only). So the idea now is to add a flag, that a field has rtti => in Pascal to be used to point out published.

... and when extended RTTI is present ?

If advanced RTTi is effectively the same as published (albeit possible with extended info), then its likely going to be the one flag. If there are reasons where the difference between published and advanced needs to be known, then this may be the time to make it known.

The means of accessing the info is different, so it is probably necessary to have 2 flags.

Michael.

Reply by email