[issue28517] Dead code in wordcode

2018-11-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: the off by one error fix here introduced a new off by one error. PR coming, follow https://bugs.python.org/issue35193 for that. -- nosy: +gregory.p.smith ___ Python tracker

[issue28517] Dead code in wordcode

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1084 ___ Python tracker ___ ___

[issue28517] Dead code in wordcode

2016-10-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> closed ___ Python tracker ___

[issue28517] Dead code in wordcode

2016-10-25 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: ah ok, thanks for the explanation. -- ___ Python tracker ___ ___

[issue28517] Dead code in wordcode

2016-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The main problem was that this bug caused unnecessary breakage of tests in Victor's bytecode [1]. Stéphane, the number of opcodes to the end of the block was counted incorrectly. Just off-by-one error. One unreachable opcode always was left. [1]

[issue28517] Dead code in wordcode

2016-10-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5784cc37b5f4 by Serhiy Storchaka in branch '3.6': Issue #28517: Fixed of-by-one error in the peephole optimizer that caused https://hg.python.org/cpython/rev/5784cc37b5f4 New changeset 8d571fab4d66 by Serhiy Storchaka in branch 'default': Issue

[issue28517] Dead code in wordcode

2016-10-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: +0 The situation this addresses isn't common and the patch will rarely produce a perceptable benefit (just making the disassembly look a little nicer). That said, change looks simple enough and doesn't add any overhead. -- nosy: +rhettinger

[issue28517] Dead code in wordcode

2016-10-24 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Serhiy, Could you help me, because I don't understand your patch ? because a RETURN_VALUE will go to the end of the block, and in this case, I don't understand why there is a JUMP_FORWARD at 12 in Python 3.6. -- nosy: +matrixise

[issue28517] Dead code in wordcode

2016-10-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes removing unreachable code after RETURN_VALUE in peephole optimizer. -- assignee: -> serhiy.storchaka keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file45202/peephole_remove_unreachable_code.patch

[issue28517] Dead code in wordcode

2016-10-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: >>> def func(test): ... if test == 1: ... return 1 ... elif test == 2: ... return 2 ... return 3 ... >>> import dis >>> dis.dis(func) Python 3.5: 2 0 LOAD_FAST0 (test) 3 LOAD_CONST