diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-02-14 11:54:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 11:54:13 +0000 |
commit | 81e3aa835c32363f4547b6566edf1125386f1f6d (patch) | |
tree | 4a20320722549dca1c5d581772aa2a6152d8ca5b /Python/bytecodes.c | |
parent | 3690688149dca11589af59b7704541336613199a (diff) | |
download | cpython-git-81e3aa835c32363f4547b6566edf1125386f1f6d.tar.gz |
gh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 429cd7fdaf..be54e5f6f5 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -501,7 +501,14 @@ dummy_func( inst(CALL_INTRINSIC_1, (value -- res)) { assert(oparg <= MAX_INTRINSIC_1); res = _PyIntrinsics_UnaryFunctions[oparg](tstate, value); - Py_DECREF(value); + DECREF_INPUTS(); + ERROR_IF(res == NULL, error); + } + + inst(CALL_INTRINSIC_2, (value2, value1 -- res)) { + assert(oparg <= MAX_INTRINSIC_2); + res = _PyIntrinsics_BinaryFunctions[oparg](tstate, value2, value1); + DECREF_INPUTS(); ERROR_IF(res == NULL, error); } @@ -788,15 +795,6 @@ dummy_func( goto exception_unwind; } - inst(PREP_RERAISE_STAR, (orig, excs -- val)) { - assert(PyList_Check(excs)); - - val = _PyExc_PrepReraiseStar(orig, excs); - DECREF_INPUTS(); - - ERROR_IF(val == NULL, error); - } - inst(END_ASYNC_FOR, (awaitable, exc -- )) { assert(exc && PyExceptionInstance_Check(exc)); if (PyErr_GivenExceptionMatches(exc, PyExc_StopAsyncIteration)) { @@ -2383,7 +2381,7 @@ dummy_func( } // Cache layout: counter/1, func_version/2, min_args/1 - // Neither CALL_INTRINSIC_1 nor CALL_FUNCTION_EX are members! + // Neither CALL_INTRINSIC_1/2 nor CALL_FUNCTION_EX are members! family(call, INLINE_CACHE_ENTRIES_CALL) = { CALL, CALL_BOUND_METHOD_EXACT_ARGS, |