mirror of
https://github.com/python/cpython.git
synced 2025-09-02 15:07:53 +00:00
bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231)
This commit is contained in:
parent
ae9de82e32
commit
04e07c258f
11 changed files with 107 additions and 111 deletions
|
@ -3853,7 +3853,7 @@ handle_eval_breaker:
|
|||
DISPATCH();
|
||||
}
|
||||
|
||||
TARGET(JUMP_IF_NOT_EXC_MATCH) {
|
||||
TARGET(CHECK_EXC_MATCH) {
|
||||
PyObject *right = POP();
|
||||
PyObject *left = TOP();
|
||||
assert(PyExceptionInstance_Check(left));
|
||||
|
@ -3864,9 +3864,7 @@ handle_eval_breaker:
|
|||
|
||||
int res = PyErr_GivenExceptionMatches(left, right);
|
||||
Py_DECREF(right);
|
||||
if (res == 0) {
|
||||
JUMPTO(oparg);
|
||||
}
|
||||
PUSH(Py_NewRef(res ? Py_True : Py_False));
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue