[3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (#14782)

This commit is contained in:
Jeroen Demeyer 2019-07-23 12:39:51 +02:00 committed by Łukasz Langa
parent 5dab5e7d24
commit bf8e82f976
10 changed files with 388 additions and 117 deletions

View file

@ -4943,7 +4943,7 @@ trace_call_function(PyThreadState *tstate,
{
PyObject *x;
if (PyCFunction_Check(func)) {
C_TRACE(x, _PyCFunction_Vectorcall(func, args, nargs, kwnames));
C_TRACE(x, _PyObject_Vectorcall(func, args, nargs, kwnames));
return x;
}
else if (Py_TYPE(func) == &PyMethodDescr_Type && nargs > 0) {
@ -4959,9 +4959,9 @@ trace_call_function(PyThreadState *tstate,
if (func == NULL) {
return NULL;
}
C_TRACE(x, _PyCFunction_Vectorcall(func,
args+1, nargs-1,
kwnames));
C_TRACE(x, _PyObject_Vectorcall(func,
args+1, nargs-1,
kwnames));
Py_DECREF(func);
return x;
}
@ -5023,10 +5023,10 @@ do_call_core(PyThreadState *tstate, PyObject *func, PyObject *callargs, PyObject
return NULL;
}
C_TRACE(result, _PyCFunction_FastCallDict(func,
&_PyTuple_ITEMS(callargs)[1],
nargs - 1,
kwdict));
C_TRACE(result, _PyObject_FastCallDict(func,
&_PyTuple_ITEMS(callargs)[1],
nargs - 1,
kwdict));
Py_DECREF(func);
return result;
}