summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_code.h
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2023-04-25 17:45:51 (GMT)
committerGitHub <noreply@github.com>2023-04-25 17:45:51 (GMT)
commitef25febcf2ede92a03c5ea00a13e167e0b5cb274 (patch)
tree6ce38cd3aa3d653d931df5250b02b5cb6b46bb69 /Include/internal/pycore_code.h
parentcef542ca572fdd402ff0e10093a0c1b459e5dcd6 (diff)
downloadcpython-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.h11
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,