mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)
This enables super-instruction formation, removal of checks for uninitialized variables, and frees up an instruction.
This commit is contained in:
parent
3c70d467c1
commit
8bff940ad6
16 changed files with 733 additions and 702 deletions
|
|
@ -198,8 +198,6 @@ def_op('BUILD_SLICE', 133) # Number of items
|
|||
jrel_op('JUMP_BACKWARD_NO_INTERRUPT', 134) # Number of words to skip (backwards)
|
||||
def_op('MAKE_CELL', 135)
|
||||
hasfree.append(135)
|
||||
def_op('LOAD_CLOSURE', 136)
|
||||
hasfree.append(136)
|
||||
def_op('LOAD_DEREF', 137)
|
||||
hasfree.append(137)
|
||||
def_op('STORE_DEREF', 138)
|
||||
|
|
@ -293,6 +291,7 @@ pseudo_op('LOAD_ZERO_SUPER_METHOD', 264, ['LOAD_SUPER_ATTR'])
|
|||
pseudo_op('LOAD_ZERO_SUPER_ATTR', 265, ['LOAD_SUPER_ATTR'])
|
||||
|
||||
pseudo_op('STORE_FAST_MAYBE_NULL', 266, ['STORE_FAST'])
|
||||
pseudo_op('LOAD_CLOSURE', 267, ['LOAD_FAST'])
|
||||
|
||||
MAX_PSEUDO_OPCODE = MIN_PSEUDO_OPCODE + len(_pseudo_ops) - 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue