bpo-46039: Split yield from in two (GH-30035)

* Split YIELD_FROM opcode into SEND and JUMP_ABSOLUTE.

* Remove YIELD_FROM opcode.
This commit is contained in:
Mark Shannon 2021-12-15 10:30:09 +00:00 committed by GitHub
parent 86de99588d
commit 0b50a4f0cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 91 additions and 53 deletions

View file

@ -373,6 +373,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.11a3 3465 (Add COPY_FREE_VARS opcode)
# Python 3.11a3 3466 (bpo-45292: PEP-654 except*)
# Python 3.11a4 3467 (Change CALL_xxx opcodes)
# Python 3.11a4 3468 (Add SEND opcode)
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
@ -382,7 +383,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 = (3467).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3468).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
_PYCACHE = '__pycache__'