Issue 11510: Fix BUILD_SET optimizer bug.

This commit is contained in:
Raymond Hettinger 2011-03-15 14:50:16 -07:00
parent 729c5e203d
commit 29dcaad6eb
3 changed files with 17 additions and 2 deletions

View file

@ -475,7 +475,8 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
}
if (codestr[i+3] != UNPACK_SEQUENCE ||
!ISBASICBLOCK(blocks,i,6) ||
j != GETARG(codestr, i+3))
j != GETARG(codestr, i+3) ||
opcode == BUILD_SET)
continue;
if (j == 1) {
memset(codestr+i, NOP, 6);