[fpc-devel] RTTI
Sven Barth
pascaldragon at googlemail.com
Wed Nov 25 19:29:10 CET 2015
On 25.11.2015 17:52, Michael Van Canneyt wrote:
>
>
> On Wed, 25 Nov 2015, Sven Barth wrote:
>
>> Am 25.11.2015 14:58 schrieb "Michael Van Canneyt"
>> <michael at freepascal.org>:
>>>
>>>
>>>
>>> On Wed, 25 Nov 2015, Anthony Walter wrote:
>>>
>>>> Can someone refer me to a document regarding the whats planned for FPC
>> RTTI
>>>> improvements? Is it aiming to support the current Delphi RTTI
>> improvements
>>>> (attributes, virtual method intercepts, location and tvalue) or
>>>> something
>>>> else?
>>>
>>>
>>> There is no document.
>>>
>>> To my knowledge:
>>>
>>> - Attributes are supported in a branch already scheduled to be merged
>> after 3.0.0 is out.
>>>
>>> - The location and tvalue are in the branch for which the merge request
>> was just posted.
>>>
>>> - I think virtual method intercepts are not implemented or planned.
>>> I am not sure whether this needs many extra things in the compiler, it
>> just
>>> requires the interface RTTI and a RTL helper class ?
>>
>> Virtual method interceptors are not implemented, but they are planned
>> just
>> like every other Delphi compatible part of the RTTI. They require a
>> bit of
>> platform dependent support though as they'll need to deal with calling
>> conventions (even if it might only be one as AFAIK we only allow the
>> default calling convention for virtual methods...).
>
> Sounds like the same code as for interface method RTTI can be reused.
But that will only provide half of it, because a Virtual Method
Interceptor (VMI) also needs to provide the callee while for the
interface method RTTI (or later on Invoke()) you only need to provide
the necessary means to call the function (which a VMI needs to be able
to do as well, which is what I mean "half").
Regards,
Sven
More information about the fpc-devel
mailing list