mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
GH-87849: Simplify stack effect of SEND and specialize it for generators and coroutines. (GH-101788)
This commit is contained in:
parent
a1f08f5f19
commit
160f2fe2b9
15 changed files with 191 additions and 105 deletions
|
@ -167,7 +167,7 @@ def_op('COPY', 120)
|
|||
def_op('RETURN_CONST', 121)
|
||||
hasconst.append(121)
|
||||
def_op('BINARY_OP', 122)
|
||||
jrel_op('SEND', 123) # Number of bytes to skip
|
||||
jrel_op('SEND', 123) # Number of words to skip
|
||||
def_op('LOAD_FAST', 124) # Local variable number, no null check
|
||||
haslocal.append(124)
|
||||
def_op('STORE_FAST', 125) # Local variable number
|
||||
|
@ -370,6 +370,9 @@ _specializations = {
|
|||
"UNPACK_SEQUENCE_TUPLE",
|
||||
"UNPACK_SEQUENCE_TWO_TUPLE",
|
||||
],
|
||||
"SEND": [
|
||||
"SEND_GEN",
|
||||
],
|
||||
}
|
||||
_specialized_instructions = [
|
||||
opcode for family in _specializations.values() for opcode in family
|
||||
|
@ -429,6 +432,9 @@ _cache_format = {
|
|||
"STORE_SUBSCR": {
|
||||
"counter": 1,
|
||||
},
|
||||
"SEND": {
|
||||
"counter": 1,
|
||||
},
|
||||
}
|
||||
|
||||
_inline_cache_entries = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue