[fpc-devel] Thoughts: Make FillChar etc. an intrinsic for specialised performance potential

Sven Barth pascaldragon at googlemail.com
Sat Apr 16 16:44:47 CEST 2022


J. Gareth Moreton via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am
Sa., 16. Apr. 2022, 01:33:

> Actual Pascal calls to FillChar would not change in any way and so
> theoretically it won't break existing code.  The only drawback is that
> the intrinsic and the internal System functions would have to be named
> the same so constructs such as "FuncPtr := @FillChar;" as well as
> calling FillChar from assembler routines stilll work, and the compiler
> would have to know how to differentiate between the two.
>

Intrinsic symbols do not participate in overload selection and you can't
have both an intrinsic and a function symbol in the same unit. The
construct you showed thus *will* fail.

Note: this is not necessarily an argument against doing this, cause with
3.2.0 we did the same with Insert and Delete when they were extended to
support dynamic arrays as well, but it needs to be kept in mind.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20220416/04088a2a/attachment.htm>


More information about the fpc-devel mailing list