Correct micro release number and add a couple of asserts. (GH-25224)
This commit is contained in:
parent
1be456ae9d
commit
67969f5eb8
@ -348,7 +348,7 @@ _code_type = type(_write_atomic.__code__)
|
|||||||
# Python 3.10a2 3433 (RERAISE restores f_lasti if oparg != 0)
|
# Python 3.10a2 3433 (RERAISE restores f_lasti if oparg != 0)
|
||||||
# Python 3.10a6 3434 (PEP 634: Structural Pattern Matching)
|
# Python 3.10a6 3434 (PEP 634: Structural Pattern Matching)
|
||||||
# Python 3.10a7 3435 Use instruction offsets (as opposed to byte offsets).
|
# Python 3.10a7 3435 Use instruction offsets (as opposed to byte offsets).
|
||||||
# Python 3.10a7 3436 (Add GEN_START bytecode #43683)
|
# Python 3.10b1 3436 (Add GEN_START bytecode #43683)
|
||||||
|
|
||||||
#
|
#
|
||||||
# MAGIC must change whenever the bytecode emitted by the compiler may no
|
# MAGIC must change whenever the bytecode emitted by the compiler may no
|
||||||
|
@ -6162,8 +6162,7 @@ stackdepth(struct compiler *c)
|
|||||||
entryblock = b;
|
entryblock = b;
|
||||||
nblocks++;
|
nblocks++;
|
||||||
}
|
}
|
||||||
if (!entryblock)
|
assert(entryblock!= NULL);
|
||||||
return 0;
|
|
||||||
stack = (basicblock **)PyObject_Malloc(sizeof(basicblock *) * nblocks);
|
stack = (basicblock **)PyObject_Malloc(sizeof(basicblock *) * nblocks);
|
||||||
if (!stack) {
|
if (!stack) {
|
||||||
PyErr_NoMemory();
|
PyErr_NoMemory();
|
||||||
@ -6725,6 +6724,7 @@ assemble(struct compiler *c, int addNone)
|
|||||||
nblocks++;
|
nblocks++;
|
||||||
entryblock = b;
|
entryblock = b;
|
||||||
}
|
}
|
||||||
|
assert(entryblock != NULL);
|
||||||
|
|
||||||
if (insert_generator_prefix(c, entryblock)) {
|
if (insert_generator_prefix(c, entryblock)) {
|
||||||
goto error;
|
goto error;
|
||||||
@ -6732,7 +6732,7 @@ assemble(struct compiler *c, int addNone)
|
|||||||
|
|
||||||
/* Set firstlineno if it wasn't explicitly set. */
|
/* Set firstlineno if it wasn't explicitly set. */
|
||||||
if (!c->u->u_firstlineno) {
|
if (!c->u->u_firstlineno) {
|
||||||
if (entryblock && entryblock->b_instr && entryblock->b_instr->i_lineno)
|
if (entryblock->b_instr && entryblock->b_instr->i_lineno)
|
||||||
c->u->u_firstlineno = entryblock->b_instr->i_lineno;
|
c->u->u_firstlineno = entryblock->b_instr->i_lineno;
|
||||||
else
|
else
|
||||||
c->u->u_firstlineno = 1;
|
c->u->u_firstlineno = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user