[fpc-devel] [Suggestion] Enumeration range-check intrinsic
Sven Barth
pascaldragon at googlemail.com
Mon Jul 15 23:23:18 CEST 2019
Ben Grasset <operator97 at gmail.com> schrieb am Mo., 15. Juli 2019, 22:57:
> 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.
>
That is exactly what is happening if you have a specialization in multiple
units that don't know about each other.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190715/41aa053c/attachment.html>
More information about the fpc-devel
mailing list