mirror of
https://github.com/python/cpython.git
synced 2025-10-30 01:47:38 +00:00
GH-104584: Allow optimizers to opt out of optimizing. (GH-105244)
This commit is contained in:
parent
9efaff5fd3
commit
e8ecb9ee6b
2 changed files with 20 additions and 12 deletions
|
|
@ -21,7 +21,8 @@ typedef struct _PyExecutorObject {
|
|||
|
||||
typedef struct _PyOptimizerObject _PyOptimizerObject;
|
||||
|
||||
typedef _PyExecutorObject *(*optimize_func)(_PyOptimizerObject* self, PyCodeObject *code, _Py_CODEUNIT *instr);
|
||||
/* Should return > 0 if a new executor is created. O if no executor is produced and < 0 if an error occurred. */
|
||||
typedef int (*optimize_func)(_PyOptimizerObject* self, PyCodeObject *code, _Py_CODEUNIT *instr, _PyExecutorObject **);
|
||||
|
||||
typedef struct _PyOptimizerObject {
|
||||
PyObject_HEAD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue