[fpc-pascal] Pascal Ardiono (avr) library
Jonas Maebe
jonas at freepascal.org
Sun Apr 4 13:00:47 CEST 2021
On 04/04/2021 12:50, Joost van der Sluis via fpc-pascal wrote:
> One thing is constant-propagation in combination with auto-inlining. It
> would be really nice when calling PinMode with two constant parameters,
> would only lead to setting the constant value at two memory locations.
> (Between avr_save and avr_restore) Yes, then I have to change the
> parameters to const, and add {$WRITEABLECONST OFF} to the Arduino unit.
>
> I doubt many (if any) compiler will/can do this. But that would be
> ideal. (I think we need the concept Gareth calls 'pure functions' for this)
No, but you would need to add support to the compiler for keeping a
symbolic representation of typed constants.
Jonas
More information about the fpc-pascal
mailing list