bpo-45829: Specialize BINARY_SUBSCR for __getitem__ implemented in Python. (GH-29592)

This commit is contained in:
Mark Shannon 2021-11-18 11:02:14 +00:00 committed by GitHub
parent 5275e59c0c
commit 21fa7a3e8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 145 additions and 89 deletions

65
Include/opcode.h generated
View file

@ -121,38 +121,39 @@ extern "C" {
#define BINARY_OP_SUBTRACT_INT 19
#define BINARY_OP_SUBTRACT_FLOAT 20
#define BINARY_SUBSCR_ADAPTIVE 21
#define BINARY_SUBSCR_LIST_INT 22
#define BINARY_SUBSCR_TUPLE_INT 23
#define BINARY_SUBSCR_DICT 24
#define CALL_FUNCTION_ADAPTIVE 26
#define CALL_FUNCTION_BUILTIN_O 27
#define CALL_FUNCTION_BUILTIN_FAST 28
#define CALL_FUNCTION_LEN 29
#define CALL_FUNCTION_ISINSTANCE 34
#define CALL_FUNCTION_PY_SIMPLE 36
#define JUMP_ABSOLUTE_QUICK 38
#define LOAD_ATTR_ADAPTIVE 39
#define LOAD_ATTR_INSTANCE_VALUE 40
#define LOAD_ATTR_WITH_HINT 41
#define LOAD_ATTR_SLOT 42
#define LOAD_ATTR_MODULE 43
#define LOAD_GLOBAL_ADAPTIVE 44
#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 STORE_ATTR_ADAPTIVE 58
#define STORE_ATTR_INSTANCE_VALUE 59
#define STORE_ATTR_SLOT 62
#define STORE_ATTR_WITH_HINT 63
#define LOAD_FAST__LOAD_FAST 64
#define STORE_FAST__LOAD_FAST 65
#define LOAD_FAST__LOAD_CONST 66
#define LOAD_CONST__LOAD_FAST 67
#define STORE_FAST__STORE_FAST 75
#define BINARY_SUBSCR_GETITEM 22
#define BINARY_SUBSCR_LIST_INT 23
#define BINARY_SUBSCR_TUPLE_INT 24
#define BINARY_SUBSCR_DICT 26
#define CALL_FUNCTION_ADAPTIVE 27
#define CALL_FUNCTION_BUILTIN_O 28
#define CALL_FUNCTION_BUILTIN_FAST 29
#define CALL_FUNCTION_LEN 34
#define CALL_FUNCTION_ISINSTANCE 36
#define CALL_FUNCTION_PY_SIMPLE 38
#define JUMP_ABSOLUTE_QUICK 39
#define LOAD_ATTR_ADAPTIVE 40
#define LOAD_ATTR_INSTANCE_VALUE 41
#define LOAD_ATTR_WITH_HINT 42
#define LOAD_ATTR_SLOT 43
#define LOAD_ATTR_MODULE 44
#define LOAD_GLOBAL_ADAPTIVE 45
#define LOAD_GLOBAL_MODULE 46
#define LOAD_GLOBAL_BUILTIN 47
#define LOAD_METHOD_ADAPTIVE 48
#define LOAD_METHOD_CACHED 55
#define LOAD_METHOD_CLASS 56
#define LOAD_METHOD_MODULE 57
#define LOAD_METHOD_NO_DICT 58
#define STORE_ATTR_ADAPTIVE 59
#define STORE_ATTR_INSTANCE_VALUE 62
#define STORE_ATTR_SLOT 63
#define STORE_ATTR_WITH_HINT 64
#define LOAD_FAST__LOAD_FAST 65
#define STORE_FAST__LOAD_FAST 66
#define LOAD_FAST__LOAD_CONST 67
#define LOAD_CONST__LOAD_FAST 75
#define STORE_FAST__STORE_FAST 76
#define DO_TRACING 255
#ifdef NEED_OPCODE_JUMP_TABLES
static uint32_t _PyOpcode_RelativeJump[8] = {