[fpc-devel] Pure function development
Jonas Maebe
jonas at freepascal.org
Wed Apr 29 23:45:17 CEST 2020
On 29/04/2020 23:29, J. Gareth Moreton wrote:
> Pure functions are a slightly tricky one because there is a lot of
> overlap with inline functions and constant propagation, and yet there
> are concepts that aren't covered by either, such as 'promotion' of pure
> function calls outside of loops and assignment of pure function results
> to compile-time constants.
Your original message stated that you were looking at a way to develop
"'node emulation' so it can step through a pure function and compute
output values".
I'm not saying "the constant propagation optimisation does the same as
pure functions". I'm saying "'node emulation' of a function is the same
as constant propagation through that function, pure or not".
Jonas
More information about the fpc-devel
mailing list