bpo-36974: rename _FastCallKeywords -> _Vectorcall (GH-13653) · python/cpython@37788bc (original) (raw)
9 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -92,7 +92,7 @@ PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *, | ||
92 | 92 | struct PyGetSetDef *); |
93 | 93 | #ifndef Py_LIMITED_API |
94 | 94 | |
95 | -PyAPI_FUNC(PyObject *) _PyMethodDescr_FastCallKeywords( | |
95 | +PyAPI_FUNC(PyObject *) _PyMethodDescr_Vectorcall( | |
96 | 96 | PyObject *descrobj, PyObject *const *args, size_t nargsf, PyObject *kwnames); |
97 | 97 | PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *, |
98 | 98 | struct wrapperbase *, void *); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -66,7 +66,7 @@ PyAPI_FUNC(PyObject *) _PyFunction_FastCallDict( | ||
66 | 66 | Py_ssize_t nargs, |
67 | 67 | PyObject *kwargs); |
68 | 68 | |
69 | -PyAPI_FUNC(PyObject *) _PyFunction_FastCallKeywords( | |
69 | +PyAPI_FUNC(PyObject *) _PyFunction_Vectorcall( | |
70 | 70 | PyObject *func, |
71 | 71 | PyObject *const *stack, |
72 | 72 | size_t nargsf, |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -47,7 +47,7 @@ PyAPI_FUNC(PyObject *) _PyCFunction_FastCallDict(PyObject *func, | ||
47 | 47 | Py_ssize_t nargs, |
48 | 48 | PyObject *kwargs); |
49 | 49 | |
50 | -PyAPI_FUNC(PyObject *) _PyCFunction_FastCallKeywords(PyObject *func, | |
50 | +PyAPI_FUNC(PyObject *) _PyCFunction_Vectorcall(PyObject *func, | |
51 | 51 | PyObject *const *stack, |
52 | 52 | size_t nargsf, |
53 | 53 | PyObject *kwnames); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -374,8 +374,8 @@ _PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs | ||
374 | 374 | |
375 | 375 | |
376 | 376 | PyObject * |
377 | -_PyFunction_FastCallKeywords(PyObject *func, PyObject* const* stack, | |
378 | - size_t nargsf, PyObject *kwnames) | |
377 | +_PyFunction_Vectorcall(PyObject *func, PyObject* const* stack, | |
378 | +size_t nargsf, PyObject *kwnames) | |
379 | 379 | { |
380 | 380 | PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); |
381 | 381 | PyObject *globals = PyFunction_GET_GLOBALS(func); |
@@ -714,9 +714,9 @@ _PyMethodDef_RawFastCallKeywords(PyMethodDef *method, PyObject *self, | ||
714 | 714 | |
715 | 715 | |
716 | 716 | PyObject * |
717 | -_PyCFunction_FastCallKeywords(PyObject *func, | |
718 | - PyObject *const *args, size_t nargsf, | |
719 | - PyObject *kwnames) | |
717 | +_PyCFunction_Vectorcall(PyObject *func, | |
718 | +PyObject *const *args, size_t nargsf, | |
719 | +PyObject *kwnames) | |
720 | 720 | { |
721 | 721 | PyObject *result; |
722 | 722 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -264,9 +264,9 @@ methoddescr_call(PyMethodDescrObject *descr, PyObject *args, PyObject *kwargs) | ||
264 | 264 | |
265 | 265 | // same to methoddescr_call(), but use FASTCALL convention. |
266 | 266 | PyObject * |
267 | -_PyMethodDescr_FastCallKeywords(PyObject *descrobj, | |
268 | - PyObject *const *args, size_t nargsf, | |
269 | - PyObject *kwnames) | |
267 | +_PyMethodDescr_Vectorcall(PyObject *descrobj, | |
268 | +PyObject *const *args, size_t nargsf, | |
269 | +PyObject *kwnames) | |
270 | 270 | { |
271 | 271 | assert(Py_TYPE(descrobj) == &PyMethodDescr_Type); |
272 | 272 | PyMethodDescrObject *descr = (PyMethodDescrObject *)descrobj; |
@@ -756,7 +756,7 @@ PyDescr_NewMethod(PyTypeObject *type, PyMethodDef *method) | ||
756 | 756 | type, method->ml_name); |
757 | 757 | if (descr != NULL) { |
758 | 758 | descr->d_method = method; |
759 | -descr->vectorcall = &_PyMethodDescr_FastCallKeywords; | |
759 | +descr->vectorcall = _PyMethodDescr_Vectorcall; | |
760 | 760 | } |
761 | 761 | return (PyObject *)descr; |
762 | 762 | } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -36,7 +36,7 @@ PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname | ||
36 | 36 | op->func_defaults = NULL; /* No default arguments */ |
37 | 37 | op->func_kwdefaults = NULL; /* No keyword only defaults */ |
38 | 38 | op->func_closure = NULL; |
39 | -op->vectorcall = _PyFunction_FastCallKeywords; | |
39 | +op->vectorcall = _PyFunction_Vectorcall; | |
40 | 40 | |
41 | 41 | consts = ((PyCodeObject *)code)->co_consts; |
42 | 42 | if (PyTuple_Size(consts) >= 1) { |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -52,7 +52,7 @@ PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) | ||
52 | 52 | op->vectorcall = NULL; |
53 | 53 | } |
54 | 54 | else { |
55 | -op->vectorcall = &_PyCFunction_FastCallKeywords; | |
55 | +op->vectorcall = _PyCFunction_Vectorcall; | |
56 | 56 | } |
57 | 57 | _PyObject_GC_TRACK(op); |
58 | 58 | return (PyObject *)op; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -4815,7 +4815,7 @@ trace_call_function(PyThreadState *tstate, | ||
4815 | 4815 | { |
4816 | 4816 | PyObject *x; |
4817 | 4817 | if (PyCFunction_Check(func)) { |
4818 | -C_TRACE(x, _PyCFunction_FastCallKeywords(func, args, nargs, kwnames)); | |
4818 | +C_TRACE(x, _PyCFunction_Vectorcall(func, args, nargs, kwnames)); | |
4819 | 4819 | return x; |
4820 | 4820 | } |
4821 | 4821 | else if (Py_TYPE(func) == &PyMethodDescr_Type && nargs > 0) { |
@@ -4831,9 +4831,9 @@ trace_call_function(PyThreadState *tstate, | ||
4831 | 4831 | if (func == NULL) { |
4832 | 4832 | return NULL; |
4833 | 4833 | } |
4834 | -C_TRACE(x, _PyCFunction_FastCallKeywords(func, | |
4835 | - args+1, nargs-1, | |
4836 | - kwnames)); | |
4834 | +C_TRACE(x, _PyCFunction_Vectorcall(func, | |
4835 | +args+1, nargs-1, | |
4836 | +kwnames)); | |
4837 | 4837 | Py_DECREF(func); |
4838 | 4838 | return x; |
4839 | 4839 | } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1564,7 +1564,7 @@ def is_other_python_frame(self): | ||
1564 | 1564 | return False |
1565 | 1565 | |
1566 | 1566 | if caller in ('_PyCFunction_FastCallDict', |
1567 | -'_PyCFunction_FastCallKeywords', | |
1567 | +'_PyCFunction_Vectorcall', | |
1568 | 1568 | 'cfunction_call_varargs'): |
1569 | 1569 | arg_name = 'func' |
1570 | 1570 | # Within that frame: |