[fpc-devel] Pure function development
J. Gareth Moreton
gareth at moreton-family.com
Wed Apr 29 22:43:17 CEST 2020
So are you officially rejecting pure functions and my future work on
them in this form?
Gareth aka. Kit
On 29/04/2020 21:40, Jonas Maebe wrote:
> On 29/04/2020 22:08, J. Gareth Moreton wrote:
>> Constant propagation is only really beneficial for inline functions,
> That is incorrect.
>
>> although there is some crossover with pure functions. I was more meaning
>> a system of tracking and storing these constants, or rather how they
>> manipulate variables throughout a pure function.
> That is exactly what -Ooconstprop does, although (as mentioned before),
> to a quite limited extent. It doesn't extract the constants from the
> nodes, but replaces variables (load nodes) with the constant nodes that
> were assigned to them earlier, and then at the end runs the simplify
> pass over the resulting node tree. The simplify pass already contains
> all support for merging expressions involving only constant nodes into
> single constants, so it has no need for storing the constant data in a
> separate structure and then duplicate all the constant evaluations for
> that extra structure.
>
>
> Jonas
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the fpc-devel
mailing list