summaryrefslogtreecommitdiffstats
path: root/Include/opcode.h
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2022-03-03 23:31:00 (GMT)
committerGitHub <noreply@github.com>2022-03-03 23:31:00 (GMT)
commit05a8bc1c944709e7468f157bd1b6032f368e43bf (patch)
tree8bd069cf131d3d1f32bd388bba71eb856bdf3616 /Include/opcode.h
parent65b92ccdec2ee4a99e54aaf7ae2d9bbc2ebfe549 (diff)
downloadcpython-05a8bc1c944709e7468f157bd1b6032f368e43bf.zip
cpython-05a8bc1c944709e7468f157bd1b6032f368e43bf.tar.gz
cpython-05a8bc1c944709e7468f157bd1b6032f368e43bf.tar.bz2
bpo-46841: Use inline caching for attribute accesses (GH-31640)
Diffstat (limited to 'Include/opcode.h')
-rw-r--r--Include/opcode.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/opcode.h b/Include/opcode.h
index f6330d9..110f8c3 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -183,7 +183,6 @@ extern "C" {
#define LOAD_FAST__LOAD_CONST 173
#define LOAD_CONST__LOAD_FAST 174
#define STORE_FAST__STORE_FAST 175
-#define LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE 176
#define DO_TRACING 255
extern const uint8_t _PyOpcode_InlineCacheEntries[256];
@@ -213,9 +212,12 @@ static const uint32_t _PyOpcode_Jump[8] = {
const uint8_t _PyOpcode_InlineCacheEntries[256] = {
[BINARY_SUBSCR] = 4,
[UNPACK_SEQUENCE] = 1,
+ [STORE_ATTR] = 4,
+ [LOAD_ATTR] = 4,
[COMPARE_OP] = 2,
[LOAD_GLOBAL] = 5,
[BINARY_OP] = 1,
+ [LOAD_METHOD] = 10,
};
#endif /* OPCODE_TABLES */