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

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to