mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922)
* Refactor mapping patterns and speed up class patterns. * Simplify MATCH_KEYS and MATCH_CLASS. * Add COPY opcode.
This commit is contained in:
parent
19a6c41e56
commit
82a662e521
10 changed files with 130 additions and 116 deletions
|
|
@ -85,7 +85,7 @@ def_op('GET_LEN', 30)
|
|||
def_op('MATCH_MAPPING', 31)
|
||||
def_op('MATCH_SEQUENCE', 32)
|
||||
def_op('MATCH_KEYS', 33)
|
||||
def_op('COPY_DICT_WITHOUT_KEYS', 34)
|
||||
|
||||
def_op('PUSH_EXC_INFO', 35)
|
||||
|
||||
def_op('POP_EXCEPT_AND_RERAISE', 37)
|
||||
|
|
@ -165,7 +165,7 @@ name_op('LOAD_GLOBAL', 116) # Index in name list
|
|||
def_op('IS_OP', 117)
|
||||
def_op('CONTAINS_OP', 118)
|
||||
def_op('RERAISE', 119)
|
||||
|
||||
def_op('COPY', 120)
|
||||
jabs_op('JUMP_IF_NOT_EXC_MATCH', 121)
|
||||
|
||||
def_op('LOAD_FAST', 124) # Local variable number
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue