On Sat, Jul 13, 2019 at 9:02 PM Sven Barth via fpc-devel <
fpc-devel@lists.freepascal.org> wrote:

> Not necessarily. If you have two units that don't know about each other
> that specialize the function with the same enum then you'd have two
> specializations already.
>

Surely that only applies to what winds up in the PPUs for the units in
question, if anything, though? As opposed to the object files and the final
executable. Like, I don't see how it could possibly be the case that if two
/ three / four / e.t.c units all use Generics.Collections, and each one
contains an instance of something like:

var IntList: TList<LongInt>

that this means the resulting binary contains  two / three / four /
e.t.c  separate complete instantiations of TList for LongInt. You'd wind up
with executables in the literal hundreds-of-megabytes range if that were
so, even with optimizations / symbol stripping and so on activated.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to