summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-06-30 16:11:05 (GMT)
committerGitHub <noreply@github.com>2022-06-30 16:11:05 (GMT)
commitfdc008138e50eab987217b79ddac303877e81869 (patch)
tree8325d90b52dc35d2bbc1097f7b2066d45e449193 /Python
parentecc8e77cc178707495dad7539348756fbe941bc5 (diff)
downloadcpython-fdc008138e50eab987217b79ddac303877e81869.zip
cpython-fdc008138e50eab987217b79ddac303877e81869.tar.gz
cpython-fdc008138e50eab987217b79ddac303877e81869.tar.bz2
gh-91719: Reload opcode on unknown error so that C can optimize the dispatching in ceval.c (GH-94364) (#94453)
(cherry picked from commit ea39b77de9fa25b447d0b4148f75f351076e890a) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
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 00fb027..b868161 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -5661,6 +5661,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");