diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2022-03-08 15:53:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-08 15:53:22 (GMT) |
commit | 5498a61c7c25db6f9e76032aa9c5153d79e09889 (patch) | |
tree | 7a74ec449c7d56d0dfde2b3d977f49993fee09c1 /Include | |
parent | 28f84c72b6cee145f9c00e9b999656e9a2517e49 (diff) | |
download | cpython-5498a61c7c25db6f9e76032aa9c5153d79e09889.zip cpython-5498a61c7c25db6f9e76032aa9c5153d79e09889.tar.gz cpython-5498a61c7c25db6f9e76032aa9c5153d79e09889.tar.bz2 |
bpo-46841: Don't use an oparg counter for `STORE_SUBSCR` (GH-31742)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_code.h | 6 | ||||
-rw-r--r-- | Include/opcode.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index 21c657a..0d324e9 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -86,6 +86,12 @@ typedef struct { #define INLINE_CACHE_ENTRIES_PRECALL CACHE_ENTRIES(_PyPrecallCache) +typedef struct { + _Py_CODEUNIT counter; +} _PyStoreSubscrCache; + +#define INLINE_CACHE_ENTRIES_STORE_SUBSCR CACHE_ENTRIES(_PyStoreSubscrCache) + /* Maximum size of code to quicken, in code units. */ #define MAX_SIZE_TO_QUICKEN 10000 diff --git a/Include/opcode.h b/Include/opcode.h index 930a975..7bf0ba7 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -211,6 +211,7 @@ static const uint32_t _PyOpcode_Jump[8] = { const uint8_t _PyOpcode_InlineCacheEntries[256] = { [BINARY_SUBSCR] = 4, + [STORE_SUBSCR] = 1, [UNPACK_SEQUENCE] = 1, [STORE_ATTR] = 4, [LOAD_ATTR] = 4, |