bpo-45107: Specialize LOAD_METHOD for instances with dict. (GH-31531)

This commit is contained in:
Mark Shannon 2022-02-24 19:34:57 +00:00 committed by GitHub
parent 4dc746310b
commit 2a6ece572c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 143 additions and 66 deletions

71
Include/opcode.h generated
View file

@ -147,41 +147,42 @@ extern "C" {
#define LOAD_GLOBAL_MODULE 45
#define LOAD_GLOBAL_BUILTIN 46
#define LOAD_METHOD_ADAPTIVE 47
#define LOAD_METHOD_CACHED 48
#define LOAD_METHOD_CLASS 55
#define LOAD_METHOD_MODULE 56
#define LOAD_METHOD_NO_DICT 57
#define PRECALL_ADAPTIVE 58
#define PRECALL_BUILTIN_CLASS 59
#define PRECALL_NO_KW_BUILTIN_O 62
#define PRECALL_NO_KW_BUILTIN_FAST 63
#define PRECALL_BUILTIN_FAST_WITH_KEYWORDS 64
#define PRECALL_NO_KW_LEN 65
#define PRECALL_NO_KW_ISINSTANCE 66
#define PRECALL_NO_KW_LIST_APPEND 67
#define PRECALL_NO_KW_METHOD_DESCRIPTOR_O 72
#define PRECALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 76
#define PRECALL_NO_KW_STR_1 77
#define PRECALL_NO_KW_TUPLE_1 78
#define PRECALL_NO_KW_TYPE_1 79
#define PRECALL_NO_KW_METHOD_DESCRIPTOR_FAST 80
#define PRECALL_BOUND_METHOD 81
#define PRECALL_PYFUNC 131
#define RESUME_QUICK 140
#define STORE_ATTR_ADAPTIVE 141
#define STORE_ATTR_INSTANCE_VALUE 143
#define STORE_ATTR_SLOT 150
#define STORE_ATTR_WITH_HINT 153
#define UNPACK_SEQUENCE_ADAPTIVE 154
#define UNPACK_SEQUENCE_LIST 158
#define UNPACK_SEQUENCE_TUPLE 159
#define UNPACK_SEQUENCE_TWO_TUPLE 161
#define LOAD_FAST__LOAD_FAST 167
#define STORE_FAST__LOAD_FAST 168
#define LOAD_FAST__LOAD_CONST 169
#define LOAD_CONST__LOAD_FAST 170
#define STORE_FAST__STORE_FAST 173
#define LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE 174
#define LOAD_METHOD_CLASS 48
#define LOAD_METHOD_MODULE 55
#define LOAD_METHOD_NO_DICT 56
#define LOAD_METHOD_WITH_DICT 57
#define LOAD_METHOD_WITH_VALUES 58
#define PRECALL_ADAPTIVE 59
#define PRECALL_BUILTIN_CLASS 62
#define PRECALL_NO_KW_BUILTIN_O 63
#define PRECALL_NO_KW_BUILTIN_FAST 64
#define PRECALL_BUILTIN_FAST_WITH_KEYWORDS 65
#define PRECALL_NO_KW_LEN 66
#define PRECALL_NO_KW_ISINSTANCE 67
#define PRECALL_NO_KW_LIST_APPEND 72
#define PRECALL_NO_KW_METHOD_DESCRIPTOR_O 76
#define PRECALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 77
#define PRECALL_NO_KW_STR_1 78
#define PRECALL_NO_KW_TUPLE_1 79
#define PRECALL_NO_KW_TYPE_1 80
#define PRECALL_NO_KW_METHOD_DESCRIPTOR_FAST 81
#define PRECALL_BOUND_METHOD 131
#define PRECALL_PYFUNC 140
#define RESUME_QUICK 141
#define STORE_ATTR_ADAPTIVE 143
#define STORE_ATTR_INSTANCE_VALUE 150
#define STORE_ATTR_SLOT 153
#define STORE_ATTR_WITH_HINT 154
#define UNPACK_SEQUENCE_ADAPTIVE 158
#define UNPACK_SEQUENCE_LIST 159
#define UNPACK_SEQUENCE_TUPLE 161
#define UNPACK_SEQUENCE_TWO_TUPLE 167
#define LOAD_FAST__LOAD_FAST 168
#define STORE_FAST__LOAD_FAST 169
#define LOAD_FAST__LOAD_CONST 170
#define LOAD_CONST__LOAD_FAST 173
#define STORE_FAST__STORE_FAST 174
#define LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE 175
#define DO_TRACING 255
#ifdef NEED_OPCODE_JUMP_TABLES
static uint32_t _PyOpcode_RelativeJump[8] = {