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

Ben Grasset operator97 at gmail.com
Tue Jul 16 00:13:27 CEST 2019


On Mon, Jul 15, 2019 at 5:50 PM Michael Van Canneyt <michael at freepascal.org>
wrote:

> As far as I know, they are not. I believe that when specializing, the
> compiler checks if an identical specialization is in scope:
> if so, it uses that. If not, a duplicate is made.
>
> As far as I know, Delphi behaves the same.
>
> Michael.
>

I was aware of the "identical specialization" check (or at least, I assumed
it worked that way.)

It still seems to me though that while heavy use of generics is certainly
reflected in PPU size (for example, on x86_64 Windows, the release mode PPU
of Generics.Collections.pas with my build of FPC is slightly over 30 MB)
the PPU size does not really correspond to object file size or overall
binary size (which again might be thanks to some stage of FPC itself, or
the linker in the case of external ones, or both.)

I suppose FPC does probably diverge from Delphi behavior at some point
there too, as Delphi uses only DCUs, with no separate ".O"s.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190715/08d06d9a/attachment-0001.html>


More information about the fpc-devel mailing list