This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Allow extensions to set the vectorcall field on instances of PyFunctionObject
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: carljm, dino.viehland, itamaro
Priority: normal Keywords:

Created on 2022-03-01 22:14 by itamaro, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg414302 - (view) Author: Itamar Ostricher (itamaro) * Date: 2022-03-01 22:14
CPython extensions providing optimized execution of Python bytecode (like [Cinder JIT](https://docs.google.com/document/d/1l8I-FDE1xrIShm9eSNJqsGmY_VanMDX5-aK_gujhYBI/edit#heading=h.ujldakarfxhh) and [Pyjion](https://github.com/tonybaloney/Pyjion))
can benefit from being able to modify the vectorcall field on instances of PyFunctionObject to allow calling the optimized path (e.g. JIT-compiled) directly.

We propose adding an API to allow extensions to override this field:

```
void PyFunction_SetVectorcall(PyFunctionObject *func, vectorcallfunc vectorcall);
```
History
Date User Action Args
2022-04-11 14:59:56adminsetgithub: 91049
2022-03-01 22:14:02itamarocreate