summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorneonene <53406459+neonene@users.noreply.github.com>2022-06-30 15:38:29 (GMT)
committerGitHub <noreply@github.com>2022-06-30 15:38:29 (GMT)
commitea39b77de9fa25b447d0b4148f75f351076e890a (patch)
tree1848a8b36ba539c9d02ccb0a992e60b1b93c1265 /Python
parentd68f2d27bbf85f3573a08fc7554889e1733a30f0 (diff)
downloadcpython-ea39b77de9fa25b447d0b4148f75f351076e890a.zip
cpython-ea39b77de9fa25b447d0b4148f75f351076e890a.tar.gz
cpython-ea39b77de9fa25b447d0b4148f75f351076e890a.tar.bz2
gh-91719: Reload opcode on unknown error so that C can optimize the dispatching in ceval.c (#94364)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 946e997..4fcdf9b 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -5706,6 +5706,9 @@ handle_eval_breaker:
#else
EXTRA_CASES // From opcode.h, a 'case' for each unused opcode
#endif
+ /* Tell C compilers not to hold the opcode variable in the loop.
+ next_instr points the current instruction without TARGET(). */
+ opcode = _Py_OPCODE(*next_instr);
fprintf(stderr, "XXX lineno: %d, opcode: %d\n",
_PyInterpreterFrame_GetLine(frame), opcode);
_PyErr_SetString(tstate, PyExc_SystemError, "unknown opcode");