[Python-checkins] [3.11] GH-99460: Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (gh-99461) (#99514)
gvanrossum
webhook-mailer at python.org
Wed Nov 16 11:10:13 EST 2022
https://github.com/python/cpython/commit/a06fb519af097159e2d132d75253da19b5588fc6
commit: a06fb519af097159e2d132d75253da19b5588fc6
branch: 3.11
author: Hood Chatham <roberthoodchatham at gmail.com>
committer: gvanrossum <gvanrossum at gmail.com>
date: 2022年11月16日T08:09:34-08:00
summary:
[3.11] GH-99460: Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (gh-99461) (#99514)
Manual backport of GH-99461.
files:
M Python/ceval.c
diff --git a/Python/ceval.c b/Python/ceval.c
index b4ebf0c3d50e..8cbe838ddf2b 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -5025,7 +5025,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
goto error;
}
PyObject *arg = TOP();
- PyObject *res = cfunc(PyCFunction_GET_SELF(callable), arg);
+ PyObject *res = _PyCFunction_TrampolineCall(cfunc, PyCFunction_GET_SELF(callable), arg);
_Py_LeaveRecursiveCallTstate(tstate);
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
@@ -5226,7 +5226,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
goto error;
}
- PyObject *res = cfunc(self, arg);
+ PyObject *res = _PyCFunction_TrampolineCall(cfunc, self, arg);
_Py_LeaveRecursiveCallTstate(tstate);
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
Py_DECREF(self);
@@ -5298,7 +5298,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
goto error;
}
- PyObject *res = cfunc(self, NULL);
+ PyObject *res = _PyCFunction_TrampolineCall(cfunc, self, NULL);
_Py_LeaveRecursiveCallTstate(tstate);
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
Py_DECREF(self);
More information about the Python-checkins
mailing list