diff options
author | Raymond Hettinger <python@rcn.com> | 2003-06-20 16:13:17 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-06-20 16:13:17 (GMT) |
commit | b9572c3456d2c69e8629f98055f375980ccdf7f3 (patch) | |
tree | c74970a2431dcc7c5dc872faf66066d79ddf1278 /Python | |
parent | 7c0d7ba99d41b0ef201409dd1b45d58c38251981 (diff) | |
download | cpython-b9572c3456d2c69e8629f98055f375980ccdf7f3.zip cpython-b9572c3456d2c69e8629f98055f375980ccdf7f3.tar.gz cpython-b9572c3456d2c69e8629f98055f375980ccdf7f3.tar.bz2 |
Removed bytecode transformation for sequence packing/unpacking.
It depended on the previously removed basic block checker to
prevent a jump into the middle of the transformed block.
Clears SF 757818: tuple assignment -- SystemError: unknown opcode
Diffstat (limited to 'Python')
-rw-r--r-- | Python/compile.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/Python/compile.c b/Python/compile.c index 1d01a26..61b3c96 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -363,34 +363,6 @@ optimize_code(PyObject *code, PyObject* consts) SETARG(codestr, i, 4); break; - /* Replace BUILD_SEQN 2 UNPACK_SEQN 2 with ROT2 JMP+2. - Replace BUILD_SEQN 3 UNPACK_SEQN 3 with ROT3 ROT2 JMP+1. - Note, these opcodes occur together only in assignment - statements. Accordingly, the unpack opcode is never - a jump target. */ - case BUILD_TUPLE: - case BUILD_LIST: - if (codestr[i+3] != UNPACK_SEQUENCE) - continue; - if (GETARG(codestr, i) == 2 && \ - GETARG(codestr, i+3) == 2) { - codestr[i] = ROT_TWO; - codestr[i+1] = JUMP_FORWARD; - SETARG(codestr, i+1, 2); - codestr[i+4] = DUP_TOP; /* Filler codes used as NOPs */ - codestr[i+5] = POP_TOP; - continue; - } - if (GETARG(codestr, i) == 3 && \ - GETARG(codestr, i+3) == 3) { - codestr[i] = ROT_THREE; - codestr[i+1] = ROT_TWO; - codestr[i+2] = JUMP_FORWARD; - SETARG(codestr, i+2, 1); - codestr[i+5] = DUP_TOP; - } - break; - /* Replace jumps to unconditional jumps */ case FOR_ITER: case JUMP_FORWARD: |