[issue11471] If without else generates redundant jump

2014-09-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Pushed after applying Serhiy's suggestion. Thank you! -- ___ Python tracker ___ ___ Python-bugs-list

[issue11471] If without else generates redundant jump

2014-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0ca9d32aed4 by Antoine Pitrou in branch 'default': Closes #11471: avoid generating a JUMP_FORWARD instruction at the end of an if-block if there is no else-clause. https://hg.python.org/cpython/rev/c0ca9d32aed4 -- nosy: +python-dev resolut

[issue11471] If without else generates redundant jump

2014-09-08 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue11471] If without else generates redundant jump

2014-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Attila Fazekas just has provided almost the same patch in issue22358. -- stage: patch review -> commit review versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue11471] If without else generates redundant jump

2013-12-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ __

[issue11471] If without else generates redundant jump

2013-10-14 Thread Georg Brandl
Georg Brandl added the comment: Yep :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue11471] If without else generates redundant jump

2013-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just for the record, have you passed the whole test suite after cleaning up the pyc files, -- ___ Python tracker ___ __

[issue11471] If without else generates redundant jump

2013-10-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: lgtm -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue11471] If without else generates redundant jump

2013-10-14 Thread Georg Brandl
Georg Brandl added the comment: Updated patch with test suite update. -- Added file: http://bugs.python.org/file32120/if_else_nojump_2.patch ___ Python tracker ___ __

[issue11471] If without else generates redundant jump

2013-10-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think it's fine with the simplification I suggested. -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue11471] If without else generates redundant jump

2013-10-14 Thread Georg Brandl
Georg Brandl added the comment: I'll make a complete patch with test suite additions (and fixing test_dis) if this is deemed to be a correct approach. -- ___ Python tracker ___

[issue11471] If without else generates redundant jump

2013-10-14 Thread Georg Brandl
Georg Brandl added the comment: Python-ast.c can't be changed; it is auto-generated. But the whole thing can be handled in compile.c I think -- see attached patch. Test suite passes (except for test_dis, which checks compilation result against a given list of bytecodes). -- nosy: +g

[issue11471] If without else generates redundant jump

2011-03-11 Thread Eugene Toder
Eugene Toder added the comment: Test case (needed some refactoring to avoid duplication). -- Added file: http://bugs.python.org/file21092/if_no_else_test.patch ___ Python tracker __

[issue11471] If without else generates redundant jump

2011-03-11 Thread Eugene Toder
New submission from Eugene Toder : If statement without else part generates unnecessary JUMP_FORWARD insn with jumps right to the next insn: >>> def foo(x): if x: x = 1 >>> dis(foo) 2 0 LOAD_FAST0 (x) 3 POP_JUMP_IF_FALSE 15