gh-107901: synthetic jumps which are not at end of loop no longer check the eval breaker (#113721)

This commit is contained in:
Irit Katriel 2024-01-06 14:20:08 +00:00 committed by GitHub
parent bb4c167060
commit d36a365118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 108 additions and 53 deletions

View file

@ -462,6 +462,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.13a1 3563 (Add CALL_KW and remove KW_NAMES)
# Python 3.13a1 3564 (Removed oparg from YIELD_VALUE, changed oparg values of RESUME)
# Python 3.13a1 3565 (Oparg of YIELD_VALUE indicates whether it is in a yield-from)
# Python 3.13a1 3566 (Emit JUMP_NO_INTERRUPT instead of JUMP for non-loop no-lineno cases)
# Python 3.14 will start with 3600
@ -478,7 +479,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 = (3565).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3566).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c