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/generated_cases.c.h | |
| parent | 3690688149dca11589af59b7704541336613199a (diff) | |
| download | cpython-git-81e3aa835c32363f4547b6566edf1125386f1f6d.tar.gz | |
gh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)
Diffstat (limited to 'Python/generated_cases.c.h')
| -rw-r--r-- | Python/generated_cases.c.h | 30 | 
1 files changed, 14 insertions, 16 deletions
| diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 093ebff026..beb797cbd2 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -689,6 +689,20 @@              DISPATCH();          } +        TARGET(CALL_INTRINSIC_2) { +            PyObject *value1 = PEEK(1); +            PyObject *value2 = PEEK(2); +            PyObject *res; +            assert(oparg <= MAX_INTRINSIC_2); +            res = _PyIntrinsics_BinaryFunctions[oparg](tstate, value2, value1); +            Py_DECREF(value2); +            Py_DECREF(value1); +            if (res == NULL) goto pop_2_error; +            STACK_SHRINK(1); +            POKE(1, res); +            DISPATCH(); +        } +          TARGET(RAISE_VARARGS) {              PyObject **args = &PEEK(oparg);              PyObject *cause = NULL, *exc = NULL; @@ -999,22 +1013,6 @@              goto exception_unwind;          } -        TARGET(PREP_RERAISE_STAR) { -            PyObject *excs = PEEK(1); -            PyObject *orig = PEEK(2); -            PyObject *val; -            assert(PyList_Check(excs)); - -            val = _PyExc_PrepReraiseStar(orig, excs); -            Py_DECREF(orig); -            Py_DECREF(excs); - -            if (val == NULL) goto pop_2_error; -            STACK_SHRINK(1); -            POKE(1, val); -            DISPATCH(); -        } -          TARGET(END_ASYNC_FOR) {              PyObject *exc = PEEK(1);              PyObject *awaitable = PEEK(2); | 
