summaryrefslogtreecommitdiff
path: root/Python/peephole.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-03-15 14:50:16 -0700
committerRaymond Hettinger <python@rcn.com>2011-03-15 14:50:16 -0700
commit1461e055cc52862f93f225a129b332dbd64f193c (patch)
tree950f358349a5c634d8022e1109fc9b487ba64413 /Python/peephole.c
parent84c0b13744a430814a0dfc658c6cb7f7314c8985 (diff)
downloadcpython-1461e055cc52862f93f225a129b332dbd64f193c.tar.gz
Issue 11510: Fix BUILD_SET optimizer bug.
Diffstat (limited to 'Python/peephole.c')
-rw-r--r--Python/peephole.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/peephole.c b/Python/peephole.c
index f972e1611e..6985043917 100644
--- a/Python/peephole.c
+++ b/Python/peephole.c
@@ -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);