[fpc-devel] Pure function development

Jonas Maebe jonas at freepascal.org
Wed Apr 29 19:46:13 CEST 2020

On 29/04/2020 13:41, J. Gareth Moreton wrote:
> Thanks for the response.  Yes, this is all inside the compiler.
> Basically I need a means to keep track of the internal state of a
> function as I step through the nodes (a process I call 'node
> emulation'), namely local variables, parameters (if they're not const,
> they're basically just like local variables), and the function Result
> and out parameters.  Since these may be all sorts of things like
> integers, floating-point values, strings or record types, I need a
> system that can handle all of these value types. I figure the compiler
> has an existing structure somewhere, but I'm not sure what it is.

It's called constant propagation. -Ooconstprop enables this, but the
current support is very limited.


More information about the fpc-devel mailing list