Sign in Join

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

Mailing lists / fpc-devel / 2011-08

delphi 2010/XE/XE2 - like rtti and "packages"

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Dimitri Smits

Hi,

A few times the latest weeks, I noticed on this list (and the Lazarus list(s)) a "need" for the Delphi rtti extra's and the Delphi meaning of packages (program/library/*package*/unit).

I am willing to reboot what I started and give it another shot with rtti.

Both are at least partly intertwined, so I might need some help of you all with a system more exotic than a Wintel machine ;-)

First off:
* Delphi's RTTI starts from package/unit/type tree that is registered on startup/loadup of a binary with the RTL. Be it executable or dynlib. => what units/objects/classes/... in the fpc compiler would I need to alter to allow the following additions on windows, but eventually all platforms:
- a smartlinkable "section" per module (=executable/dynlib) for the package info (preferably, here the init/finit block may be expanded/replaced with a link to the unitblock)
- a smartlinkable "section" per unit for the typeinfo for when used in a "package" module
- a smartlinkable "section" per unit for the typeinfo for when used in a "program" or "library" module

I know that I might/would need to alter some types in respective typinfo/sysutils to accomodate in the rtl, but I would first like to know how to generate them in the output. :-)

optimally, one wouldn't need 2 different versions of the unit-typeinfo, but I was thinking that in package we take all the types, in one section. And in the other for program/library, we would allow smartlinking to take out subsections that are not needed.

So, any help/redirection to documentation or units is greatly appreciated (as well for the "section" and what can be done with them).

once I get a tree-hierarchy of module/package<->units<->typeinfos working, I intend to go on with the RTTI unit implementation and subsequent questions on that topic.

kind regards,
Dimitri Smits

Reply by email

Sven Barth
to Dimitri Smits
Dimitri Smits wrote
once I get a tree-hierarchy of module/package<->units<->typeinfos working, I intend to go on with the RTTI unit implementation and subsequent questions on that topic.

Please note that for a fully compatible implementation of the RTTI unit you'll need generic methods (and maybe a working Create for records, don't remember that...). I plan to work on these once I've finished implementing the Delphi compatible generic syntax in my branch.

Regards,
Sven

Reply by email