Skip to content

Commit be0ebdc

Browse files
committed
Tidy up
1 parent 6d61ef4 commit be0ebdc

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

Doc/library/dis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@ iterations of the loop.
17571757

17581758
Checks the eval breaker and performs periodic tasks if the eval breaker is set.
17591759
Tasks inlcude switching threads and performing GC amongst others.
1760-
All :opcode:`CALL` instructions must be followed by opcode:`CHECK_PERIODIC`.
1760+
All :opcode:`CALL` instructions must be followed by :opcode:`CHECK_PERIODIC`.
17611761

17621762
.. versionadded:: 3.14
17631763

Python/optimizer_analysis.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@ optimize_uops(
502502
#include "optimizer_cases.c.h"
503503

504504
default:
505-
assert(0);
506505
DPRINTF(1, "\nUnknown opcode in abstract interpreter\n");
507506
Py_UNREACHABLE();
508507
}

Python/specialize.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,12 +2043,10 @@ specialize_method_descriptor(PyMethodDescrObject *descr, _Py_CODEUNIT *instr,
20432043
}
20442044
PyInterpreterState *interp = _PyInterpreterState_GET();
20452045
PyObject *list_append = interp->callable_cache.list_append;
2046-
_Py_CODEUNIT next = instr[INLINE_CACHE_ENTRIES_CALL + 1];
2047-
bool check = (next.op.code == CHECK_PERIODIC);
2048-
_Py_CODEUNIT after = instr[INLINE_CACHE_ENTRIES_CALL + 2];
2049-
bool pop = (after.op.code == POP_TOP);
2046+
assert(instr[INLINE_CACHE_ENTRIES_CALL + 1].op.code == CHECK_PERIODIC);
2047+
bool pop = (instr[INLINE_CACHE_ENTRIES_CALL + 2].op.code == POP_TOP);
20502048
int oparg = instr->op.arg;
2051-
if ((PyObject *)descr == list_append && oparg == 1 && check && pop) {
2049+
if ((PyObject *)descr == list_append && oparg == 1 && pop) {
20522050
specialize(instr, CALL_LIST_APPEND);
20532051
return 0;
20542052
}

0 commit comments

Comments
 (0)