mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-116381: Specialize CONTAINS_OP (GH-116385)
* Specialize CONTAINS_OP * 📜🤖 Added by blurb_it. * Add PyAPI_FUNC for JIT --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
73807eb634
commit
7114cf20c0
21 changed files with 645 additions and 194 deletions
|
@ -121,6 +121,12 @@ typedef struct {
|
|||
|
||||
#define INLINE_CACHE_ENTRIES_TO_BOOL CACHE_ENTRIES(_PyToBoolCache)
|
||||
|
||||
typedef struct {
|
||||
uint16_t counter;
|
||||
} _PyContainsOpCache;
|
||||
|
||||
#define INLINE_CACHE_ENTRIES_CONTAINS_OP CACHE_ENTRIES(_PyContainsOpCache)
|
||||
|
||||
// Borrowed references to common callables:
|
||||
struct callable_cache {
|
||||
PyObject *isinstance;
|
||||
|
@ -277,6 +283,7 @@ extern void _Py_Specialize_UnpackSequence(PyObject *seq, _Py_CODEUNIT *instr,
|
|||
extern void _Py_Specialize_ForIter(PyObject *iter, _Py_CODEUNIT *instr, int oparg);
|
||||
extern void _Py_Specialize_Send(PyObject *receiver, _Py_CODEUNIT *instr);
|
||||
extern void _Py_Specialize_ToBool(PyObject *value, _Py_CODEUNIT *instr);
|
||||
extern void _Py_Specialize_ContainsOp(PyObject *value, _Py_CODEUNIT *instr);
|
||||
|
||||
/* Finalizer function for static codeobjects used in deepfreeze.py */
|
||||
extern void _PyStaticCode_Fini(PyCodeObject *co);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue