Hi,

Dag Sverre Seljebotn wrote:
> Why is compile time folding done before expression analysis?

;) Because you proposed to move it there at the time? The alternative was
to split the type analysis phase to make some type information available
before the 'real' analysis.


> It would 
> seem sensible that as compile time folding shouldn't affect semantics (? 
> at least expression type semantics?) it can just as well be done after 
> expression analysis.

I did that to fix places where the "result_code" was used during the type
analysis phase. It's also great to know that an expression is constant in a
couple of other places, such as the decision if division needs a zero check.

This somewhat covers the problem that type analysis is still doing stuff in
some nodes that would fit a lot better into later phases, especially into
code generation. We did most of this for 0.12 already (e.g. gil checking),
but there are still issues.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to