bpo-46841: Move the cache for LOAD_GLOBAL inline. (GH-31575)

This commit is contained in:
Mark Shannon 2022-02-28 12:56:29 +00:00 committed by GitHub
parent da7d99a4de
commit 4558af5a8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 284 additions and 232 deletions

View file

@ -31,7 +31,7 @@
#include "pycore_long.h" // _PyLong_GetZero()
#include "pycore_symtable.h" // PySTEntryObject
#define NEED_OPCODE_JUMP_TABLES
#define NEED_OPCODE_TABLES
#include "opcode.h" // EXTENDED_ARG
@ -108,7 +108,7 @@ typedef struct exceptstack {
#define MASK_LOW_LOG_BITS 31
static inline int
is_bit_set_in_table(uint32_t *table, int bitindex) {
is_bit_set_in_table(const uint32_t *table, int bitindex) {
/* Is the relevant bit set in the relevant word? */
/* 256 bits fit into 8 32-bits words.
* Word is indexed by (bitindex>>ln(size of int in bits)).