[fpc-devel] Compile time functions

R0b0t1 r030t1 at gmail.com
Sat Jul 21 05:11:38 CEST 2018


On Fri, Jul 20, 2018 at 7:08 PM, Sven Barth via fpc-devel
<fpc-devel at lists.freepascal.org> wrote:
> Martok <listbox at martoks-place.de> schrieb am Fr., 20. Juli 2018, 23:20:
>>
>>
>> What do you think?
>
>
> The main problem is that not all functions that would be eligible for your
> approach are also declared as inline thus their node trees would not be
> stored inside the PPU and thus you could not work with them.
> Additional benefit of the "pure" modifier: the compiler can check once the
> method has been parsed whether it's pure or not and can thus error out in
> the latter case.
>

How does the existing constprop optimization relate to the pure
modifier? I apologize if this was already covered.



More information about the fpc-devel mailing list