On Sunday, 17 November 2013 at 21:00:16 UTC, Jonathan M Davis wrote:
will definitely result in multiple calls to pure_func. It's not that it's impossible for the compiler to do it - it's perfectly possible. But doing so would require at least basic code flow analysis, and dmd almost never does any
kind of code flow analysis.

I remember Walter being against flow analysis in the frontend. This is middleend optimization stuff, though. Does dmd really use no data flow analysis anywhere?

Reply via email to