Issue 11510: Fix BUILD_SET optimizer bug.

This commit is contained in:
Raymond Hettinger 2011-03-15 15:03:36 -07:00
parent 31f218bc6b
commit 0661e91fed
2 changed files with 15 additions and 2 deletions

View file

@ -535,7 +535,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);