diff options
author | Ken Jin <kenjin4096@gmail.com> | 2022-06-14 10:36:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 10:36:22 (GMT) |
commit | b083450f8896bb4a29ac522e4474d91c056b9f32 (patch) | |
tree | 74d923609496e622ec1e99e9381ee3f6c42b829b /Include/internal/pycore_code.h | |
parent | cd543d0bc9aacca1dee02dea7ff4aec8966dcaf8 (diff) | |
download | cpython-b083450f8896bb4a29ac522e4474d91c056b9f32.zip cpython-b083450f8896bb4a29ac522e4474d91c056b9f32.tar.gz cpython-b083450f8896bb4a29ac522e4474d91c056b9f32.tar.bz2 |
GH-93429: Merge `LOAD_METHOD` back into `LOAD_ATTR` (GH-93430)
Diffstat (limited to 'Include/internal/pycore_code.h')
-rw-r--r-- | Include/internal/pycore_code.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index c181543..805c824 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -58,10 +58,6 @@ typedef struct { _Py_CODEUNIT index; } _PyAttrCache; -#define INLINE_CACHE_ENTRIES_LOAD_ATTR CACHE_ENTRIES(_PyAttrCache) - -#define INLINE_CACHE_ENTRIES_STORE_ATTR CACHE_ENTRIES(_PyAttrCache) - typedef struct { _Py_CODEUNIT counter; _Py_CODEUNIT type_version[2]; @@ -69,7 +65,11 @@ typedef struct { _Py_CODEUNIT descr[4]; } _PyLoadMethodCache; -#define INLINE_CACHE_ENTRIES_LOAD_METHOD CACHE_ENTRIES(_PyLoadMethodCache) + +// MUST be the max(_PyAttrCache, _PyLoadMethodCache) +#define INLINE_CACHE_ENTRIES_LOAD_ATTR CACHE_ENTRIES(_PyLoadMethodCache) + +#define INLINE_CACHE_ENTRIES_STORE_ATTR CACHE_ENTRIES(_PyAttrCache) typedef struct { _Py_CODEUNIT counter; @@ -233,8 +233,6 @@ extern int _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, extern int _Py_Specialize_StoreAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name); extern int _Py_Specialize_LoadGlobal(PyObject *globals, PyObject *builtins, _Py_CODEUNIT *instr, PyObject *name); -extern int _Py_Specialize_LoadMethod(PyObject *owner, _Py_CODEUNIT *instr, - PyObject *name); extern int _Py_Specialize_BinarySubscr(PyObject *sub, PyObject *container, _Py_CODEUNIT *instr); extern int _Py_Specialize_StoreSubscr(PyObject *container, PyObject *sub, _Py_CODEUNIT *instr); extern int _Py_Specialize_Call(PyObject *callable, _Py_CODEUNIT *instr, |