[fpc-devel] Progress on pure functions

J. Gareth Moreton gareth at moreton-family.com
Wed Dec 14 02:17:25 CET 2022


So there are bugs in my pure function code, specifically with the use of 
current_procinfo - I didn't realise until now that the one relating to 
the current function is actually freed after the body has been parsed.

Ideally I would have gone the approach of reusing more of the 
pass1_inline code and replacing the local variables and parameters with 
temprefs, but data flow analysis doesn't yet work properly with temprefs 
(and I haven't been able to work out why... basically if I let them get 
included, their life information isn't filled in, so dead-store 
elimination will strip ALL of the definitions, even the ones that are 
very much needed).  I'll keep at it!

Kit



More information about the fpc-devel mailing list