STINNER Victor added the comment: Status of the my FASTCALL implementation (34456cce64bb.patch):
* Add METH_FASTCALL calling convention to C functions, similar to METH_VARARGS|METH_KEYWORDS * Clinic uses METH_FASTCALL when possible (it may use METH_FASTCALL for all cases in the future) * Add new C functions: - _PyObject_FastCall(func, stack, nargs, kwds): root of the FASTCALL branch - PyObject_CallNoArg(func) - PyObject_CallArg1(func, arg) * Add new type flags changing the calling conventions of tp_new, tp_init and tp_call: - Py_TPFLAGS_FASTNEW - Py_TPFLAGS_FASTINIT - Py_TPFLAGS_FASTCALL * Backward incompatible change of Py_TPFLAGS_FASTNEW and Py_TPFLAGS_FASTINIT flags: calling explicitly type->tp_new() and type->tp_init() is now a bug and is likely to crash, since the calling convention can now be FASTCALL. * New _PyType_CallNew() and _PyType_CallInit() functions to call tp_new and tp_init of a type. Functions which called tp_new and tp_init directly were patched. * New helpers function to parse functions functions: - PyArg_ParseStack() - PyArg_ParseStackAndKeywords() - PyArg_UnpackStack() * New Py_Build functons: - Py_BuildStack() - Py_VaBuildStack() * New _PyStack API to handle a stack: - _PyStack_Alloc(), _PyStack_Free(), _PyStack_Copy() - _PyStack_FromTuple() - _PyStack_FromBorrowedTuple() - _PyStack_AsTuple(), _PyStack_AsTupleSlice() - ... * Many changes were done in the typeobject.c file to handle FASTCALL, new type flags, handle correctly flags when a new type is created, etc. * ceval.c: add _PyFunction_FastCall() function (somehow, I only exposed existing code) A large part of the patch changes existing code to use the new calling convention in many functions of many modules. Some changes were generated by the Argument Clinic. IMHO the best would be to use Argument Clinic in more places, rather than patching manually the code. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26814> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com