[New-bugs-announce] [issue46893] Allow extensions to set the vectorcall field on instances of PyFunctionObject
Itamar Ostricher
report at bugs.python.org
Tue Mar 1 17:14:02 EST 2022
New submission from Itamar Ostricher <itamarost at gmail.com>:
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);
```
----------
components: Interpreter Core
messages: 414302
nosy: carljm, dino.viehland, itamaro
priority: normal
severity: normal
status: open
title: Allow extensions to set the vectorcall field on instances of PyFunctionObject
type: enhancement
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46893>
_______________________________________
More information about the New-bugs-announce
mailing list