Sign in Join

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

Mailing lists / fpc-devel / 2014-11

RTTI interface & variant late binding issue (mORMot)

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Alf

As a (very) long time Pascal programmer (TP/ FPC / Delphi), I have helped the developer of mORMot
(http://synopse.info/fossil/wiki?name=SQLite3+Framework) to port his framework to FPC. With success. Many Linux (ARM) servers now run mORMot thanks to FPC.

There are, however, two showstoppers, that inhibit the full deployment of mORMot with FPC.
They were reported, by the developer, as being feature requests and/or bugs (#26773 and #26774).

My question to the list.

I have a personal interest in 100% integration of mORMot with FPC (Linux [ARM]).

Questions:
1) Are there any known workarounds and/or design changes that I could implement into mORMot to tackle these two mORMot-problems.
2) If acceptable, what can we do for FPC to get these two aspects to work for mORMot.
(e.g. #26774: who will implement this feature and when ; can we help implementing this feature)

Thanks.

Reply by email

Michael Van Canneyt
to Alf
Alf wrote 14 lines
As a (very) long time Pascal programmer (TP/ FPC / Delphi), I have helped the developer of mORMot (http://synopse.info/fossil/wiki?name=SQLite3+Framework) to port his framework to FPC. With success. Many Linux (ARM) servers now run mORMot thanks to FPC.   There are, however, two showstoppers, that inhibit the full deployment of mORMot with FPC. They were reported, by the developer, as being feature requests and/or bugs (#26773 and #26774).   My question to the list.   I have a personal interest in 100% integration of mORMot with FPC (Linux [ARM]).   Questions: 1) Are there any known workarounds and/or design changes that I could implement into mORMot to tackle these two mORMot-problems. 2) If acceptable, what can we do for FPC to get these two aspects to work for mORMot. (e.g. #26774: who will implement this feature and when ; can we help implementing this feature)

The fixing of these bugs/features is definitely acceptable.

For 26773:
this will also need fixes in the compiler, since you propose a change in a compilerproc. However, this should be easily doable.

(however, it makes me wonder what will happen if delphi fixes their compiler. Being able to change a const parameter is simply a bug in the compiler)

For 26774:

- You can try contracting joost van der sluis (), he offers commercial support for lazarus/FPC. He did recently some work on the extended attributes, I'm sure he can do the task.

- You can try offering a bounty on the mailing list and see who takes up the task.

- Last but not least, you can dive in the code yourself.

Michael.

Reply by email

Jonas Maebe
to Michael Van Canneyt
Michael Van Canneyt wrote
For 26773: this will also need fixes in the compiler, since you propose a change in a compilerproc. However, this should be easily doable.

If it's just a change from "var" to "const", nothing needs to be changed in the compiler. The parameter passing of compilerprocs is handled by the regular call node code. The ability to do this was the main reason to introduce them.

Some of the other changes would however need a note on http://wiki.freepascal.org/User_Changes_Trunk , since they may require changes to user code (given that a number of tests also need to be changed).

Jonas

Reply by email

Michael Van Canneyt
to Jonas Maebe
Jonas Maebe wrote 12 lines
On 05 Nov 2014, at 10:21, Michael Van Canneyt wrote: > For 26773: > this will also need fixes in the compiler, since you propose a change in a > compilerproc. > However, this should be easily doable. If it's just a change from "var" to "const", nothing needs to be changed in the compiler. The parameter passing of compilerprocs is handled by the regular call node code. The ability to do this was the main reason to introduce them.

Even better.

Some of the other changes would however need a note on http://wiki.freepascal.org/User_Changes_Trunk , since they may require changes to user code (given that a number of tests also need to be changed).

Well, if no compiler changes are needed, I will 26774 is out of my league, though.

Michael.

Reply by email

Steve Hildebrandt
to Michael Van Canneyt
Michael Van Canneyt wrote 12 lines
On Wed, 5 Nov 2014, Jonas Maebe wrote: > > Some of the other changes would however need a note on > http://wiki.freepascal.org/User_Changes_Trunk , since they may > require changes to user code (given that a number of tests also need > to be changed). Well, if no compiler changes are needed, I will look at 26773. Implementing 26774 is out of my league, though.

Just so everyone is up to date on this.
As I wrote in http://bugs.freepascal.org/view.php?id=26774: It would be useful to have somebody provide a specification for the RTTI layout. I'm willing to supply a patch, since I have a working implementation with my own layout one top of the current trunk.

mfg Steve Hildebrandt

Reply by email

Michael Van Canneyt
to Steve Hildebrandt
Steve Hildebrandt wrote 15 lines
Am 05.11.2014 um 13:02 schrieb Michael Van Canneyt: On Wed, 5 Nov 2014, Jonas Maebe wrote: Some of the other changes would however need a note on http://wiki.freepascal.org/User_Changes_Trunk , since they may require changes to user code (given that a number of tests also need to be changed). Well, if no compiler changes are needed, I will 26774 is out of my league, though. Just so everyone is up to date on this. As I wrote in http://bugs.freepascal.org/view.php?id=26774: It would be useful to have somebody provide a specification for the RTTI layout. I'm willing to supply a patch, since I have a working implementation with my own layout one top of the current trunk.

As far as I know, the layout of this particular kind of RTTI can be deduced from the TypInfo unit of Delphi. At least XE seems to have the info present.

Michael.

Reply by email

Jonas Maebe
to Michael Van Canneyt
Michael Van Canneyt wrote
As far as I know, the layout of this particular kind of RTTI can be deduced from the TypInfo unit of Delphi. At least XE seems to have the info present.

This should be done using a clean room approach though: one person can read the code and document the layout, while someone else implements it. Especially since you'll presumably also have to write your own TypInfo unit code for FPC afterwards to access the data.

Jonas

Reply by email

Michael Van Canneyt
to Jonas Maebe
Jonas Maebe wrote 11 lines
On 05 Nov 2014, at 16:34, Michael Van Canneyt wrote: > As far as I know, the layout of this particular kind of RTTI can be deduced > from the TypInfo unit of Delphi. > At least XE seems to have the info present. This should be done using a clean room approach though: one person can read the code and document the layout, while someone else implements it. Especially since you'll presumably also have to write your own TypInfo unit code for FPC afterwards to access the data.

I have fixed bug 26773. (test included in testsuite) I will try to document the RTTI format tomorrow, so it can be implemented/patched ASAP.

Michael.

Reply by email