mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
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.
This commit is contained in:
parent
0e7a0ed335
commit
51abbc7b4a
2 changed files with 41 additions and 9 deletions
|
@ -171,7 +171,6 @@ static int compiler_addop(struct compiler *, int);
|
|||
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 @@ compiler_new_block(struct compiler *c)
|
|||
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 @@ compiler_assert(struct compiler *c, stmt_ty s)
|
|||
else {
|
||||
ADDOP_I(c, RAISE_VARARGS, 1);
|
||||
}
|
||||
compiler_use_block(c, end);
|
||||
compiler_use_next_block(c, end);
|
||||
ADDOP(c, POP_TOP);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue