diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/importlib/_bootstrap_external.py | 4 | ||||
-rw-r--r-- | Lib/opcode.py | 7 | ||||
-rw-r--r-- | Lib/test/test_dis.py | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index dd1f6ff..9d36bc2 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -390,6 +390,8 @@ _code_type = type(_write_atomic.__code__) # Python 3.11a5 3481 (Use inline cache for BINARY_OP) # Python 3.11a5 3482 (Use inline caching for UNPACK_SEQUENCE and LOAD_GLOBAL) # Python 3.11a5 3483 (Use inline caching for COMPARE_OP and BINARY_SUBSCR) +# Python 3.11a5 3484 (Use inline caching for LOAD_ATTR, LOAD_METHOD, and +# STORE_ATTR) # Python 3.12 will start with magic number 3500 @@ -404,7 +406,7 @@ _code_type = type(_write_atomic.__code__) # Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array # in PC/launcher.c must also be updated. -MAGIC_NUMBER = (3483).to_bytes(2, 'little') + b'\r\n' +MAGIC_NUMBER = (3484).to_bytes(2, 'little') + b'\r\n' _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c _PYCACHE = '__pycache__' diff --git a/Lib/opcode.py b/Lib/opcode.py index 9b08562..f6e2dec 100644 --- a/Lib/opcode.py +++ b/Lib/opcode.py @@ -112,7 +112,7 @@ name_op('DELETE_NAME', 91) # "" def_op('UNPACK_SEQUENCE', 92, 1) # Number of tuple items jrel_op('FOR_ITER', 93) def_op('UNPACK_EX', 94) -name_op('STORE_ATTR', 95) # Index in name list +name_op('STORE_ATTR', 95, 4) # Index in name list name_op('DELETE_ATTR', 96) # "" name_op('STORE_GLOBAL', 97) # "" name_op('DELETE_GLOBAL', 98) # "" @@ -124,7 +124,7 @@ def_op('BUILD_TUPLE', 102) # Number of tuple items def_op('BUILD_LIST', 103) # Number of list items def_op('BUILD_SET', 104) # Number of set items def_op('BUILD_MAP', 105) # Number of dict entries -name_op('LOAD_ATTR', 106) # Index in name list +name_op('LOAD_ATTR', 106, 4) # Index in name list def_op('COMPARE_OP', 107, 2) # Comparison operator hascompare.append(107) name_op('IMPORT_NAME', 108) # Index in name list @@ -186,7 +186,7 @@ def_op('FORMAT_VALUE', 155) def_op('BUILD_CONST_KEY_MAP', 156) def_op('BUILD_STRING', 157) -name_op('LOAD_METHOD', 160) +name_op('LOAD_METHOD', 160, 10) def_op('LIST_EXTEND', 162) def_op('SET_UPDATE', 163) @@ -301,7 +301,6 @@ _specialized_instructions = [ "LOAD_FAST__LOAD_CONST", "LOAD_CONST__LOAD_FAST", "STORE_FAST__STORE_FAST", - "LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE", ] _specialization_stats = [ "success", diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py index 8de2ed0..7e0542a 100644 --- a/Lib/test/test_dis.py +++ b/Lib/test/test_dis.py @@ -375,7 +375,7 @@ dis_traceback = """\ >> PUSH_EXC_INFO %3d LOAD_GLOBAL 0 (Exception) - JUMP_IF_NOT_EXC_MATCH 31 (to 62) + JUMP_IF_NOT_EXC_MATCH 35 (to 70) STORE_FAST 0 (e) %3d LOAD_FAST 0 (e) |