Commit 37788bc2 authored by Jeroen Demeyer's avatar Jeroen Demeyer Committed by Petr Viktorin

bpo-36974: rename _FastCallKeywords -> _Vectorcall (GH-13653)

parent 6d0b7470
...@@ -92,7 +92,7 @@ PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *, ...@@ -92,7 +92,7 @@ PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *,
struct PyGetSetDef *); struct PyGetSetDef *);
#ifndef Py_LIMITED_API #ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) _PyMethodDescr_FastCallKeywords( PyAPI_FUNC(PyObject *) _PyMethodDescr_Vectorcall(
PyObject *descrobj, PyObject *const *args, size_t nargsf, PyObject *kwnames); PyObject *descrobj, PyObject *const *args, size_t nargsf, PyObject *kwnames);
PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *, PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *,
struct wrapperbase *, void *); struct wrapperbase *, void *);
......
...@@ -66,7 +66,7 @@ PyAPI_FUNC(PyObject *) _PyFunction_FastCallDict( ...@@ -66,7 +66,7 @@ PyAPI_FUNC(PyObject *) _PyFunction_FastCallDict(
Py_ssize_t nargs, Py_ssize_t nargs,
PyObject *kwargs); PyObject *kwargs);
PyAPI_FUNC(PyObject *) _PyFunction_FastCallKeywords( PyAPI_FUNC(PyObject *) _PyFunction_Vectorcall(
PyObject *func, PyObject *func,
PyObject *const *stack, PyObject *const *stack,
size_t nargsf, size_t nargsf,
......
...@@ -47,7 +47,7 @@ PyAPI_FUNC(PyObject *) _PyCFunction_FastCallDict(PyObject *func, ...@@ -47,7 +47,7 @@ PyAPI_FUNC(PyObject *) _PyCFunction_FastCallDict(PyObject *func,
Py_ssize_t nargs, Py_ssize_t nargs,
PyObject *kwargs); PyObject *kwargs);
PyAPI_FUNC(PyObject *) _PyCFunction_FastCallKeywords(PyObject *func, PyAPI_FUNC(PyObject *) _PyCFunction_Vectorcall(PyObject *func,
PyObject *const *stack, PyObject *const *stack,
size_t nargsf, size_t nargsf,
PyObject *kwnames); PyObject *kwnames);
......
...@@ -374,8 +374,8 @@ _PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs ...@@ -374,8 +374,8 @@ _PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs
PyObject * PyObject *
_PyFunction_FastCallKeywords(PyObject *func, PyObject* const* stack, _PyFunction_Vectorcall(PyObject *func, PyObject* const* stack,
size_t nargsf, PyObject *kwnames) size_t nargsf, PyObject *kwnames)
{ {
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *globals = PyFunction_GET_GLOBALS(func);
...@@ -714,9 +714,9 @@ exit: ...@@ -714,9 +714,9 @@ exit:
PyObject * PyObject *
_PyCFunction_FastCallKeywords(PyObject *func, _PyCFunction_Vectorcall(PyObject *func,
PyObject *const *args, size_t nargsf, PyObject *const *args, size_t nargsf,
PyObject *kwnames) PyObject *kwnames)
{ {
PyObject *result; PyObject *result;
......
...@@ -264,9 +264,9 @@ methoddescr_call(PyMethodDescrObject *descr, PyObject *args, PyObject *kwargs) ...@@ -264,9 +264,9 @@ methoddescr_call(PyMethodDescrObject *descr, PyObject *args, PyObject *kwargs)
// same to methoddescr_call(), but use FASTCALL convention. // same to methoddescr_call(), but use FASTCALL convention.
PyObject * PyObject *
_PyMethodDescr_FastCallKeywords(PyObject *descrobj, _PyMethodDescr_Vectorcall(PyObject *descrobj,
PyObject *const *args, size_t nargsf, PyObject *const *args, size_t nargsf,
PyObject *kwnames) PyObject *kwnames)
{ {
assert(Py_TYPE(descrobj) == &PyMethodDescr_Type); assert(Py_TYPE(descrobj) == &PyMethodDescr_Type);
PyMethodDescrObject *descr = (PyMethodDescrObject *)descrobj; PyMethodDescrObject *descr = (PyMethodDescrObject *)descrobj;
...@@ -756,7 +756,7 @@ PyDescr_NewMethod(PyTypeObject *type, PyMethodDef *method) ...@@ -756,7 +756,7 @@ PyDescr_NewMethod(PyTypeObject *type, PyMethodDef *method)
type, method->ml_name); type, method->ml_name);
if (descr != NULL) { if (descr != NULL) {
descr->d_method = method; descr->d_method = method;
descr->vectorcall = &_PyMethodDescr_FastCallKeywords; descr->vectorcall = _PyMethodDescr_Vectorcall;
} }
return (PyObject *)descr; return (PyObject *)descr;
} }
......
...@@ -36,7 +36,7 @@ PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname ...@@ -36,7 +36,7 @@ PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname
op->func_defaults = NULL; /* No default arguments */ op->func_defaults = NULL; /* No default arguments */
op->func_kwdefaults = NULL; /* No keyword only defaults */ op->func_kwdefaults = NULL; /* No keyword only defaults */
op->func_closure = NULL; op->func_closure = NULL;
op->vectorcall = _PyFunction_FastCallKeywords; op->vectorcall = _PyFunction_Vectorcall;
consts = ((PyCodeObject *)code)->co_consts; consts = ((PyCodeObject *)code)->co_consts;
if (PyTuple_Size(consts) >= 1) { if (PyTuple_Size(consts) >= 1) {
......
...@@ -52,7 +52,7 @@ PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) ...@@ -52,7 +52,7 @@ PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module)
op->vectorcall = NULL; op->vectorcall = NULL;
} }
else { else {
op->vectorcall = &_PyCFunction_FastCallKeywords; op->vectorcall = _PyCFunction_Vectorcall;
} }
_PyObject_GC_TRACK(op); _PyObject_GC_TRACK(op);
return (PyObject *)op; return (PyObject *)op;
......
...@@ -4815,7 +4815,7 @@ trace_call_function(PyThreadState *tstate, ...@@ -4815,7 +4815,7 @@ trace_call_function(PyThreadState *tstate,
{ {
PyObject *x; PyObject *x;
if (PyCFunction_Check(func)) { if (PyCFunction_Check(func)) {
C_TRACE(x, _PyCFunction_FastCallKeywords(func, args, nargs, kwnames)); C_TRACE(x, _PyCFunction_Vectorcall(func, args, nargs, kwnames));
return x; return x;
} }
else if (Py_TYPE(func) == &PyMethodDescr_Type && nargs > 0) { else if (Py_TYPE(func) == &PyMethodDescr_Type && nargs > 0) {
...@@ -4831,9 +4831,9 @@ trace_call_function(PyThreadState *tstate, ...@@ -4831,9 +4831,9 @@ trace_call_function(PyThreadState *tstate,
if (func == NULL) { if (func == NULL) {
return NULL; return NULL;
} }
C_TRACE(x, _PyCFunction_FastCallKeywords(func, C_TRACE(x, _PyCFunction_Vectorcall(func,
args+1, nargs-1, args+1, nargs-1,
kwnames)); kwnames));
Py_DECREF(func); Py_DECREF(func);
return x; return x;
} }
......
...@@ -1564,7 +1564,7 @@ class Frame(object): ...@@ -1564,7 +1564,7 @@ class Frame(object):
return False return False
if caller in ('_PyCFunction_FastCallDict', if caller in ('_PyCFunction_FastCallDict',
'_PyCFunction_FastCallKeywords', '_PyCFunction_Vectorcall',
'cfunction_call_varargs'): 'cfunction_call_varargs'):
arg_name = 'func' arg_name = 'func'
# Within that frame: # Within that frame:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment