[issue7682] Optimisation of if with constant expression

2010-01-12 Thread Sylvain Defresne
Sylvain Defresne added the comment: Correct version of the patch. -- Added file: http://bugs.python.org/file15837/compile.diff ___ Python tracker <http://bugs.python.org/issue7

[issue7682] Optimisation of if with constant expression

2010-01-12 Thread Sylvain Defresne
Changes by Sylvain Defresne : Removed file: http://bugs.python.org/file15836/compile.diff ___ Python tracker <http://bugs.python.org/issue7682> ___ ___ Python-bugs-list m

[issue7682] Optimisation of if with constant expression

2010-01-12 Thread Sylvain Defresne
New submission from Sylvain Defresne : Python compiler detect some constant expression used in if / while statement and evaluate them at compilation. However, it does not perform some simple optimisation (evaluating not unary expression or checking if and or or expression are constant because