On Sun, Apr 26, 2020 at 4:08 AM Anthony Walter via fpc-devel <
fpc-devel@lists.freepascal.org> wrote:

> Thank you Ryan and Sven. Your work is much appreciated as usual.
>
> However, Michael beat me to it in asking how this feature is useful. I am
> sure there might be use cases, but for right now I am coming up without any
> real advantages. Could anyone with better insight than me please explain?
>

A simple, but IMO exciting use case is just that it can provide
impossible-to-achieve-otherwise optimizations via const propagation.

For example, some functions and procedures that used to have to take
numerical values as regular parameters can now instead take them as generic
constant parameters, which allows the compiler to "carry them farther" than
it ever would have previously.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to