[fpc-pascal] Case statement for class introspection

Sven Barth pascaldragon at googlemail.com
Mon Jan 17 11:09:24 CET 2022


Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am
Mo., 17. Jan. 2022, 08:53:

>
>
> > On Jan 17, 2022, at 1:55 PM, Sven Barth <pascaldragon at googlemail.com>
> wrote:
> >
> > Question then is how you get the VMT address as a constant at compile
> time.
> >
> > I'll need to get back to you with that.
> >
>
> I didn't test yet but I think what you're saying is that VMT writer would
> need to have generated this address in advance of doing tcasenode.pass_1,
> which could presumably get this address in some integer form. Is that
> basically what you're thinking is possible?
>

The VMT writer already does that, cause the VMT pointer is required for
each constructor call.


> If it's a big problem I guess the question is if the if blocks are really
> that bad compared to alternative ( I would need to basically redo the
> entire thing also).
>

That is of course the question.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220117/a5e3c7c1/attachment.htm>


More information about the fpc-pascal mailing list