[fpc-devel] [Suggestion] Enumeration range-check intrinsic

Ben Grasset operator97 at gmail.com
Mon Jul 15 22:56:59 CEST 2019


On Sat, Jul 13, 2019 at 9:02 PM Sven Barth via fpc-devel <
fpc-devel at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190715/974e76c9/attachment.html>


More information about the fpc-devel mailing list