[issue27810] Add METH_FASTCALL: new calling convention for C functions

2019-05-14 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Breakage due to the usage of borrowed references in _PyStack_UnpackDict(): #36907 -- nosy: +jdemeyer ___ Python tracker ___

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset ecd218c41cd4 by Victor Stinner in branch 'default': Use _PyDict_NewPresized() in _PyStack_AsDict() https://hg.python.org/cpython/rev/ecd218c41cd4 -- ___ Python tracker

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 08a500e8b482 by Victor Stinner in branch 'default': Issue #27810: Exclude METH_FASTCALL from the stable API https://hg.python.org/cpython/rev/08a500e8b482 -- ___ Python tracker

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-09-12 Thread STINNER Victor
STINNER Victor added the comment: > Could you please wrap "#define METH_FASTCALL 0x0080" with "#ifndef > Py_LIMITED_API"/"#endif"? Sorry, this is a mistake. I tried to exclude all new symbols related to fast call from the stable API. It should now be fixed. -- _

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please wrap "#define METH_FASTCALL 0x0080" with "#ifndef Py_LIMITED_API"/"#endif"? I think this method still is not stable, and we shouldn't encourage using it in third-party extensions. I would use two methods: just METH_FASTCALL and METH_FASTCAL

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-09-12 Thread STINNER Victor
STINNER Victor added the comment: Stefan Behnel: "There is a tiny bit of a backwards compatibility concern as the new function signature would be incompatible with anything we had before," Python 3.6 will probably have two "fast call" calling convention: * _PyObject_FastCallDict(): expect a Py

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 603bef7bb744 by Serhiy Storchaka in branch 'default': Issue #27810: Regenerate Argument Clinic. https://hg.python.org/cpython/rev/603bef7bb744 -- ___ Python tracker __

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3934e070c9db by Victor Stinner in branch 'default': Issue #27810: Fix getargs.c compilation on Windows https://hg.python.org/cpython/rev/3934e070c9db -- ___ Python tracker

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 86b0f5a900c7 by Victor Stinner in branch 'default': Add METH_FASTCALL calling convention https://hg.python.org/cpython/rev/86b0f5a900c7 New changeset 633f850038c3 by Victor Stinner in branch 'default': Emit METH_FASTCALL code in Argument Clinic http

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-09-09 Thread STINNER Victor
STINNER Victor added the comment: fastcall.patch combines two changes: changeset: 103513:74abb8ddf7f2 tag: tip user:Victor Stinner date:Fri Sep 09 17:40:38 2016 -0700 files: Include/modsupport.h Python/getargs.c Tools/clinic/clinic.py description: Emit METH_FASTC

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a25c39873d93 by Victor Stinner in branch 'default': Issue #27810: Add _PyCFunction_FastCallKeywords() https://hg.python.org/cpython/rev/a25c39873d93 -- nosy: +python-dev ___ Python tracker

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-25 Thread STINNER Victor
STINNER Victor added the comment: I changed the dependency to the issue #27830 "Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments" which itself depends on the issue #27213 "Rework CALL_FUNCTION* opcodes". -- dependencies: +Add _PyObjec

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: According to discussions in the issue #27809, require a Python dict leads to inefficient code because a temporary dict may be required. The issue #27830 proposes to pass keyword arguments as (key, value) pairs. It should be used for the new METH_FASTCALL calli

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: > Extensive callback interfaces like map() come to mind, where a large number > of calls becomes excessively time critical and might thus have made people > implement their own special purpose calling code. I didn't patch map_next() of Python/bltinmodule.c nor

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: Extensive callback interfaces like map() come to mind, where a large number of calls becomes excessively time critical and might thus have made people implement their own special purpose calling code. However, I don't know any such code (outside of Cython) and

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: > There is a tiny bit of a backwards compatibility concern as the new function > signature would be incompatible with anything we had before, Right. If you call directly PyCFunction functions, you will likely get quickly a crash. But... who call directly PyCFu

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-21 Thread Stefan Behnel
Stefan Behnel added the comment: I agree that this would be cool. There is a tiny bit of a backwards compatibility concern as the new function signature would be incompatible with anything we had before, but I would guess that any code that chooses to bypass PyObject_Call() & friends would at

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-21 Thread Stefan Behnel
Changes by Stefan Behnel : -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-19 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +_PyObject_FastCall(): add support for keyword arguments ___ Python tracker ___ ___ Pytho

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-19 Thread STINNER Victor
New submission from STINNER Victor: The issue #27128 added _PyObject_FastCall() to avoid the creation of temporary tuples when calling functions. I propose to add a new METH_FASTCALL calling convention. The example using METH_VARARGS | METH_KEYWORDS: PyObject* func(DirEntry *self, PyObject