diff Python/peephole.c @ 68565:db6997fb4c99

Issue 11510: Fix BUILD_SET optimizer bug.
author Raymond Hettinger <python@rcn.com>
date Tue, 15 Mar 2011 15:03:36 -0700
parents 14205d0fee45
children ab45c4d0b6ef
line wrap: on
line diff
--- a/Python/peephole.c	Tue Mar 15 17:43:21 2011 -0400
+++ b/Python/peephole.c	Tue Mar 15 15:03:36 2011 -0700
@@ -535,7 +535,8 @@
                 }
                 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);