Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 36081:19d96c2d7df5 legacy-trunk
Fix Armin's bug 1333982. He found it, he didn't created it :-)
This code generated a C assertion:
assert 1, ([s for s in x] +
[s for s in x])
pass
assert was completely broken, it needed to use the proper block.
compiler_use_block() is now no longer used, so remove it.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sun, 18 Dec 2005 07:06:23 +0000 |
| parents | 8ebe34eb3eb7 |
| children | 301fb0a99371 |
line wrap: on
line diff
--- a/Python/compile.c Sun Dec 18 05:37:36 2005 +0000 +++ b/Python/compile.c Sun Dec 18 07:06:23 2005 +0000 @@ -171,7 +171,6 @@ static int compiler_addop_o(struct compiler *, int, PyObject *, PyObject *); static int compiler_addop_i(struct compiler *, int, int); static int compiler_addop_j(struct compiler *, int, basicblock *, int); -static void compiler_use_block(struct compiler *, basicblock *); static basicblock *compiler_use_new_block(struct compiler *); static int compiler_error(struct compiler *, const char *); static int compiler_nameop(struct compiler *, identifier, expr_context_ty); @@ -1178,13 +1177,6 @@ return b; } -static void -compiler_use_block(struct compiler *c, basicblock *block) -{ - assert (block != NULL); - c->u->u_curblock = block; -} - static basicblock * compiler_use_new_block(struct compiler *c) { @@ -2529,7 +2521,7 @@ else { ADDOP_I(c, RAISE_VARARGS, 1); } - compiler_use_block(c, end); + compiler_use_next_block(c, end); ADDOP(c, POP_TOP); return 1; }
