[fpc-devel] Thoughts: Make FillChar etc. an intrinsic for specialised performance potential
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel