[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9e59cb403efa by Serhiy Storchaka in branch 'default': Issue #27703: Got rid of unnecessary NULL checks in do_raise() in release mode. https://hg.python.org/cpython/rev/9e59cb403efa -- nosy: +python-dev __

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: do_raise_v2.patch (with asserts) LGTM. There are two ways that lead to this point (and third way leads to raising an exception), and additional assertions make the code clearer, because a reader shouldn't follow all these patch for reading the code after ass

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-08 Thread Antti Haapala
Antti Haapala added the comment: No, I was just trying to explain why your change could be considered beneficial. -- ___ Python tracker ___ __

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for the comment, Antti. > would be nice to go see the call site and see asserts in place there, > showing that the arguments never were NULL to begin with. So is it still not enough getting the two asserts? IMHO I think the two asserts have already meet

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Antti Haapala
Antti Haapala added the comment: Normally I wouldn't recommend changing working code. However those asserts would be OK; if either of them is NULL, then the previous if would have had undefined behaviour already. Thus the `XDECREF` wrongly signals that it'd be OK if they were NULLs until this

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file44042/do_raise_v2.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your reply Raymond. You always provide thoughtful feedbacks, though it makes me somewhat more nervous. ;) (I am nervous about making noise here and waste others' time.) > Have you checked all the possibly code paths to be sure? Yes. I did check all th

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Have you checked all the possibly code paths to be sure? "Seems to be unnecessary" is insufficient reason for undoing Guido's code that has stood since 1997. Looking at the snarl of possible code paths, I not finding it obvious why some of the paths

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Xiang Zhang
New submission from Xiang Zhang: In do_raise, the two Py_XDECREFs at the final of the success branch seem doing unnecessary NULL checks. -- components: Interpreter Core files: do_raise.patch keywords: patch messages: 272119 nosy: serhiy.storchaka, xiang.zhang priority: normal severity: