diff options
| author | Carl Meyer <carl@oddbird.net> | 2023-04-25 17:45:51 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-25 17:45:51 (GMT) |
| commit | ef25febcf2ede92a03c5ea00a13e167e0b5cb274 (patch) | |
| tree | 6ce38cd3aa3d653d931df5250b02b5cb6b46bb69 /Include/internal/pycore_code.h | |
| parent | cef542ca572fdd402ff0e10093a0c1b459e5dcd6 (diff) | |
| download | cpython-ef25febcf2ede92a03c5ea00a13e167e0b5cb274.zip cpython-ef25febcf2ede92a03c5ea00a13e167e0b5cb274.tar.gz cpython-ef25febcf2ede92a03c5ea00a13e167e0b5cb274.tar.bz2 | |
gh-87729: specialize LOAD_SUPER_ATTR_METHOD (#103809)
Diffstat (limited to 'Include/internal/pycore_code.h')
| -rw-r--r-- | Include/internal/pycore_code.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index d32f37a..7d5d5e0 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -53,6 +53,15 @@ typedef struct { typedef struct { uint16_t counter; + uint16_t class_version[2]; + uint16_t self_type_version[2]; + uint16_t method[4]; +} _PySuperAttrCache; + +#define INLINE_CACHE_ENTRIES_LOAD_SUPER_ATTR CACHE_ENTRIES(_PySuperAttrCache) + +typedef struct { + uint16_t counter; uint16_t version[2]; uint16_t index; } _PyAttrCache; @@ -217,6 +226,8 @@ extern int _PyLineTable_PreviousAddressRange(PyCodeAddressRange *range); /* Specialization functions */ +extern void _Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *class, PyObject *self, + _Py_CODEUNIT *instr, PyObject *name, int load_method); extern void _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name); extern void _Py_Specialize_StoreAttr(PyObject *owner, _Py_CODEUNIT *instr, |
