> On Apr 11, 2023, at 2:58 PM, Marco van de Voort via fpc-devel > <[email protected]> wrote: > > But the core problem is that you don't have an overview of all other > descendants in the compiler. Those can be fragmented over multiple units, and > then you touch the problem that whole program optimization like > de-virtualization tries to solve.
I didn’t get this at first but I see what you mean. The call site would only have access the descendants it knew about that point during compilation. So the case may not have a full set of descendants to work from. I used to write code like this and there was always a way to make things work so maybe in practice it’s not as bad as it sounds but the VTable is clearly a more general purpose solution. Regards, Ryan Joseph _______________________________________________ fpc-devel maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
